Package de.xima.fc.interfaces.servlet
Interface IServletResponse
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
IWorkflowResponse
- All Known Implementing Classes:
ServletResponse,TaskExecutionResultWrapper,WorkflowResponse
public interface IServletResponse extends Serializable
Interface for the HTTP response that is sent in response to aHttpServletRequest.- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description byte[]getBinValue()The binary data for the response.StringgetContentType()StringgetEncoding()default Map<String,String>getHttpHeader()default intgetHttpStatusCode()default longgetLongValue()Applies only whentypeis set toFORM_RECORDis set, this is the ID of the form record to which to redirect.Map<String,Serializable>getSessionAttributes()EResponseTypegetType()StringgetValue()Whentypeis set to a binary response type (e.g.booleanisForceDownload()
-
-
-
Method Detail
-
getValue
String getValue()
Whentypeis set to a binary response type (e.g.SHOW_FILE), the file name of the returned file.When
typeis set to a non-binary response (e.g.JSON), the plain-text content of the response.- Returns:
- The plain-text content of the HTTP response.
-
getContentType
String getContentType()
Applies only whentypeis set toSHOW_FILE:Must return the content type (=mime type) that is to be sent along with the binary data. When this is either
nullor 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.- Returns:
- The content type of the binary data.
- Since:
- 5.0
-
getSessionAttributes
Map<String,Serializable> getSessionAttributes()
- Returns:
- A
Mapwith attributes that should be written to theHttpSession. Existing values in theHttpSessionare overwritten. - Since:
- 5.0
-
getHttpHeader
default Map<String,String> getHttpHeader()
- Returns:
- A
Mapof HTTP headers that should be sent along with the HTTP response.
-
getHttpStatusCode
default int getHttpStatusCode()
- Returns:
- The HTTP status code of the HTTP response.
-
getType
EResponseType getType()
- Returns:
- The type of response, such as whether a plain text or binary file should be returned, or a redirect should be performed.
-
getBinValue
byte[] getBinValue()
- Returns:
- The binary content of the HTTP response.
-
isForceDownload
boolean isForceDownload()
- 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
String getEncoding()
- Returns:
- The encoding that is to be used for encoding the response.
-
getLongValue
default long getLongValue()
Applies only whentypeis set toFORM_RECORDis set, this is the ID of the form record to which to redirect.- Returns:
- The long value content for the response.
-
-