org.apache.tapestry.record
Class AbstractPrefixedClientPropertyPersistenceScope
java.lang.Object
org.apache.tapestry.record.AbstractPrefixedClientPropertyPersistenceScope
- All Implemented Interfaces:
- ClientPropertyPersistenceScope
- Direct Known Subclasses:
- AppClientPropertyPersistenceScope, PageClientPropertyPersistenceScope
public abstract class AbstractPrefixedClientPropertyPersistenceScope
- extends Object
- implements ClientPropertyPersistenceScope
Base implementation of ClientPropertyPersistenceScope wherein
the scopes are recognized via a prefix on the page name to form the query parameter name.
Capiche?
- Since:
- 4.0
- Author:
- Howard Lewis Ship
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractPrefixedClientPropertyPersistenceScope
public AbstractPrefixedClientPropertyPersistenceScope(String prefix)
constructParameterName
public String constructParameterName(String pageName)
- Description copied from interface:
ClientPropertyPersistenceScope
- Constructs a parameter name for a particular page name. The parameter name can be recognized
(in a later request) by the
ClientPropertyPersistenceScope.isParameterForScope(String) method.
- Specified by:
constructParameterName in interface ClientPropertyPersistenceScope
- Parameters:
pageName - the name of the page for which a corresponding parameter name should be generated.
isParameterForScope
public boolean isParameterForScope(String parameterName)
- Description copied from interface:
ClientPropertyPersistenceScope
- Checks a parameter to see if it was the result of
ClientPropertyPersistenceScope.constructParameterName(String) for
this persistence scope.
- Specified by:
isParameterForScope in interface ClientPropertyPersistenceScope
- Parameters:
parameterName - a query parameter name
- Returns:
- true if the parameterName was genereted (i.e., is properly prefixed) by this scope,
false otherwise.
extractPageName
public String extractPageName(String parameterName)
- Description copied from interface:
ClientPropertyPersistenceScope
- Extracts a page name from a query parameter name.
- Specified by:
extractPageName in interface ClientPropertyPersistenceScope
- Parameters:
parameterName - the paramter name, for which {@link #isParameterForScope(String) must return true
- Returns:
- the name of the page
Copyright © 2006 Apache Software Foundation. All Rights Reserved.