info.magnolia.module.form.engine
Class FormStateUtil

java.lang.Object
  extended by info.magnolia.module.form.engine.FormStateUtil

public class FormStateUtil
extends Object

Utility class for storing FormState in session and getting the form state token from a request.


Field Summary
static String FORM_TOKEN_PARAMETER_NAME
           
 
Constructor Summary
FormStateUtil()
           
 
Method Summary
static FormState createAndSetFormState()
           
static void destroyFormState(FormState formState)
           
static FormState getFormState(String formStateToken)
           
static String getFormStateToken()
           
static FormState newFormState()
           
static void sendRedirect(String uuid)
           
static void sendRedirectWithToken(String uuid, String formExecutionToken)
           
static void sendRedirectWithTokenAndParameters(String uuid, String formExecutionToken, Map<String,String> parameters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORM_TOKEN_PARAMETER_NAME

public static final String FORM_TOKEN_PARAMETER_NAME
See Also:
Constant Field Values
Constructor Detail

FormStateUtil

public FormStateUtil()
Method Detail

createAndSetFormState

public static FormState createAndSetFormState()

newFormState

public static FormState newFormState()

getFormStateToken

public static String getFormStateToken()
                                throws FormStateTokenMissingException
Throws:
FormStateTokenMissingException

getFormState

public static FormState getFormState(String formStateToken)
                              throws NoSuchFormStateException
Throws:
NoSuchFormStateException

destroyFormState

public static void destroyFormState(FormState formState)

sendRedirect

public static void sendRedirect(String uuid)
                         throws javax.jcr.RepositoryException,
                                IOException
Throws:
javax.jcr.RepositoryException
IOException

sendRedirectWithToken

public static void sendRedirectWithToken(String uuid,
                                         String formExecutionToken)
                                  throws javax.jcr.RepositoryException,
                                         IOException
Throws:
javax.jcr.RepositoryException
IOException

sendRedirectWithTokenAndParameters

public static void sendRedirectWithTokenAndParameters(String uuid,
                                                      String formExecutionToken,
                                                      Map<String,String> parameters)
                                               throws javax.jcr.RepositoryException,
                                                      IOException
Throws:
javax.jcr.RepositoryException
IOException


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.