|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry.engine.DefaultSpecificationSource
public class DefaultSpecificationSource
Default implementation of ISpecificationSource
that
expects to use the normal class loader to locate component
specifications from within the classpath.
Caches specifications in memory forever, or until reset()
is invoked.
An instance of this class acts like a singleton and is shared by multiple sessions, so it must be threadsafe.
Constructor Summary | |
---|---|
DefaultSpecificationSource(IResourceResolver resolver,
IApplicationSpecification specification,
Pool pool)
|
Method Summary | |
---|---|
protected void |
discardParser(SpecificationParser parser)
|
INamespace |
getApplicationNamespace()
Returns the INamespace for the application. |
IComponentSpecification |
getComponentSpecification(IResourceLocation resourceLocation)
Gets a component specification. |
INamespace |
getFrameworkNamespace()
Returns the INamespace for the framework itself. |
ILibrarySpecification |
getLibrarySpecification(IResourceLocation resourceLocation)
Returns a LibrarySpecification with the given path. |
IComponentSpecification |
getPageSpecification(IResourceLocation resourceLocation)
Retrieves a component specification, parsing it as necessary. |
protected SpecificationParser |
getParser()
|
protected ILibrarySpecification |
parseLibrarySpecification(IResourceLocation resourceLocation)
|
protected IComponentSpecification |
parseSpecification(IResourceLocation resourceLocation,
boolean asPage)
|
void |
renderDescription(IMarkupWriter writer)
Object should render a description of itself to the writer. |
void |
reset()
Clears the specification cache. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultSpecificationSource(IResourceResolver resolver, IApplicationSpecification specification, Pool pool)
Method Detail |
---|
public void reset()
reset
in interface ISpecificationSource
protected IComponentSpecification parseSpecification(IResourceLocation resourceLocation, boolean asPage)
protected ILibrarySpecification parseLibrarySpecification(IResourceLocation resourceLocation)
public String toString()
toString
in class Object
public void renderDescription(IMarkupWriter writer)
IRenderDescription
renderDescription
in interface IRenderDescription
public IComponentSpecification getComponentSpecification(IResourceLocation resourceLocation)
getComponentSpecification
in interface ISpecificationSource
resourceLocation
- the complete resource path to the specification.
ApplicationRuntimeException
- if the specification cannot be obtained.public IComponentSpecification getPageSpecification(IResourceLocation resourceLocation)
ISpecificationSource
getPageSpecification
in interface ISpecificationSource
resourceLocation
- the location where the specification
may be read from.public ILibrarySpecification getLibrarySpecification(IResourceLocation resourceLocation)
ISpecificationSource
LibrarySpecification
with the given path.
getLibrarySpecification
in interface ISpecificationSource
resourceLocation
- the resource path of the specification
to returnprotected SpecificationParser getParser()
protected void discardParser(SpecificationParser parser)
public INamespace getApplicationNamespace()
ISpecificationSource
INamespace
for the application.
getApplicationNamespace
in interface ISpecificationSource
public INamespace getFrameworkNamespace()
ISpecificationSource
INamespace
for the framework itself.
getFrameworkNamespace
in interface ISpecificationSource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |