org.appng.cli.commands

## Class CommandBatch

- java.lang.Object
- - org.appng.cli.commands.CommandBatch

- All Implemented Interfaces:
    ExecutableCliCommand

      public class CommandBatch
      extends Object
      implements ExecutableCliCommand

  An `ExecutableCliCommand` processing a batch file.

       Usage: appng batch [options]
         Options:
           -d
              Print the commands that would be executed after the batch file has been
              parsed, but do not execute them (dry-run).
              Default: false
         * -f
              The name of the batch file.

  Author:
    Matthias Müller, Matthias Herlitzius

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CommandBatch()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `execute(CliEnvironment cle)` Reads each line from the provided file and performs the corresponding command.
    `protected Map<String,String>` | `getVariables()`
    `protected org.appng.cli.commands.CommandBatch.Line` | `parse(String command)`
    `protected String[]` | `parseLine(String command)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CommandBatch

          public CommandBatch()

  - ### Method Detail

    - #### execute

          public void execute(CliEnvironment cle)
                       throws BusinessException

      Reads each line from the provided file and performs the corresponding command.
      Specified by:
        `execute` in interface `ExecutableCliCommand`
      Parameters:
        `cle` - the current `CliEnvironment`
      Throws:
        `BusinessException` - if on error occurs while executing the command

    - #### parseLine

          protected String[] parseLine(String command)

    - #### parse

          protected org.appng.cli.commands.CommandBatch.Line parse(String command)

    - #### getVariables

          protected Map<String,String> getVariables()

Copyright © 2011–2023 aiticon GmbH. All rights reserved.