Interface TextResult
- All Superinterfaces:
Result
- All Known Implementing Classes:
StringTextResult
A text result is a result type that has been produced by a
By convention, it always implies the flavor
Not all
Job and is processed by
actions.By convention, it always implies the flavor
TEXT.Not all
ResultAction can handle every TextResult; result flavors define the kind of
information/data a TextResult represents, and actions will handle only results they support. A result can
be processed by more than one ResultAction.- Since:
- taskplanner 3.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault List<ResultFlavor> Defines the types of data this result contains.getText()Returns the content of the result in the form of aString.Returns the content of the result in the form of anInputStreamwith encodingStandardCharsets.UTF_8.Get the MIME type this result has.Methods inherited from interface Result
cleanup, supportsFlavor, supportsOneFlavorOf
-
Method Details
-
getText
Returns the content of the result in the form of aString. The actual interpretation of the content depends on the type as returned bygetTextContentType().- Returns:
- the content as a
String - Throws:
IOException- thrown if the content is created on demand and the creation failed- Since:
- taskplanner 3.0
-
getTextContent
Returns the content of the result in the form of anInputStreamwith encodingStandardCharsets.UTF_8. The actual interpretation of the content depends on the type as returned bygetTextContentType().- Returns:
- the content as an
InputStream - Throws:
IOException- thrown if the content is created on demand and the creation failed- Since:
- taskplanner 3.0
-
getTextContentType
-
getFlavors
Defines the types of data this result contains.- Specified by:
getFlavorsin interfaceResult- Returns:
- the
ResultFlavorvalues of this result
-