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 protected
AbstractBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description T
addCLIArguments(String... arguments)
Adds the CLI arguments used if running in a forked process.T
addCommands(Collection<String> commands)
Adds the commands to the CLI commands that should be executed.T
addJvmOptions(String... jvmOptions)
Adds the JVM options used if running in a forked process.T
addPropertiesFiles(Collection<File> propertiesFiles)
Adds the properties files to use when executing CLI scripts or commands.T
addScripts(Collection<File> scripts)
Adds the scripts to be executed.T
addSystemProperties(Map<String,String> systemProperties)
Adds to the system properties to set before the CLI commands are executed.BaseCommandConfiguration
build()
protected abstract T
builderInstance()
T
setAppend(boolean append)
If true append output to file, otherwise a new file is created.T
setBatch(boolean batch)
Sets whether or not the commands should be executed in a batch or not.T
setFailOnError(boolean failOnError)
Sets whether or not CLI commands should fail if the command ends in an error or not.T
setJBossHome(String jbossHome)
Sets the JBoss Home directory.T
setJBossHome(Path jbossHome)
Sets the JBoss Home directory.T
setResolveExpression(boolean resolveExpression)
Set totrue
to resolve expressions prior to sending the operation to the server.T
setStdout(String stdout)
Sets how the standard output stream should be handled if running in a forked process.T
setTimeout(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
-true
if 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 ornull
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 ornull
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 ornull
- 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 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
-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 totrue
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()
-
-