Package org.wildfly.plugin.cli
Class BaseCommandConfiguration
- java.lang.Object
-
- org.wildfly.plugin.cli.BaseCommandConfiguration
-
- Direct Known Subclasses:
CommandConfiguration
public class BaseCommandConfiguration extends Object
The configuration used to execute forked offline CLI commands.- Author:
- jdenise@redhat.com
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classBaseCommandConfiguration.AbstractBuilder<T extends BaseCommandConfiguration.AbstractBuilder<T>>static classBaseCommandConfiguration.Builder
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseCommandConfiguration(BaseCommandConfiguration.AbstractBuilder<?> builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>getCLIArguments()Returns the CLI arguments used if#isFork()or#isOffline()is set totrue.Collection<String>getCommands()Returns the commands to be executed.PathgetJBossHome()Returns the JBoss Home directory.Collection<String>getJvmOptions()Returns the JVM options used if#isFork()or#isOffline()is set totrue.Collection<Path>getPropertiesFiles()The properties files to use when executing CLI scripts or commands.Collection<Path>getScripts()Returns the scripts to be executed.StringgetStdout()The pattern used to determine how standard out is handled for a new CLI process.Map<String,String>getSystemProperties()Returns the system properties to set before CLI commands are executed.intgetTimeout()Gets the timeout, in seconds, used for the management connection.booleanisAppend()Is output appended to file.booleanisBatch()Indicates whether or not the commands should be run in a batch or not.booleanisExpressionResolved()Is expression resolved.booleanisFailOnError()Indicates whether or not CLI commands should fail if the command ends in an error or not.
-
-
-
Constructor Detail
-
BaseCommandConfiguration
protected BaseCommandConfiguration(BaseCommandConfiguration.AbstractBuilder<?> builder)
-
-
Method Detail
-
isAppend
public boolean isAppend()
Is output appended to file.- Returns:
- true to append to the file
-
isBatch
public boolean isBatch()
Indicates whether or not the commands should be run in a batch or not.- Returns:
trueif the commands should be executed in a batch, otherwisefalse
-
getJBossHome
public Path getJBossHome()
Returns the JBoss Home directory.- Returns:
- the JBoss Home directory or
nullif the value was not set
-
getJvmOptions
public Collection<String> getJvmOptions()
Returns the JVM options used if#isFork()or#isOffline()is set totrue.- Returns:
- the JVM options
-
getCLIArguments
public Collection<String> getCLIArguments()
Returns the CLI arguments used if#isFork()or#isOffline()is set totrue.- Returns:
- the CLI arguments
-
getSystemProperties
public Map<String,String> getSystemProperties()
Returns the system properties to set before CLI commands are executed.- Returns:
- the system properties to set before CLI commands are executed
-
getPropertiesFiles
public Collection<Path> getPropertiesFiles()
The properties files to use when executing CLI scripts or commands.- Returns:
- the paths to the properties files
-
getCommands
public Collection<String> getCommands()
Returns the commands to be executed.- Returns:
- the commands to be executed
-
getScripts
public Collection<Path> getScripts()
Returns the scripts to be executed.- Returns:
- the scripts to be executed
-
isFailOnError
public boolean isFailOnError()
Indicates whether or not CLI commands should fail if the command ends in an error or not.- Returns:
trueif a CLI command fails then the execution should fail
-
getStdout
public String getStdout()
The pattern used to determine how standard out is handled for a new CLI process.- Returns:
- the standard out pattern
-
getTimeout
public int getTimeout()
Gets the timeout, in seconds, used for the management connection.- Returns:
- the timeout used for the management connection
-
isExpressionResolved
public boolean isExpressionResolved()
Is expression resolved.- Returns:
- true is expressions are resolved.
-
-