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.String
getContentType()
String
getEncoding()
default Map<String,String>
getHttpHeader()
default int
getHttpStatusCode()
default long
getLongValue()
Applies only whentype
is set toFORM_RECORD
is set, this is the ID of the form record to which to redirect.Map<String,Serializable>
getSessionAttributes()
EResponseType
getType()
String
getValue()
Whentype
is set to a binary response type (e.g.boolean
isForceDownload()
-
-
-
Method Detail
-
getValue
String getValue()
Whentype
is set to a binary response type (e.g.SHOW_FILE
), the file name of the returned file.When
type
is 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 whentype
is set toSHOW_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.- Returns:
- The content type of the binary data.
- Since:
- 5.0
-
getSessionAttributes
Map<String,Serializable> getSessionAttributes()
- Returns:
- A
Map
with attributes that should be written to theHttpSession
. Existing values in theHttpSession
are overwritten. - Since:
- 5.0
-
getHttpHeader
default Map<String,String> getHttpHeader()
- Returns:
- A
Map
of 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 whentype
is set toFORM_RECORD
is set, this is the ID of the form record to which to redirect.- Returns:
- The long value content for the response.
-
-