Interface FormEngineRequestHelper


  • public interface FormEngineRequestHelper
    Provides convenience methods for working with a HttpServletRequest in combination with the FormEngineService. In order to get an instance of this class, invoke FormEngineService.getRequestHelper(HttpServletRequest).
    • Method Detail

      • getFormEngineSession

        FormEngineSession getFormEngineSession​(String formVersionId)
        Returns an existing FormEngineSession for the specified formVersionId. This method only looks in the HttpSession.
        Parameters:
        formVersionId - the id of the formVersion for which to return a FormEngineSession
        Returns:
        an existing FormEngineSession for the specified formVersionId
      • getOrCreateFormEngineSession

        FormEngineSession getOrCreateFormEngineSession​(BasicFormVersion formVersion)
        Returns an existing FormEngineSession for the specified form version or creates a new one. FormEngineSessions are returned or created this way are stored in the HttpSession.
        Parameters:
        formVersion - the formVersion for which to return a FormEngineSession
        Returns:
        a new or existing FormEngineSession
      • endFormSession

        void endFormSession​(String formVersionId)
        Invalidates the FormEngineSession for the FormVersion with the specified id by removing it from the specified HttpSession.
        Parameters:
        formVersionId - the identifier of the FormVersion for which to invalidate the FormEngineSession
      • getAllSessions

        Set<String> getAllSessions()
        Returns the set of open form sessions bound to this request.
        Returns:
        The set of form sessions, or null is there is no HTTP session available.
      • updateStepState

        boolean updateStepState​(FormEngineSession engineSession)
        Updates the form state with the submitted values from the request.
        Parameters:
        engineSession - the session that should be updated
        Returns:
        whether updating was successfull. If this was not the case, further operations on the form session should not be performed!