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 -
Method Summary
Modifier and TypeMethodDescriptionaddCLIArguments
(String... arguments) Adds the CLI arguments used if running in a forked process.addCommands
(Collection<String> commands) Adds the commands to the CLI commands that should be executed.addJvmOptions
(String... jvmOptions) Adds the JVM options used if running in a forked process.addPropertiesFiles
(Collection<File> propertiesFiles) Adds the properties files to use when executing CLI scripts or commands.addScripts
(Collection<File> scripts) Adds the scripts to be executed.addSystemProperties
(Map<String, String> systemProperties) Adds to the system properties to set before the CLI commands are executed.build()
protected abstract T
setAppend
(boolean append) If true append output to file, otherwise a new file is created.setBatch
(boolean batch) Sets whether or not the commands should be executed in a batch or not.setFailOnError
(boolean failOnError) Sets whether or not CLI commands should fail if the command ends in an error or not.setJBossHome
(String jbossHome) Sets the JBoss Home directory.setJBossHome
(Path jbossHome) Sets the JBoss Home directory.setResolveExpression
(boolean resolveExpression) Set totrue
to resolve expressions prior to sending the operation to the server.Sets how the standard output stream should be handled if running in a forked process.setTimeout
(int timeout) Sets the timeout, in seconds, used for the management client connection.
-
Constructor Details
-
AbstractBuilder
protected AbstractBuilder()
-
-
Method Details
-
builderInstance
-
setAppend
If true append output to file, otherwise a new file is created.- Parameters:
append
- true to append to the file.- Returns:
- this
-
setBatch
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
Sets the JBoss Home directory.- Parameters:
jbossHome
- the JBoss Home directory ornull
if the value is not required- Returns:
- this configuration
-
setJBossHome
Sets the JBoss Home directory.- Parameters:
jbossHome
- the JBoss Home directory ornull
if the value is not required- Returns:
- this configuration
-
addJvmOptions
Adds the JVM options used if running in a forked process.- Parameters:
jvmOptions
- the JVM options ornull
- Returns:
- this configuration
-
addCLIArguments
Adds the CLI arguments used if running in a forked process.- Parameters:
arguments
- the CLI arguments ornull
- Returns:
- this configuration
-
addSystemProperties
Adds to the system properties to set before the CLI commands are executed.- Parameters:
systemProperties
- the system properties ornull
- Returns:
- this configuration
-
addPropertiesFiles
Adds the properties files to use when executing CLI scripts or commands.- Parameters:
propertiesFiles
- the property files to add- Returns:
- this configuration
-
addCommands
Adds the commands to the CLI commands that should be executed.- Parameters:
commands
- the commands to be executed- Returns:
- this configuration
-
addScripts
Adds the scripts to be executed.- Parameters:
scripts
- the scripts to be executed- Returns:
- this configuration
-
setFailOnError
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
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
Sets the timeout, in seconds, used for the management client connection.- Parameters:
timeout
- the timeout to use in seconds- Returns:
- this configuration
-
setResolveExpression
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
-