Package org.wildfly.plugin.cli
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 Summary
Constructors Modifier Constructor Description protectedAbstractBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description TaddCLIArguments(String... arguments)Adds the CLI arguments used if#isFork()or#isOffline()is set totrue.TaddCommands(Collection<String> commands)Adds the commands to the CLI commands that should be executed.TaddJvmOptions(String... jvmOptions)Adds the JVM options used if#isFork()or#isOffline()is set totrue.TaddPropertiesFiles(Collection<File> propertiesFiles)Adds the properties files to use when executing CLI scripts or commands.TaddScripts(Collection<File> scripts)Adds the scripts to be executed.TaddSystemProperties(Map<String,String> systemProperties)Adds to the system properties to set before the CLI commands are executed.BaseCommandConfigurationbuild()protected abstract TbuilderInstance()TsetAppend(boolean append)If true append output to file, otherwise a new file is created.TsetBatch(boolean batch)Sets whether or not the commands should be executed in a batch or not.TsetFailOnError(boolean failOnError)Sets whether or not CLI commands should fail if the command ends in an error or not.TsetJBossHome(String jbossHome)Sets the JBoss Home directory.TsetJBossHome(Path jbossHome)Sets the JBoss Home directory.TsetResolveExpression(boolean resolveExpression)If true resolve expression prior to send the operation to the serverTsetStdout(String stdout)Sets how the standard output stream should be handled if#isFork()or#isOffline()is set totrue.TsetTimeout(int timeout)Sets the timeout, in seconds, used for the management client connection.
-
-
-
Method Detail
-
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-trueif the commands should be executed in a batch, otherwisefalse- Returns:
- this configuration
-
setJBossHome
public T setJBossHome(String jbossHome)
Sets the JBoss Home directory.- Parameters:
jbossHome- the JBoss Home directory ornullif 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 ornullif the value is not required- Returns:
- this configuration
-
addJvmOptions
public T addJvmOptions(String... jvmOptions)
Adds the JVM options used if#isFork()or#isOffline()is set totrue.- Parameters:
jvmOptions- the JVM options ornull- Returns:
- this configuration
-
addCLIArguments
public T addCLIArguments(String... arguments)
Adds the CLI arguments used if#isFork()or#isOffline()is set totrue.- Parameters:
arguments- the CLI arguments ornull- 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 ornull- 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-trueif 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#isFork()or#isOffline()is set totrue.- 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)
If true resolve expression prior to send the operation to the server- Parameters:
resolveExpression-- Returns:
- this
-
build
public BaseCommandConfiguration build()
-
-