|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tapestry.record.RecordUtils
public final class RecordUtils
Utility methods to support implementations of
PropertyPersistenceStrategy
. This consists of code refactored
out of SessionPropertyPersistenceStrategy
to support other,
similar, persistence types with different rules for how long values are stored in the session.
Method Summary | |
---|---|
static PropertyChange |
buildChange(String key,
Object value)
Builds a PropertyChange instance for the given key and value pulled from the
WebSession . |
static String |
buildChangeKey(String strategyId,
String applicationId,
String pageName,
String idPath,
String propertyName)
Builds a change key, used to identify the change within the WebSession . |
static void |
iterateOverMatchingAttributes(String strategyId,
String applicationId,
String pageName,
WebSession session,
WebSessionAttributeCallback callback)
Iterates over the attributes stored in the session, invoking a callback on each one that matches the given prefix, applicationid and page name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static PropertyChange buildChange(String key, Object value)
PropertyChange
instance for the given key and value pulled from the
WebSession
.
key
- a key, previously created by
buildChangeKey(String, String, String, String, String)
, consisting of a
strategy id, application id, page name, id path (optional), and a property name,
all seperated by commas.value
- the value stored in the session with this key
PropertyChange
storing the property name and id path (if any), and the
valuepublic static void iterateOverMatchingAttributes(String strategyId, String applicationId, String pageName, WebSession session, WebSessionAttributeCallback callback)
strategyId
- a unique identifier for a particular implementation of
PropertyPersistenceStrategy
applicationId
- a unique id for the applicationpageName
- the name of the pagesession
- the session to searchcallback
- the callback to invoke on each matching attibute namepublic static String buildChangeKey(String strategyId, String applicationId, String pageName, String idPath, String propertyName)
WebSession
. A change key
can be used as a session attribute name, without reasonable fear of conflict.
strategyId
- a unique identifier for a particular implementation of
PropertyPersistenceStrategy
applicationId
- a unique identifier for the applicationpageName
- the name of the page containing the changeidPath
- the id path of the component within the page containing the page, possibly nullpropertyName
- the name of the property
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |