org.tynamo.conversations.services
Class ConversationalPersistentFieldStrategy
java.lang.Object
org.tynamo.conversations.services.ConversationalPersistentFieldStrategy
- All Implemented Interfaces:
- org.apache.tapestry5.services.PersistentFieldStrategy
public class ConversationalPersistentFieldStrategy
- extends java.lang.Object
- implements org.apache.tapestry5.services.PersistentFieldStrategy
|
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(org.apache.tapestry5.services.Session session,
java.lang.String attributeName)
Called after each key is read by gatherFieldChanges(String). |
void |
discardChanges(java.lang.String pageName)
|
java.util.Collection<org.apache.tapestry5.services.PersistentFieldChange> |
gatherFieldChanges(java.lang.String pageName)
|
void |
postChange(java.lang.String pageName,
java.lang.String componentId,
java.lang.String fieldName,
java.lang.Object newValue)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConversationalPersistentFieldStrategy
public ConversationalPersistentFieldStrategy(org.apache.tapestry5.services.Request request,
ConversationManager conversationManager)
gatherFieldChanges
public final java.util.Collection<org.apache.tapestry5.services.PersistentFieldChange> gatherFieldChanges(java.lang.String pageName)
- Specified by:
gatherFieldChanges in interface org.apache.tapestry5.services.PersistentFieldStrategy
discardChanges
public void discardChanges(java.lang.String pageName)
- Specified by:
discardChanges in interface org.apache.tapestry5.services.PersistentFieldStrategy
didReadChange
protected void didReadChange(org.apache.tapestry5.services.Session session,
java.lang.String attributeName)
- Called after each key is read by
gatherFieldChanges(String). This implementation does nothing, subclasses
may override.
- Parameters:
session - the session from which a value was just readattributeName - the name of the attribute used to read a value
postChange
public final void postChange(java.lang.String pageName,
java.lang.String componentId,
java.lang.String fieldName,
java.lang.Object newValue)
- Specified by:
postChange in interface org.apache.tapestry5.services.PersistentFieldStrategy
convertApplicationValueToPersisted
protected java.lang.Object convertApplicationValueToPersisted(java.lang.Object newValue)
- Hook that allows a value to be converted as it is written to the session. Passed the new value provided by the
application, returns the object to be stored in the session. This implementation simply returns the provided value.
- Parameters:
newValue - non-null value
- Returns:
- persisted value
- See Also:
convertPersistedToApplicationValue(Object)
convertPersistedToApplicationValue
protected java.lang.Object convertPersistedToApplicationValue(java.lang.Object persistedValue)
- Converts a persisted value stored in the session back into an application value. This implementation returns the
persisted value as is.
- Parameters:
persistedValue - non-null persisted value
- Returns:
- application value
- See Also:
convertPersistedToApplicationValue(Object)
Copyright © 2004-2009. All Rights Reserved.