org.apache.tapestry.resolver
Class AbstractSpecificationResolver

java.lang.Object
  extended by org.apache.tapestry.resolver.AbstractSpecificationResolver
All Implemented Interfaces:
IPoolable
Direct Known Subclasses:
ComponentSpecificationResolver, PageSpecificationResolver

public class AbstractSpecificationResolver
extends Object
implements IPoolable

Base class for resolving a IComponentSpecification for a particular page or component, within a specified INamespace. In some cases, a search is necessary.

Since:
3.0
Version:
$Id: AbstractSpecificationResolver.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Constructor Summary
AbstractSpecificationResolver(IRequestCycle cycle)
           
 
Method Summary
 void discardFromPool()
          Does nothing.
protected  IResourceLocation getApplicationRootLocation()
          Returns the location of the servlet, within the servlet context.
 ISpecificationResolverDelegate getDelegate()
          Returns the ISpecificationResolverDelegate instance registered in the application specification as extension Tapestry.SPECIFICATION_RESOLVER_DELEGATE_EXTENSION_NAME, or null if no such extension exists.
 INamespace getNamespace()
          Returns the resolve namespace.
 IComponentSpecification getSpecification()
          Returns the resolved specification.
protected  ISpecificationSource getSpecificationSource()
          Returns the specification source for the running application.
protected  IResourceLocation getWebInfAppLocation()
          Returns the location of the application-specific subdirectory, under /WEB-INF/, in the servlet context.
protected  IResourceLocation getWebInfLocation()
          Returns the location of /WEB-INF/, in the servlet context.
protected  void reset()
          Clears the namespace, specification and simpleName properties.
 void resetForPool()
          Invokes reset()
protected  void setNamespace(INamespace namespace)
          Invoked in subclasses to identify the resolved namespace.
protected  void setSpecification(IComponentSpecification specification)
          Invoked in subclass to set the final specification the initial inputs are resolved to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSpecificationResolver

public AbstractSpecificationResolver(IRequestCycle cycle)
Method Detail

getDelegate

public ISpecificationResolverDelegate getDelegate()
Returns the ISpecificationResolverDelegate instance registered in the application specification as extension Tapestry.SPECIFICATION_RESOLVER_DELEGATE_EXTENSION_NAME, or null if no such extension exists.


getApplicationRootLocation

protected IResourceLocation getApplicationRootLocation()
Returns the location of the servlet, within the servlet context.


setNamespace

protected void setNamespace(INamespace namespace)
Invoked in subclasses to identify the resolved namespace.


getNamespace

public INamespace getNamespace()
Returns the resolve namespace.


getSpecificationSource

protected ISpecificationSource getSpecificationSource()
Returns the specification source for the running application.


getWebInfLocation

protected IResourceLocation getWebInfLocation()
Returns the location of /WEB-INF/, in the servlet context.


getWebInfAppLocation

protected IResourceLocation getWebInfAppLocation()
Returns the location of the application-specific subdirectory, under /WEB-INF/, in the servlet context.


getSpecification

public IComponentSpecification getSpecification()
Returns the resolved specification.


setSpecification

protected void setSpecification(IComponentSpecification specification)
Invoked in subclass to set the final specification the initial inputs are resolved to.


reset

protected void reset()
Clears the namespace, specification and simpleName properties.


discardFromPool

public void discardFromPool()
Does nothing.

Specified by:
discardFromPool in interface IPoolable

resetForPool

public void resetForPool()
Invokes reset()

Specified by:
resetForPool in interface IPoolable