|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry5.internal.services.AbstractSessionPersistentFieldStrategy
public abstract class AbstractSessionPersistentFieldStrategy
Base class for strategies that store their values as keys in the session. Implements a uniform format for the keys, based on a prefix to identify the particular strategy.
| Constructor Summary | |
|---|---|
protected |
AbstractSessionPersistentFieldStrategy(java.lang.String prefix,
Request request)
|
| Method Summary | |
|---|---|
protected java.lang.Object |
convertApplicationValueToPersisted(java.lang.Object newValue)
Hook that allows a value to be converted as it is written to the session. |
protected java.lang.Object |
convertPersistedToApplicationValue(java.lang.Object persistedValue)
Converts a persisted value stored in the session back into an application value. |
protected void |
didReadChange(Session session,
java.lang.String attributeName)
Called after each key is read by gatherFieldChanges(String). |
void |
discardChanges(java.lang.String pageName)
Discards any saved changes for the name page. |
java.util.Collection<PersistentFieldChange> |
gatherFieldChanges(java.lang.String pageName)
Finds all persistent changes previously stored for the named page (for the current active session or client). |
void |
postChange(java.lang.String pageName,
java.lang.String componentId,
java.lang.String fieldName,
java.lang.Object newValue)
Posts a change of a persistent property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractSessionPersistentFieldStrategy(java.lang.String prefix,
Request request)
| Method Detail |
|---|
public final java.util.Collection<PersistentFieldChange> gatherFieldChanges(java.lang.String pageName)
PersistentFieldStrategy
gatherFieldChanges in interface PersistentFieldStrategypublic void discardChanges(java.lang.String pageName)
PersistentFieldStrategy
discardChanges in interface PersistentFieldStrategypageName - logical name of page whose field persistent data should be discarded
protected void didReadChange(Session session,
java.lang.String attributeName)
gatherFieldChanges(String). This implementation does nothing,
subclasses may override.
session - the session from which a value was just readattributeName - the name of the attribute used to read a value
public final void postChange(java.lang.String pageName,
java.lang.String componentId,
java.lang.String fieldName,
java.lang.Object newValue)
PersistentFieldStrategy
postChange in interface PersistentFieldStrategypageName - the name of the page containing the componentcomponentId - the nested id path of the component (or null for the page's root component)fieldName - the name of the field whose persistent value has changednewValue - the new value for the field, possibly nullprotected java.lang.Object convertApplicationValueToPersisted(java.lang.Object newValue)
newValue - non-null value
convertPersistedToApplicationValue(Object)protected java.lang.Object convertPersistedToApplicationValue(java.lang.Object persistedValue)
persistedValue - non-null persisted value
convertPersistedToApplicationValue(Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||