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 class
BaseCommandConfiguration.AbstractBuilder<T extends BaseCommandConfiguration.AbstractBuilder<T>>
static class
BaseCommandConfiguration.Builder
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseCommandConfiguration(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 running in a forked process.Collection<String>
getCommands()
Returns the commands to be executed.Path
getJBossHome()
Returns the JBoss Home directory.Collection<String>
getJvmOptions()
Returns the JVM options used if running in a forked process.Collection<Path>
getPropertiesFiles()
The properties files to use when executing CLI scripts or commands.Collection<Path>
getScripts()
Returns the scripts to be executed.String
getStdout()
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.int
getTimeout()
Gets the timeout, in seconds, used for the management connection.boolean
isAppend()
Is output appended to file.boolean
isBatch()
Indicates whether the commands should be run in a batch or not.boolean
isExpressionResolved()
Is expression resolved.boolean
isFailOnError()
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 the commands should be run in a batch or not.- Returns:
true
if the commands should be executed in a batch, otherwisefalse
-
getJBossHome
public Path getJBossHome()
Returns the JBoss Home directory.- Returns:
- the JBoss Home directory or
null
if the value was not set
-
getJvmOptions
public Collection<String> getJvmOptions()
Returns the JVM options used if running in a forked process.- Returns:
- the JVM options
-
getCLIArguments
public Collection<String> getCLIArguments()
Returns the CLI arguments used if running in a forked process.- 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:
true
if 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.
-
-