Package de.xima.fc.workflow.model
Class TaskExecutionResultWrapper
- java.lang.Object
-
- de.xima.fc.workflow.model.TaskExecutionResultWrapper
-
- All Implemented Interfaces:
IWorkflowResponse
,IServletResponse
,Serializable
public class TaskExecutionResultWrapper extends Object implements IWorkflowResponse, Serializable
Wrapper to treat aITaskExecutionResult
as aIWorkflowResponse
.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TaskExecutionResultWrapper(IRemoteEventExecutionResult result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getBinValue()
The binary data for the response.String
getContentType()
Applies only whenIServletResponse.getType()
is set toEResponseType.SHOW_FILE
:String
getEncoding()
Applies only whenIServletResponse.getType()
is set toEResponseType.TEMPLATE
,EResponseType.TEMPLATE_SYSTEM
, orEResponseType.HTML
.ETextbausteinMsgCode
getMsgCode()
Map<String,Serializable>
getSessionAttributes()
EResponseType
getType()
String
getValue()
The plain-text data of the response, used only whenIServletResponse.getType()
is not set to a binary response type or redirect.Vorgang
getVorgang()
boolean
isForceDownload()
Applies only whenIServletResponse.getType()
is set toEResponseType.SHOW_FILE
.boolean
isSuccess()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.fc.interfaces.servlet.IServletResponse
getHttpHeader, getHttpStatusCode
-
-
-
-
Constructor Detail
-
TaskExecutionResultWrapper
public TaskExecutionResultWrapper(IRemoteEventExecutionResult result)
-
-
Method Detail
-
getValue
public String getValue()
Description copied from interface:IServletResponse
The plain-text data of the response, used only whenIServletResponse.getType()
is not set to a binary response type or redirect.- Specified by:
getValue
in interfaceIServletResponse
- Returns:
- The plain-text content of the HTTP response.
-
getContentType
public String getContentType()
Description copied from interface:IServletResponse
Applies only whenIServletResponse.getType()
is set toEResponseType.SHOW_FILE
:Must return the content type (=mime type) that is to be sent along with the binary data. When this is either
null
or blank, an attempt is made to guess the content type from the binary data. Please note that this may fail to determine the actual content type, you should always provide a content type.- Specified by:
getContentType
in interfaceIServletResponse
- Returns:
- The content type of the binary data.
-
getSessionAttributes
public Map<String,Serializable> getSessionAttributes()
- Specified by:
getSessionAttributes
in interfaceIServletResponse
- Returns:
- A
Map
with attributes that should be written to theHttpSession
. Existing values in theHttpSession
are overwritten.
-
getType
public EResponseType getType()
- Specified by:
getType
in interfaceIServletResponse
- Returns:
- The type of response, such as whether a plain text or binary file should be returned, or a redirect should be performed.
-
getBinValue
public byte[] getBinValue()
Description copied from interface:IServletResponse
The binary data for the response. Applies only whenIServletResponse.getType()
is set toEResponseType.SHOW_FILE
.- Specified by:
getBinValue
in interfaceIServletResponse
- Returns:
- The binary content of the HTTP response.
-
isForceDownload
public boolean isForceDownload()
Description copied from interface:IServletResponse
Applies only whenIServletResponse.getType()
is set toEResponseType.SHOW_FILE
.- Specified by:
isForceDownload
in interfaceIServletResponse
- Returns:
- If
true
, attempts to prevent browsers from showing the binary content inline. Iffalse
, the browser may show the content inline, which is useful for PDF, image or plain text files. Please note that support for this differs between browsers.
-
getEncoding
public String getEncoding()
Description copied from interface:IServletResponse
Applies only whenIServletResponse.getType()
is set toEResponseType.TEMPLATE
,EResponseType.TEMPLATE_SYSTEM
, orEResponseType.HTML
.- Specified by:
getEncoding
in interfaceIServletResponse
- Returns:
- The encoding that is to be used for encoding the response.
-
isSuccess
public boolean isSuccess()
- Specified by:
isSuccess
in interfaceIWorkflowResponse
- Returns:
true
indicates that the workflow was run successfully,false
indicates that an error occurred during workflow processing.
-
getMsgCode
public ETextbausteinMsgCode getMsgCode()
- Specified by:
getMsgCode
in interfaceIWorkflowResponse
- Returns:
- The response text that should be sent to the browser as a result of running the workflow. This may be a success, an error, or some other more specific message.
-
getVorgang
public Vorgang getVorgang()
- Specified by:
getVorgang
in interfaceIWorkflowResponse
- Returns:
- The current
Vorgang
that was processed.
-
-