@Override public BatchedCommand toBatchedCommand(String line) throws CommandFormatException { return wrapped.toBatchedCommand(line); }
@Override public BatchedCommand toBatchedCommand(String line) throws CommandFormatException { return wrapped.toBatchedCommand(line); }
public BatchedCommand toBatchedCommand(String line) throws CommandFormatException { return delegate.toBatchedCommand(line); }
public BatchedCommand toBatchedCommand(String line) throws CommandFormatException { return delegate.toBatchedCommand(line); }
BatchedCommand newCmd = ctx.toBatchedCommand(editedLine); batch.set(lineNumber - 1, newCmd); ctx.printLine("#" + lineNumber + " " + newCmd.getCommand());
BatchedCommand newCmd = ctx.toBatchedCommand(editedLine); batch.set(lineNumber - 1, newCmd); ctx.printLine("#" + lineNumber + " " + newCmd.getCommand());
private static void executeBatch(final CommandContext ctx, final Iterable<String> commands) throws IOException, MojoExecutionException { final BatchManager batchManager = ctx.getBatchManager(); if (batchManager.activateNewBatch()) { final Batch batch = batchManager.getActiveBatch(); for (String cmd : commands) { try { batch.add(ctx.toBatchedCommand(cmd)); } catch (CommandFormatException e) { throw new MojoExecutionException(String.format("Command '%s' is invalid. %s", cmd, e.getLocalizedMessage()), e); } } final ModelNode result = ctx.getModelControllerClient().execute(batch.toRequest()); if (!ServerOperations.isSuccessfulOutcome(result)) { throw new MojoExecutionException(ServerOperations.getFailureDescriptionAsString(result)); } } }
private void executeBatch(final CommandContext ctx) throws IOException { final BatchManager batchManager = ctx.getBatchManager(); if (batchManager.activateNewBatch()) { final Batch batch = batchManager.getActiveBatch(); for (String cmd : commands) { try { batch.add(ctx.toBatchedCommand(cmd)); } catch (CommandFormatException e) { throw new IllegalArgumentException(String.format("Command '%s' is invalid. %s", cmd, e.getLocalizedMessage()), e); } } final ModelNode result = ctx.getModelControllerClient().execute(batch.toRequest()); if (!ServerOperations.isSuccessfulOutcome(result)) { throw new IllegalArgumentException(ServerOperations.getFailureDescriptionAsString(result)); } } }
line = line.trim(); if (!line.isEmpty() && line.charAt(0) != '#') { batch.add(ctx.toBatchedCommand(line));
line = line.trim(); if (!line.isEmpty() && line.charAt(0) != '#') { batch.add(ctx.toBatchedCommand(line));