Package liquibase.command
Class CommandResultsBuilder
- java.lang.Object
-
- liquibase.command.CommandResultsBuilder
-
public class CommandResultsBuilder extends Object
BecauseCommandResultsis immutable, this class is used to build up the results duringCommandStep.run(CommandResultsBuilder).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandResultsBuilderaddResult(String key, Object value)Adds a key/value pair to the command results.<T> CommandResultsBuilderaddResult(CommandResultDefinition<T> definition, T value)Sets the value for a knownCommandResultDefinitionto the command results.CommandFailedExceptioncommandFailed(String message, int exitCode)CommandFailedExceptioncommandFailed(String message, int exitCode, boolean expected)CommandScopegetCommandScope()Return theCommandScopethe results are being built for.OutputStreamgetOutputStream()Returns theOutputStreamfor output for the command.ObjectgetResult(String key)Allows any step of the pipeline to access any of the results.
-
-
-
Method Detail
-
getCommandScope
public CommandScope getCommandScope()
Return theCommandScopethe results are being built for.
-
getOutputStream
public OutputStream getOutputStream()
Returns theOutputStreamfor output for the command.- See Also:
CommandScope.setOutput(OutputStream)
-
addResult
public CommandResultsBuilder addResult(String key, Object value)
Adds a key/value pair to the command results.
-
getResult
public Object getResult(String key)
Allows any step of the pipeline to access any of the results.
-
addResult
public <T> CommandResultsBuilder addResult(CommandResultDefinition<T> definition, T value)
Sets the value for a knownCommandResultDefinitionto the command results.
-
commandFailed
public CommandFailedException commandFailed(String message, int exitCode)
-
commandFailed
public CommandFailedException commandFailed(String message, int exitCode, boolean expected)
-
-