org.kuali.rice.kns.web
Class EditablePropertiesHistoryHolder

java.lang.Object
  extended by org.kuali.rice.kns.web.EditablePropertiesHistoryHolder
All Implemented Interfaces:
Serializable

public class EditablePropertiesHistoryHolder
extends Object
implements Serializable

A class which will hold a Map of editable properties, dropping editable properties when too many are filled in.

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

Constructor Summary
EditablePropertiesHistoryHolder()
          Constructs the EditablePropertiesHistoryHolder
 
Method Summary
 String addEditablePropertiesToHistory(Set<String> editableProperties)
          Adds a Set of editable property names to the history, keyed with the given guid String.
 void clearEditableProperties(String guid)
          Clears out the editable properties associated with the given guid
protected  Set<String> createNewEditablePropertiesEntry()
           
 String generateNewGuid()
           
protected  KualiConfigurationService getConfigurationService()
           
 Set<String> getEditableProperties(String guid)
          Returns the editable properties registered with the current guid
protected  Map<String,Set<String>> getEditablePropertiesMap()
           
protected  Queue<String> getHistoryOrder()
           
 int getMaxHistoryLength()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditablePropertiesHistoryHolder

public EditablePropertiesHistoryHolder()
Constructs the EditablePropertiesHistoryHolder

Method Detail

getMaxHistoryLength

public int getMaxHistoryLength()
Returns:
the maximum length of the history that this will hold

addEditablePropertiesToHistory

public String addEditablePropertiesToHistory(Set<String> editableProperties)
Adds a Set of editable property names to the history, keyed with the given guid String. If the editable properties exceeds the buffer size, the earliest editable properties will be bumped

Parameters:
editableProperties - the Set of editable property names to save in the history
Returns:
a String to act as a key (or guid) to the editable properties

generateNewGuid

public String generateNewGuid()
Returns:
a newly generated Guid to act as a key to an editable properties Set

getEditableProperties

public Set<String> getEditableProperties(String guid)
Returns the editable properties registered with the current guid

Parameters:
guid - the guid to find editable properties for
Returns:
a Set of editable properties

clearEditableProperties

public void clearEditableProperties(String guid)
Clears out the editable properties associated with the given guid

Parameters:
guid - the guid to clear out editable properties for

getHistoryOrder

protected Queue<String> getHistoryOrder()
Returns:
the order of the entries as they chronologically were created

getEditablePropertiesMap

protected Map<String,Set<String>> getEditablePropertiesMap()
Returns:
the Map which associates editable property guids with Sets of editable property names

createNewEditablePropertiesEntry

protected Set<String> createNewEditablePropertiesEntry()
Returns:
a new Entry to hold the names of editable properties

getConfigurationService

protected KualiConfigurationService getConfigurationService()
Returns:
an implementation of the KualiConfigurationService


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.