Class 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 of IHttpContextData.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • Builder

        public Builder()
    • 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 builder instance for chaining method calls.
      • 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 builder instance for chaining method calls.
      • formCheckRequested

        public HttpContextData.Builder formCheckRequested​(boolean formCheckRequested)
        Parameters:
        formCheckRequested - true to indicate the form should be validated on the server, or false otherwise.
        Returns:
        This builder instance for chaining method calls.
      • formRequestType

        public HttpContextData.Builder formRequestType​(EFormRequestType formRequestType)
        Parameters:
        formRequestType - The form request type of the current HTTP request
        Returns:
        This builder instance for chaining method calls.
      • frqSessionAttributes

        public HttpContextData.Builder frqSessionAttributes​(Map<Serializable,​Serializable> frqSessionAttributesMap)
        Parameters:
        frqSessionAttributesMap - Session attributes of the current FRQ session, if one exists. If not given, an empty map is used.
        Returns:
        This builder instance for chaining method calls.
      • frqSessionId

        public HttpContextData.Builder frqSessionId​(String frqSessionId)
        Parameters:
        frqSessionId - The ID of the current FRQ session. Empty string when no FRQ session exists.
        Returns:
        This builder instance for chaining method calls.
        Since:
        7.4.0
      • previewRequested

        public HttpContextData.Builder previewRequested​(boolean previewRequested)
        Parameters:
        previewRequested - true if a preview was requested, false otherwise.
        Returns:
        This builder instance for chaining method calls.
      • servletActionParams

        public HttpContextData.Builder servletActionParams​(IPluginServletActionParams params)
        Adds all data from the servlet action parameters to this builder.
        Parameters:
        params - Servlet action parameters with data to add to this builder.
        Returns:
        This builder instance for chaining method calls.
        Since:
        8.0.0
      • 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 builder instance for chaining method calls.
      • reviewRequested

        public HttpContextData.Builder reviewRequested​(boolean reviewRequested)
        Parameters:
        reviewRequested - true if a review was requested (when opening a form in the inbox), or false otherwise.
        Returns:
        This builder instance for chaining method calls.
      • 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 builder instance for chaining method calls.
      • 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 builder instance for chaining method calls.
      • sessionId

        public HttpContextData.Builder sessionId​(String sessionId)
        Parameters:
        sessionId - The session ID of the current HTTP session. Empty string when no HTTP session exists.
        Returns:
        This builder instance for chaining method calls.