Package de.xima.fc.workflow.model
Class HttpContextData.Builder
- java.lang.Object
-
- de.xima.fc.workflow.model.HttpContextData.Builder
-
- All Implemented Interfaces:
org.apache.commons.lang3.builder.Builder<IHttpContextData>
- Enclosing class:
- HttpContextData
public static final class HttpContextData.Builder extends Object implements org.apache.commons.lang3.builder.Builder<IHttpContextData>
Builder for creating an immutable instance ofIHttpContextData
.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpContextData.Builder
baseUrl(String baseUrl)
IHttpContextData
build()
HttpContextData.Builder
contextPath(String contextPath)
HttpContextData.Builder
formCheckRequested(boolean formCheckRequested)
HttpContextData.Builder
formRequestType(EFormRequestType formRequestType)
HttpContextData.Builder
previewRequested(boolean previewRequested)
HttpContextData.Builder
requestContext(IFormRequestContext requestContext)
Adds all data from the request context to this builder.HttpContextData.Builder
reviewRequested(boolean reviewRequested)
HttpContextData.Builder
saveRequested(Boolean saveRequested)
HttpContextData.Builder
sessionAttributes(Map<String,Serializable> sessionAttributesMap)
HttpContextData.Builder
sessionId(String sessionId)
-
-
-
Method Detail
-
baseUrl
public HttpContextData.Builder baseUrl(String baseUrl)
- Parameters:
baseUrl
- The base URL of the current HTTP request, i.e. the context path with the protocol, server, and port.- Returns:
- this for chaining.
-
build
public IHttpContextData build()
- Specified by:
build
in interfaceorg.apache.commons.lang3.builder.Builder<IHttpContextData>
-
contextPath
public HttpContextData.Builder contextPath(String contextPath)
- Parameters:
contextPath
- The context path of the current HTTP request, i.e. the path where the FORMCYCLE application is running.- Returns:
- this for chaining.
-
formCheckRequested
public HttpContextData.Builder formCheckRequested(boolean formCheckRequested)
- Parameters:
formCheckRequested
-true
to indicate the form should be validated on the server, orfalse
otherwise.- Returns:
- this for chaining.
-
formRequestType
public HttpContextData.Builder formRequestType(EFormRequestType formRequestType)
- Parameters:
formRequestType
- The form request type of the current HTTP request- Returns:
- this for chaining.
-
previewRequested
public HttpContextData.Builder previewRequested(boolean previewRequested)
- Parameters:
previewRequested
-true
if a preview was requested,false
otherwise.- Returns:
- this for chaining.
-
requestContext
public HttpContextData.Builder requestContext(IFormRequestContext requestContext)
Adds all data from the request context to this builder.- Parameters:
requestContext
- Request context with data to add to this builder.- Returns:
- this for chaining.
-
reviewRequested
public HttpContextData.Builder reviewRequested(boolean reviewRequested)
- Parameters:
reviewRequested
-true
if a review was requested (when opening a form in the inbox), orfalse
otherwise.- Returns:
- this for chaining.
-
saveRequested
public HttpContextData.Builder saveRequested(Boolean saveRequested)
- Parameters:
saveRequested
- Whether the form record should only be saved, i.e. when the user submitted the form via a save button.- Returns:
- this for chaining.
-
sessionAttributes
public HttpContextData.Builder sessionAttributes(Map<String,Serializable> sessionAttributesMap)
- Parameters:
sessionAttributesMap
- Session attributes of the current HTTP session, if one exists. If not given, an empty map is used.- Returns:
- this for chaining.
-
sessionId
public HttpContextData.Builder sessionId(String sessionId)
- Parameters:
sessionId
- The session ID of the current HTTP session. Empty string when there is not HTTP session.- Returns:
- this for chaining.
-
-