Interface IFormRequestContext

All Superinterfaces:
Serializable
All Known Subinterfaces:
IExtendedFormRequestContext
All Known Implementing Classes:
ExtendedFormRequestContext, FormRequestContext

public interface IFormRequestContext extends Serializable
A class with the relevant data of a form request, such as the current form or the authenticated user. A form request is any HTTP request regarding a form, such as an HTTP request (usually GET) that is made to get a new, empty form that can be filled out; or an HTTP request (usually POST) to submit the data from the filled-out form.
Author:
XIMA MEDIA GmbH
  • Method Details

    • getUserContext

      UserContext getUserContext()
      Returns:
      The current user context that contains information about the user that is currently logged in. This context is also used when you would like to open a connection to the database.
    • setUserContext

      void setUserContext(UserContext uc)
      Parameters:
      uc - The current user context that contains information about the user that is currently logged in. This context is also used when you would like to open a connection to the database.
    • getUserModel

      IUser getUserModel()
      Returns:
      The user who is currently logged in and requested the form. In case the user is not logged in, this will be an anonymous user.
    • setUserModel

      void setUserModel(IUser user)
      Parameters:
      user - The user who is currently logged in and requested the form. In case the user is not logged in, this will be an anonymous user.
    • getProjekt

      Projekt getProjekt()
      Returns:
      The Projekt which contains the form that was requested.
    • setProjekt

      void setProjekt(Projekt projekt)
      Parameters:
      projekt - The Projekt which contains the form that was requested.
    • getDoubleOptInData

      ProjectDOIData getDoubleOptInData()
      Returns:
      The double opt-in settings for the current form.
    • getIdentityCheckData

      ProjectIdentityCheckData getIdentityCheckData()
      Returns:
      The identity check settings for the current form.
    • setIdentityCheckData

      void setIdentityCheckData(ProjectIdentityCheckData data)
      Parameters:
      data - The identity check settings for the current form.
    • setDoubleOptInData

      void setDoubleOptInData(ProjectDOIData projekt)
      Parameters:
      projekt - The double opt-in settings for the current form.
    • getMandant

      Mandant getMandant()
      Returns:
      The Mandant to which the current form belongs to.
    • setMandant

      void setMandant(Mandant mandant)
      Parameters:
      mandant - The Mandant to which the current form belongs to.
    • getFormVersion

      FormVersion getFormVersion()
      Returns:
      The current FormVersion that was requested.
    • setFormVersion

      void setFormVersion(FormVersion formVersion)
      Parameters:
      formVersion - The current FormVersion that was requested.
    • getWorkflowVersion

      WorkflowVersion getWorkflowVersion()
      Returns:
      The current WorkflowVersion that was requested.
    • setWorkflowVersion

      void setWorkflowVersion(WorkflowVersion workflowVersion)
      Parameters:
      workflowVersion - The current WorkflowVersion that was requested.
    • getFrontendServer

      FrontendServer getFrontendServer()
      Returns:
      When the form request is made to a FrontendServer, that frontend server. Otherwise, when the form request is made directly to the master server, this return null.
    • setFrontendServer

      void setFrontendServer(FrontendServer frontendServer)
      Parameters:
      frontendServer - When the form request is made to a FrontendServer, that frontend server. Otherwise, when the form request is made directly to the master server, this return null.
    • getVorgang

      Vorgang getVorgang()
      Returns:
      The current Vorgang when the form was submitted; or null when a new empty form was just requested. Note that this may not represent the current state of the form record: for example, when submitting a form and the workflow is run, the workflow might modify some data of the form record, this will not be reflected here.
    • setVorgang

      void setVorgang(Vorgang vorgang)
      Parameters:
      vorgang - The current Vorgang when the form was submitted; or null when a new empty form was just requested.
    • getFormRecordLockContext

      IFormRecordLockContext getFormRecordLockContext()
      Returns:
      the form record locking context that is locking the form record of this request context
      Since:
      6.6.13 & 7.0.5
    • setFormRecordLockContext

      void setFormRecordLockContext(IFormRecordLockContext formRecordLockContext)
      Parameters:
      formRecordLockContext - the form record locking context that is locking the form record of this request context
      Since:
      6.6.13 & 7.0.5
    • getLocale

      Locale getLocale()
      Returns:
      The current locale that is to be used for locale-dependent operations.
    • setLocale

      void setLocale(Locale locale)
      Parameters:
      locale - The current locale that is to be used for locale-dependent operations.
    • isUseCurrentFv

      boolean isUseCurrentFv()
      Returns:
      true if the latest version of the form is to be used, false if a specific form version was requested.
    • setUseCurrentFv

      void setUseCurrentFv(boolean useCurrentFv)
      Parameters:
      useCurrentFv - true if the latest version of the form is to be used, false if a specific form version was requested.
    • getRequestType

      EFormRequestType getRequestType()
      Returns:
      The type of request that was made, eg. whether a new form was requested or a form was submitted.
    • setRequestType

      void setRequestType(EFormRequestType requestType)
      Parameters:
      requestType - The type of request that was made, eg. whether a new form was requested or a form was submitted.F
    • getSessionID

      String getSessionID()
      Returns:
      The current HttpSession ID.
    • setSessionID

      void setSessionID(String sessionID)
      Parameters:
      sessionID - The current HttpSession ID.
    • getBaseUrl

      String getBaseUrl()
      Returns:
      The base URL for this application, may not include the host.
    • setBaseUrl

      void setBaseUrl(String baseUrl)
      Parameters:
      baseUrl - The base URL for this application, may not include the host.
    • getContextPath

      String getContextPath()
      Returns:
      Returns the portion of the request URI that indicates the context of the request. The context path always comes first in a request URI. The path starts with a "/" character but does not end with a "/" character. For servlets in the default (root) context, this method returns "". The container does not decode this string.
    • setContextPath

      void setContextPath(String contextPath)
      Parameters:
      contextPath - Returns the portion of the request URI that indicates the context of the request. The context path always comes first in a request URI. The path starts with a "/" character but does not end with a "/" character. For servlets in the default (root) context, this method returns "". The container does not decode this string.
    • getFullRequestUrl

      String getFullRequestUrl()
      Returns:
      The full URL that was used to request the form, including all query params.
    • setFullRequestUrl

      void setFullRequestUrl(String fullRequestUrl)
      Parameters:
      fullRequestUrl - The full URL that was used to request the form, including all query params.
    • getSessionAttributeMap

      Map<String,Serializable> getSessionAttributeMap()
      Returns:
      A Map of all key-value pairs in the current HttpSession. Please note that changes to this map will not affect the HttpSession.
    • getFrqSessionAttributeMap

      Map<Serializable,Serializable> getFrqSessionAttributeMap()
      Returns:
      A Map of all key-value pairs in the current HttpSession. Please note that changes to this map will not affect the HttpSession.
    • setSessionAttributeMap

      void setSessionAttributeMap(Map<String,Serializable> attributes)
      Parameters:
      attributes - A Map of all key-value pairs in the current HttpSession. Please note that changes to this map will not affect the HttpSession.
    • getSessionTimeout

      Duration getSessionTimeout()
      Returns:
      The time it takes for an HTTP session on the server to timeout. This relates to the server which provided the form, the timeout may be different depending on the server.
      Since:
      7.2.1
    • setSessionTimeout

      void setSessionTimeout(Duration timeout)
      Parameters:
      timeout - The time it takes for an HTTP session on the server to timeout. This relates to the server which provided the form, the timeout may be different depending on the server.
      Since:
      7.2.1
    • getSession

      XfcSession getSession()
      Returns:
      The current formcycle session that contains additional information not contained in the HttpSession.
    • setSession

      void setSession(XfcSession session)
      Parameters:
      session - The current formcycle session that contains additional information not contained in the HttpSession.
    • getFRQSession

      FRQSession getFRQSession()
      Returns:
      The current form request session. A form request session is opened each time a form is requested. A single getSession() may contain multiple FRQSessions.
    • setFRQSession

      void setFRQSession(FRQSession formRequestSession)
      Parameters:
      formRequestSession - The current form request session. A form request session is opened each time a form is requested. A single getSession() may contain multiple FRQSessions.
    • isSaveOnly

      boolean isSaveOnly()
      Returns:
      true if a save button was used to submit the form. For the old workflow engine, this only saves the form data to the database and does not trigger the workflow. For the new workflow engine, the workflow is still processed, but the saved flag is set on the form record.
    • setSaveOnly

      void setSaveOnly(boolean saveOnly)
      Parameters:
      saveOnly - true if a save button was used to submit the form. For the old workflow engine, this only saves the form data to the database and does not trigger the workflow. For the new workflow engine, the workflow is still processed, but the saved flag is set on the form record.
    • isReview

      boolean isReview()
      Returns:
      true if a review was requested (when opening a form in the inbox), or false otherwise.
    • setReview

      void setReview(boolean isReview)
      Parameters:
      isReview - true if a review was requested (when opening a form in the inbox), or false otherwise.
    • isOldVersion

      boolean isOldVersion()
      Returns:
      true if an old version was requested, or false otherwise.
    • setOldVersion

      void setOldVersion(boolean isOldVersion)
      Parameters:
      isOldVersion - true if an old version was requested, or false otherwise.
    • isContinueProcessing

      boolean isContinueProcessing()
      Returns:
      true if this form request should be processed further, or false to indicate that processing should be aborted.
    • setContinueProcessing

      void setContinueProcessing(boolean continueProcessing)
      Parameters:
      continueProcessing - true if this form request should be processed further, or false to indicate that processing should be aborted.
    • isCheckForm

      boolean isCheckForm()
      Returns:
      true to indicate the form should be validated on the server, or false otherwise.
    • isSkipSubmitButtonValidation

      boolean isSkipSubmitButtonValidation()
      Returns:
      When true, the xf-action is not checked for whether it represents a valid submit button.
    • setSkipSubmitButtonValidation

      void setSkipSubmitButtonValidation(boolean skipSubmitButtonValidation)
      Parameters:
      skipSubmitButtonValidation - When true, the xf-action is not checked for whether it represents a valid submit button.
    • setCheckForm

      void setCheckForm(boolean checkForm)
      Parameters:
      checkForm - When true, the xf-action is not checked for whether it represents a valid submit button.
    • isAnonymize

      boolean isAnonymize()
      Returns:
      true to indicate the form submission should be made anonymously, or false otherwise. When the form is anonymized, no meta data is saved regarding the user who submitted the form.
    • setAnonymize

      void setAnonymize(boolean anonymize)
      Parameters:
      anonymize - true to indicate the form submission should be made anonymously, or false otherwise. When the form is anonymized, no meta data is saved regarding the user who submitted the form.
    • isResubmit

      boolean isResubmit()
      Returns:
      true when the form was not submitted for the first time and a Vorgang exists already, false otherwise.
    • setResubmit

      void setResubmit(boolean isResubmit)
      Parameters:
      isResubmit - true when the form was not submitted for the first time and a Vorgang exists already, false otherwise.
    • isPreview

      boolean isPreview()
      Returns:
      true if a preview was requested, false otherwise.
    • setPreview

      void setPreview(boolean isPreview)
      Parameters:
      isPreview - true if a preview was requested, false otherwise.
    • getFormData

      IFormDataAdapter getFormData()
      Returns:
      An IFormDataAdapter that can be used to access the current form data, ie. the submitted or already present values for each form field.
    • setFormData

      void setFormData(IFormDataAdapter formData)
      Parameters:
      formData - An IFormDataAdapter that can be used to access the current form data, ie. the submitted or already present values for each form field.
    • initFormData

      void initFormData(ParameterWrapper rp)
    • getParameterWrapper

      ParameterWrapper getParameterWrapper()
      !READ-ONLY model of the parsed request parameters. To initialize data user initFormData(ParameterWrapper) or getFormData() and IFormDataAdapter.init(Map) or setFormData(IFormDataAdapter)
      Returns:
      ParameterWrapper
    • isBenutzerZugriffAllowed

      boolean isBenutzerZugriffAllowed()
      Returns:
      true to indicate that the current Benutzer is allowed access to the request form, or false otherwise.
    • setBenutzerZugriffAllowed

      void setBenutzerZugriffAllowed(boolean isBenutzerZugriffAllowed)
      Parameters:
      isBenutzerZugriffAllowed - true to indicate that the current Benutzer is allowed access to the request form, or false otherwise.
    • isFrontendServerAllowed

      boolean isFrontendServerAllowed()
      Returns:
      true if the requested form may be served by the getFrontendServer(), or false otherwise.
    • setFrontenServerAllowed

      void setFrontenServerAllowed(boolean isFrontendServerAllowed)
      Parameters:
      isFrontendServerAllowed - true if the requested form may be served by the getFrontendServer(), or false otherwise.
    • getUserInboxes

      List<Postfach> getUserInboxes()
      Returns:
      A List of Postfachs which the current Benutzer can access.
    • getUserGroups

      List<BenutzerGruppe> getUserGroups()
      Returns:
      A List of BenutzerGruppes to which the current Benutzer belongs to.
    • createUserDataJSON

      com.alibaba.fastjson.JSONObject createUserDataJSON()
    • getValueParameters

      ValueParameters getValueParameters()
      Returns:
      All values that were submitted with this form request, ie. the values of the individual form elements. This excludes uploaded files, see getUploadParameters().
    • getHeaderParameters

      default HeaderParameters getHeaderParameters()
      Returns:
      (Read-only) map with all headers that were sent with the HTTP request.
    • getUploadParameters

      UploadParameters getUploadParameters()
      Returns:
      All files that were uploaded with this form request, usually via upload form elements.
    • getSingleFileUploadLimitBytes

      Long getSingleFileUploadLimitBytes()
      Returns:
      The upload limit in bytes for a single file upload. null when there is no restriction.
    • setSingleFileUploadLimitBytes

      void setSingleFileUploadLimitBytes(Long limit)
      Parameters:
      limit - The upload limit in bytes for a single file upload. null when there is no restriction.
    • isPreviewWithoutSave

      boolean isPreviewWithoutSave()
      Returns:
      true if the workflow should be processed, but the form data should not be saved. Used e.g. for generating a PDF preview.
    • setPreviewWithoutSave

      void setPreviewWithoutSave(boolean previewWithoutSave)
      Parameters:
      previewWithoutSave - true if the workflow should be processed, but the form data should not be saved. Used e.g. for generating a PDF preview.
    • isRerenderAfterValidationFailed

      boolean isRerenderAfterValidationFailed()
    • setRerenderAfterValidationFailed

      void setRerenderAfterValidationFailed(boolean rerenderAfterValidationFailed)
    • loadUserData

      @Deprecated void loadUserData(FormUserRequestData userData)
      Deprecated.
      load user data via setUserModel(IUser).
    • getUserProfile

      @Deprecated org.pac4j.core.profile.CommonProfile getUserProfile()
      Deprecated.
      get profile from IUser
    • setUserProfile

      @Deprecated void setUserProfile(org.pac4j.core.profile.CommonProfile userData)
      Deprecated.
      get profile from IUser
    • getBenutzerPostfaecher

      @Deprecated default List<Postfach> getBenutzerPostfaecher()
      Deprecated.
    • setBenutzerPostfaecher

      @Deprecated default void setBenutzerPostfaecher(List<Postfach> benutzerPostfaecher)
      Deprecated.
    • setUserInboxes

      @Deprecated void setUserInboxes(List<Postfach> benutzerPostfaecher)
      Deprecated.
      User inboxes should be determined by the user. Use setUserModel(IUser) with a user that has inboxes instead.
    • getBenutzerGruppen

      @Deprecated default List<BenutzerGruppe> getBenutzerGruppen()
      Deprecated.
    • setBenutzerGruppen

      @Deprecated default void setBenutzerGruppen(List<BenutzerGruppe> benutzerGruppen)
      Deprecated.
      User groups should be determined by the user. Use setUserModel(IUser) with a user that has user groups instead.
    • setUserGroups

      @Deprecated void setUserGroups(List<BenutzerGruppe> userGroups)
      Deprecated.
      User groups should be determined by the user. Use setUserModel(IUser) with a user that has user groups instead.
    • getSessionAttributes

      @Deprecated SessionAttributes getSessionAttributes()
      Deprecated.
    • setSessionAttributes

      @Deprecated void setSessionAttributes(SessionAttributes sessionAttributes)
    • setParameterWrapper

      @Deprecated void setParameterWrapper(ParameterWrapper parameterWrapper)
      Deprecated.
    • getCurrentBenutzer

      @Deprecated default Benutzer getCurrentBenutzer()
      Deprecated.
      Returns:
      the current user
    • setCurrentBenutzer

      @Deprecated default void setCurrentBenutzer(Benutzer benutzer)
      Deprecated.
      Parameters:
      benutzer - the user to set
    • getUseCurrentFv

      @Deprecated Boolean getUseCurrentFv()
      Deprecated.
    • getRequestContext

      @Deprecated default String getRequestContext()
      Deprecated.
      Returns:
      The value of getBaseUrl().
    • setRequestContext

      @Deprecated default void setRequestContext(String requestContext)
      Deprecated.
    • setRequestContest

      @Deprecated default void setRequestContest(String requestContext)
      Deprecated.
    • getUser

      @Deprecated default Benutzer getUser()
      Deprecated.
      Use getUserModel() instead.
      Returns:
      The user who is currently logged in and requested the form. In case the user is not logged in, this will be an anonymous user.
    • setUser

      @Deprecated default void setUser(Benutzer benutzer)
      Deprecated.
      Use getUserModel() instead.
      Parameters:
      benutzer - The user who is currently logged in and requested the form. In case the user is not logged in, this will be an anonymous user.