Package io.bdeploy.common.cli.data
Class DataResultBase
java.lang.Object
io.bdeploy.common.cli.data.DataResultBase
- All Implemented Interfaces:
DataResult,RenderableResult
- Direct Known Subclasses:
DataResultCsv,DataResultJson,DataResultText
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a data field to the result.protected Throwableprotected PrintStreamout()setExitCode(ExitCode exitCode) setMessage(String message) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.bdeploy.common.cli.data.RenderableResult
render
-
Constructor Details
-
DataResultBase
-
-
Method Details
-
out
-
getMessage
- Specified by:
getMessagein interfaceDataResult- Returns:
- the message for testability
-
getFields
- Specified by:
getFieldsin interfaceDataResult- Returns:
- the fields in the result for testability
-
getThrowable
-
setMessage
- Specified by:
setMessagein interfaceDataResult- Parameters:
message- the "main" result message.
-
setException
- Specified by:
setExceptionin interfaceDataResult- Parameters:
t- the exception in case one happened.
-
addField
Description copied from interface:DataResultAdds a data field to the result. This can be any data "produced" by the tool, e.g. an ID generated by the tool, etc.- Specified by:
addFieldin interfaceDataResult- Parameters:
name- name of the field.value- the value of the field.
-
setExitCode
- Specified by:
setExitCodein interfaceDataResult- Parameters:
exitCode- indicates whether operation was successful or had any errors.
-
getExitCode
- Specified by:
getExitCodein interfaceRenderableResult
-