Class BaseCommandConfiguration.AbstractBuilder<T extends BaseCommandConfiguration.AbstractBuilder<T>>

java.lang.Object
org.wildfly.plugin.cli.BaseCommandConfiguration.AbstractBuilder<T>
Direct Known Subclasses:
BaseCommandConfiguration.Builder, CommandConfiguration.AbstractBuilder
Enclosing class:
BaseCommandConfiguration

protected abstract static class BaseCommandConfiguration.AbstractBuilder<T extends BaseCommandConfiguration.AbstractBuilder<T>> extends Object
  • Constructor Details

    • AbstractBuilder

      protected AbstractBuilder()
  • Method Details

    • builderInstance

      protected abstract T builderInstance()
    • setAppend

      public T setAppend(boolean append)
      If true append output to file, otherwise a new file is created.
      Parameters:
      append - true to append to the file.
      Returns:
      this
    • setBatch

      public T setBatch(boolean batch)
      Sets whether or not the commands should be executed in a batch or not.
      Parameters:
      batch - true if the commands should be executed in a batch, otherwise false
      Returns:
      this configuration
    • setJBossHome

      public T setJBossHome(String jbossHome)
      Sets the JBoss Home directory.
      Parameters:
      jbossHome - the JBoss Home directory or null if the value is not required
      Returns:
      this configuration
    • setJBossHome

      public T setJBossHome(Path jbossHome)
      Sets the JBoss Home directory.
      Parameters:
      jbossHome - the JBoss Home directory or null if the value is not required
      Returns:
      this configuration
    • addJvmOptions

      public T addJvmOptions(String... jvmOptions)
      Adds the JVM options used if running in a forked process.
      Parameters:
      jvmOptions - the JVM options or null
      Returns:
      this configuration
    • addCLIArguments

      public T addCLIArguments(String... arguments)
      Adds the CLI arguments used if running in a forked process.
      Parameters:
      arguments - the CLI arguments or null
      Returns:
      this configuration
    • addSystemProperties

      public T addSystemProperties(Map<String,String> systemProperties)
      Adds to the system properties to set before the CLI commands are executed.
      Parameters:
      systemProperties - the system properties or null
      Returns:
      this configuration
    • addPropertiesFiles

      public T addPropertiesFiles(Collection<File> propertiesFiles)
      Adds the properties files to use when executing CLI scripts or commands.
      Parameters:
      propertiesFiles - the property files to add
      Returns:
      this configuration
    • addCommands

      public T addCommands(Collection<String> commands)
      Adds the commands to the CLI commands that should be executed.
      Parameters:
      commands - the commands to be executed
      Returns:
      this configuration
    • addScripts

      public T addScripts(Collection<File> scripts)
      Adds the scripts to be executed.
      Parameters:
      scripts - the scripts to be executed
      Returns:
      this configuration
    • setFailOnError

      public T setFailOnError(boolean failOnError)
      Sets whether or not CLI commands should fail if the command ends in an error or not.
      Parameters:
      failOnError - true if a CLI command fails then the execution should fail
      Returns:
      this configuration
    • setStdout

      public T setStdout(String stdout)
      Sets how the standard output stream should be handled if running in a forked process.
      Parameters:
      stdout - the pattern for standard out
      Returns:
      this configuration
    • setTimeout

      public T setTimeout(int timeout)
      Sets the timeout, in seconds, used for the management client connection.
      Parameters:
      timeout - the timeout to use in seconds
      Returns:
      this configuration
    • setResolveExpression

      public T setResolveExpression(boolean resolveExpression)
      Set to true to resolve expressions prior to sending the operation to the server.
      Parameters:
      resolveExpression - true if expressions should be resolved before the operation is sent to the server
      Returns:
      this configuration
    • build

      public BaseCommandConfiguration build()