Package liquibase.command
Class CommandResultsBuilder
- java.lang.Object
-
- liquibase.command.CommandResultsBuilder
-
public class CommandResultsBuilder extends Object
BecauseCommandResults
is 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 CommandResultsBuilder
addResult(String key, Object value)
Adds a key/value pair to the command results.<T> CommandResultsBuilder
addResult(CommandResultDefinition<T> definition, T value)
Sets the value for a knownCommandResultDefinition
to the command results.CommandFailedException
commandFailed(String message, int exitCode)
CommandFailedException
commandFailed(String message, int exitCode, boolean expected)
CommandScope
getCommandScope()
Return theCommandScope
the results are being built for.OutputStream
getOutputStream()
Returns theOutputStream
for output for the command.Object
getResult(String key)
Allows any step of the pipeline to access any of the results.
-
-
-
Method Detail
-
getCommandScope
public CommandScope getCommandScope()
Return theCommandScope
the results are being built for.
-
getOutputStream
public OutputStream getOutputStream()
Returns theOutputStream
for 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 knownCommandResultDefinition
to the command results.
-
commandFailed
public CommandFailedException commandFailed(String message, int exitCode)
-
commandFailed
public CommandFailedException commandFailed(String message, int exitCode, boolean expected)
-
-