org.apache.tapestry.services
Interface ApplicationStatePersistenceStrategy

All Known Implementing Classes:
SessionApplicationStatePersistenceStrategy

public interface ApplicationStatePersistenceStrategy

Used by ApplicationStateManager to manage a specific kind of ASO persistence. The stategy is responsible for managing ASO instances within its domain.

See Also:
ApplicationStatePersistenceStrategySource

Method Summary
<T> boolean
exists(Class<T> asoClass)
          Returns true if the ASO already exists, false if null.
<T> T
get(Class<T> asoClass, ApplicationStateCreator<T> creator)
          Gets the ASO from the domain.
<T> void
set(Class<T> asoClass, T aso)
          Stores a new ASO, possibly replacing the existing one.
 

Method Detail

get

<T> T get(Class<T> asoClass,
          ApplicationStateCreator<T> creator)
Gets the ASO from the domain. If the ASO does not already exist, it is created and stored, then returned.


set

<T> void set(Class<T> asoClass,
             T aso)
Stores a new ASO, possibly replacing the existing one.

Type Parameters:
T -
Parameters:
asoClass -
aso - instance to store, or null to delete existing

exists

<T> boolean exists(Class<T> asoClass)
Returns true if the ASO already exists, false if null.



Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.