|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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 Objectpublic void renderDescription(IMarkupWriter writer)
IRenderDescription
renderDescription in interface IRenderDescriptionpublic IComponentSpecification getComponentSpecification(IResourceLocation resourceLocation)
getComponentSpecification in interface ISpecificationSourceresourceLocation - the complete resource path to the specification.
ApplicationRuntimeException - if the specification cannot be obtained.public IComponentSpecification getPageSpecification(IResourceLocation resourceLocation)
ISpecificationSource
getPageSpecification in interface ISpecificationSourceresourceLocation - the location where the specification
may be read from.public ILibrarySpecification getLibrarySpecification(IResourceLocation resourceLocation)
ISpecificationSourceLibrarySpecification with the given path.
getLibrarySpecification in interface ISpecificationSourceresourceLocation - the resource path of the specification
to returnprotected SpecificationParser getParser()
protected void discardParser(SpecificationParser parser)
public INamespace getApplicationNamespace()
ISpecificationSourceINamespace for the application.
getApplicationNamespace in interface ISpecificationSourcepublic INamespace getFrameworkNamespace()
ISpecificationSourceINamespace for the framework itself.
getFrameworkNamespace in interface ISpecificationSource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||