|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jetspeed.locator.JetspeedTemplateLocator
public class JetspeedTemplateLocator
Jetspeed's default implementation of a template locator.
Constructor Summary | |
---|---|
JetspeedTemplateLocator(java.util.List roots,
java.util.List omClasses,
java.lang.String defaultLocatorType,
java.lang.String appRoot)
Assemble with list resource directory roots and OM classes and a defaultLocatorType. |
|
JetspeedTemplateLocator(java.util.List roots,
java.lang.String appRoot)
Minimal assembly with a list of resource directory roots. |
|
JetspeedTemplateLocator(java.util.List roots,
java.lang.String defaultLocatorType,
java.lang.String appRoot)
Construct with a root list and a default locator type. |
Method Summary | |
---|---|
LocatorDescriptor |
createFromString(java.lang.String path)
Creates a locator from a string of format (where brackets are optional]: template/ |
LocatorDescriptor |
createLocatorDescriptor(java.lang.String type)
Factory to create template locators of the given type. |
TemplateDescriptor |
locateTemplate(LocatorDescriptor locator)
Locate an template using Jetspeed template location algorithm |
java.util.Iterator |
query(LocatorDescriptor locator)
Query for a collection of templates given template locator criteria. |
void |
start()
|
void |
stop()
|
boolean |
templateExists(java.lang.String templateKey)
|
boolean |
templateExists(java.lang.String templateKey,
boolean useCache)
Checks for the existence of a template resource given a key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JetspeedTemplateLocator(java.util.List roots, java.lang.String appRoot) throws java.io.FileNotFoundException
roots
- A list of resource root directories where templates are located.appRoot
- Root from where this application runs
java.io.FileNotFoundException
public JetspeedTemplateLocator(java.util.List roots, java.lang.String defaultLocatorType, java.lang.String appRoot) throws java.io.FileNotFoundException
roots
- A list of resource root directories where templates are located.defaultLocatorType
- Under root directories, subdirectories represent locator types.
A locator type represents a classification of templates.
Any value is allowed. Use locator types to group templates together.
java.io.FileNotFoundException
public JetspeedTemplateLocator(java.util.List roots, java.util.List omClasses, java.lang.String defaultLocatorType, java.lang.String appRoot) throws java.io.FileNotFoundException
roots
- A list of resource root directories where templates are located.omClasses
- Template replacable object model implementations for Template and TemplateLocator.
Required order, with second optional: [ Template
, TemplateLocator
implementations.defaultLocatorType
- Under root directories, subdirectories represent locator types.
A locator type represents a classification of templates.
Any value is allowed. Use locator types to group templates together.
java.io.FileNotFoundException
Method Detail |
---|
public TemplateDescriptor locateTemplate(LocatorDescriptor locator)
TemplateLocator
locateTemplate
in interface TemplateLocator
locator
- The template locator
public boolean templateExists(java.lang.String templateKey, boolean useCache)
key
- The absolute path to the template resource.
public boolean templateExists(java.lang.String templateKey)
public LocatorDescriptor createFromString(java.lang.String path) throws TemplateLocatorException
TemplateLocator
createFromString
in interface TemplateLocator
path
- the string representation of a template locator
TemplateLocatorException
public LocatorDescriptor createLocatorDescriptor(java.lang.String type) throws TemplateLocatorException
TemplateLocator
portlet
email
createLocatorDescriptor
in interface TemplateLocator
TemplateLocatorException
- if factory exception or if not valid locator typepublic void start()
public void stop()
public java.util.Iterator query(LocatorDescriptor locator)
TemplateLocator
query
in interface TemplateLocator
locator
- The template locator criteria.
Template
objects matching the locator criteria.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |