|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.templating.Templating
An entry-point class for the functions of the templating package.
This class maintains a cache of XSLTemplate
objects,
managed via the getTemplate
and
purgeTemplate
methods.
Field Summary | |
static Class |
DEFAULT_PRESENTATION_MANAGER
|
static String |
FANCY_ERROR_COLLECTION
This is the name of the attribute that is set in the request whose value, if present, is a collection of TransformerExceptions that can be used to produce a "pretty" error. |
static String |
versionId
|
Constructor Summary | |
Templating()
|
Method Summary | |
static TemplatingConfig |
getConfig()
Gets the TemplatingConfig record. |
static PresentationManager |
getPresentationManager()
Deprecated. Use BebopConfig.getPresentationManager()
instead. |
static XSLTemplate |
getTemplate(javax.servlet.http.HttpServletRequest sreq)
Resolves and retrieves the template for the given request. |
static XSLTemplate |
getTemplate(javax.servlet.http.HttpServletRequest sreq,
boolean fancyErrors,
boolean useCache)
Resolves and retrieves the template for the given request. |
static XSLTemplate |
getTemplate(URL source)
Retrieves an XSL template. |
static XSLTemplate |
getTemplate(URL source,
boolean fancyErrors,
boolean useCache)
Retrieves an XSL template. |
static InputStream |
multiplexXSLFiles(Iterator paths)
Generates a stream containing imports for a number of URLs. |
static void |
purgeTemplate(URL source)
Removes an XSL template from the internal cache. |
static void |
purgeTemplates()
Removes all cached template objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
public static final Class DEFAULT_PRESENTATION_MANAGER
public static final String FANCY_ERROR_COLLECTION
Constructor Detail |
public Templating()
Method Detail |
public static TemplatingConfig getConfig()
TemplatingConfig
record.
TemplatingConfig
of this runtimepublic static PresentationManager getPresentationManager()
BebopConfig.getPresentationManager()
instead.
PresentationManager
interface which can be used to transform
an XML document into an output stream.
PresentationManager
interfacepublic static XSLTemplate getTemplate(URL source)
source
- the URL
to the top-level template
resource
XSLTemplate
instance representing
source
public static XSLTemplate getTemplate(URL source, boolean fancyErrors, boolean useCache)
source
- the URL
to the top-level template
resourcefancyErrors
- Should this place any xsl errors in the request
for use by another class. If this is true, the
the errors are stored for later use.useCache
- Should the templates be pulled from cache, if available?
True means they are pulled from cache. False means
they are pulled from the disk. If this is false
the pages are also not placed in the cache.
XSLTemplate
instance representing
source
public static XSLTemplate getTemplate(javax.servlet.http.HttpServletRequest sreq)
sreq
- The current request object
XSLTemplate
instancepublic static XSLTemplate getTemplate(javax.servlet.http.HttpServletRequest sreq, boolean fancyErrors, boolean useCache)
sreq
- The current request objectfancyErrors
- Should this place any xsl errors in the request
for use by another class. If this is true, the
the errors are stored for later use.useCache
- Should the templates be pulled from cache, if available?
True means they are pulled from cache. False means
they are pulled from the disk. If this is false
the pages are also not placed in the cache.
XSLTemplate
instancepublic static void purgeTemplate(URL source)
source
will be regenerated on the next request
for it.
source
- the URL
to the top-level template
resourcepublic static void purgeTemplates()
public static InputStream multiplexXSLFiles(Iterator paths)
paths
- An iterator of java.net.URL
objects
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |