public class CommandResultsBuilder extends Object
CommandResults
is immutable, this class is used to build up the results during CommandStep.run(CommandResultsBuilder)
.Modifier and Type | Method and Description |
---|---|
<T> CommandResultsBuilder |
addResult(CommandResultDefinition<T> definition,
T value)
Sets the value for a known
CommandResultDefinition to the command results. |
CommandResultsBuilder |
addResult(String key,
Object value)
Adds a key/value pair to the command results.
|
CommandFailedException |
commandFailed(String message,
int exitCode) |
CommandFailedException |
commandFailed(String message,
int exitCode,
boolean expected) |
CommandScope |
getCommandScope()
Return the
CommandScope the results are being built for. |
OutputStream |
getOutputStream()
Returns the
OutputStream for output for the command. |
Object |
getResult(String key)
Allows any step of the pipeline to access any of the results.
|
public CommandScope getCommandScope()
CommandScope
the results are being built for.public OutputStream getOutputStream()
OutputStream
for output for the command.CommandScope.setOutput(OutputStream)
public CommandResultsBuilder addResult(String key, Object value)
public Object getResult(String key)
public <T> CommandResultsBuilder addResult(CommandResultDefinition<T> definition, T value)
CommandResultDefinition
to the command results.public CommandFailedException commandFailed(String message, int exitCode)
public CommandFailedException commandFailed(String message, int exitCode, boolean expected)
Copyright © 2023 Liquibase.org. All rights reserved.