org.jaffa.presentation.portlet.session
Class WidgetCache

java.lang.Object
  extended byorg.jaffa.presentation.portlet.session.WidgetCache

public class WidgetCache
extends Object

An instance of this class is used by components to cache the various widget models, across all the FormBeans.


Constructor Summary
WidgetCache()
           
 
Method Summary
 void addModel(String fieldName, WidgetModel model)
          Adds a widget model to the cache.
 void clear()
          Removes all widget models from the cache.
 WidgetModel getModel(String fieldName)
          Returns a widget model for the input fieldName from the cache.
 WidgetModel removeModel(String fieldName)
          Removes the widget model for the input fieldName from the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WidgetCache

public WidgetCache()
Method Detail

getModel

public WidgetModel getModel(String fieldName)
Returns a widget model for the input fieldName from the cache.

Parameters:
fieldName - the field for which the model is to be retrieved.
Returns:
a widget model for the input fieldName from the cache.

addModel

public void addModel(String fieldName,
                     WidgetModel model)
Adds a widget model to the cache.

Parameters:
fieldName - the field for which the model is to be cached.
model - the model to be cached.

removeModel

public WidgetModel removeModel(String fieldName)
Removes the widget model for the input fieldName from the cache.

Parameters:
fieldName - the field for which the model is to be removed.
Returns:
previous widget model associated with specified fieldName, or null if there was no widget model for fieldName.

clear

public void clear()
Removes all widget models from the cache.



Copyright © 2002-2004 JAFFA Project.