org.kuali.rice.krad.web.form
Class UifFormManager

java.lang.Object
  extended by org.kuali.rice.krad.web.form.UifFormManager
All Implemented Interfaces:
Serializable

public class UifFormManager
extends Object
implements Serializable

Manages Uif form objects for a session

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Constructor Summary
UifFormManager()
          Create a new form manager with an empty list of forms for the session.
 
Method Summary
 void addSessionForm(UifFormBase form)
          Add a form to the session
protected  Vector getAccessedFormKeys()
          Internal vector maintained to keep track of accessed form and the order in which they were accessed
 int getMaxNumberOfSessionForms()
          Maximum number of forms that can be stored at one time by the manager
 UifFormBase getSessionForm(String formKey)
          Retrieve a form from the session
 boolean hasSessionForm(String formKey)
          Indicates whether the form manager has a session form with the given key
 void purgeForm(UifFormBase form)
          Removes the values that are marked @SessionTransient from the form.
 void removeFormWithHistoryFormsByKey(String formKey)
          Removes the stored form data and the forms from the breadcrumb history from the session
 void removeSessionForm(UifFormBase form)
          Removes the stored form data and the forms from the breadcrumb history from the session
 void removeSessionFormByKey(String formKey)
          Removes the stored form data from the session
 void setMaxNumberOfSessionForms(int maxNumberOfSessionForms)
          Setter for the maximum number of forms
 void updateFormWithSession(UifFormBase requestForm, String formKey)
          Retrieves the session form based on the formkey and updates the non session transient variables on the request form from the session form
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UifFormManager

public UifFormManager()
Create a new form manager with an empty list of forms for the session.

Method Detail

addSessionForm

public void addSessionForm(UifFormBase form)
Add a form to the session

Parameters:
form - to be added to the session

getSessionForm

public UifFormBase getSessionForm(String formKey)
Retrieve a form from the session

Parameters:
formKey - of the form to retrieve from the session
Returns:
UifFormBase

removeSessionForm

public void removeSessionForm(UifFormBase form)
Removes the stored form data and the forms from the breadcrumb history from the session

Parameters:
form - to be removed

removeFormWithHistoryFormsByKey

public void removeFormWithHistoryFormsByKey(String formKey)
Removes the stored form data and the forms from the breadcrumb history from the session

Parameters:
formKey - of the form to be removed

removeSessionFormByKey

public void removeSessionFormByKey(String formKey)
Removes the stored form data from the session

Parameters:
formKey - of the form to be removed

hasSessionForm

public boolean hasSessionForm(String formKey)
Indicates whether the form manager has a session form with the given key

Parameters:
formKey - key of the form in session to check for
Returns:
true if the manager contains the session form, false if not

updateFormWithSession

public void updateFormWithSession(UifFormBase requestForm,
                                  String formKey)
Retrieves the session form based on the formkey and updates the non session transient variables on the request form from the session form

Parameters:
requestForm -
formKey -

purgeForm

public void purgeForm(UifFormBase form)
Removes the values that are marked @SessionTransient from the form.

Parameters:
form - - the form from which the session transient values have been purged

getAccessedFormKeys

protected Vector getAccessedFormKeys()
Internal vector maintained to keep track of accessed form and the order in which they were accessed

Used for the form clearing process. When forms are added to the manager their key is added to the top of the vector. When a form needs to be cleared, the form identified by the key at the botton of this vector is removed

Returns:
Vector instance holding form key strings

getMaxNumberOfSessionForms

public int getMaxNumberOfSessionForms()
Maximum number of forms that can be stored at one time by the manager

Returns:
int max number of forms

setMaxNumberOfSessionForms

public void setMaxNumberOfSessionForms(int maxNumberOfSessionForms)
Setter for the maximum number of forms

Parameters:
maxNumberOfSessionForms -


Copyright © 2005-2014 The Kuali Foundation. All Rights Reserved.