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()
Applies only whengetType()
is set toEResponseType.SHOW_FILE
:String
getEncoding()
Applies only whengetType()
is set toEResponseType.TEMPLATE
,EResponseType.TEMPLATE_SYSTEM
, orEResponseType.HTML
.default Map<String,String>
getHttpHeader()
default int
getHttpStatusCode()
Map<String,Serializable>
getSessionAttributes()
EResponseType
getType()
String
getValue()
The plain-text data of the response, used only whengetType()
is not set to a binary response type or redirect.boolean
isForceDownload()
Applies only whengetType()
is set toEResponseType.SHOW_FILE
.
-
-
-
Method Detail
-
getValue
String getValue()
The plain-text data of the response, used only whengetType()
is not set to a binary response type or redirect.- Returns:
- The plain-text content of the HTTP response.
-
getContentType
String getContentType()
Applies only whengetType()
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.- 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()
The binary data for the response. Applies only whengetType()
is set toEResponseType.SHOW_FILE
.- Returns:
- The binary content of the HTTP response.
-
isForceDownload
boolean isForceDownload()
Applies only whengetType()
is set toEResponseType.SHOW_FILE
.- 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()
Applies only whengetType()
is set toEResponseType.TEMPLATE
,EResponseType.TEMPLATE_SYSTEM
, orEResponseType.HTML
.- Returns:
- The encoding that is to be used for encoding the response.
-
-