Package io.bdeploy.common.cli.data
Interface DataResult
- All Superinterfaces:
RenderableResult
- All Known Implementing Classes:
DataResultBase,DataResultCsv,DataResultJson,DataResultText
Represents the result of a CLI tool.
-
Method Summary
Modifier and TypeMethodDescriptionAdds a data field to the result.setExitCode(ExitCode exitCode) setMessage(String message) Methods inherited from interface io.bdeploy.common.cli.data.RenderableResult
getExitCode, render
-
Method Details
-
setMessage
- Parameters:
message- the "main" result message.
-
setExitCode
- Parameters:
exitCode- indicates whether operation was successful or had any errors.
-
setException
- Parameters:
t- the exception in case one happened.
-
addField
Adds a data field to the result. This can be any data "produced" by the tool, e.g. an ID generated by the tool, etc.- Parameters:
name- name of the field.value- the value of the field.
-
getFields
- Returns:
- the fields in the result for testability
-
getMessage
String getMessage()- Returns:
- the message for testability
-