public class DefaultTemplateManager extends BaseModuleManager implements TemplateManager
m_engineDEFAULT_TEMPLATE, DIRECTORY, I18NDEFAULT_LOCALE, I18NRESOURCE_EN, I18NRESOURCE_EN_ID, I18NRESOURCE_PREFIX, I18NRESOURCE_SUFFIX, I18NSERVER_TIMEZONE, PROPERTYFILE, RESOURCE_HTTPHEADER, RESOURCE_INCLUDES, RESOURCE_INLINECSS, RESOURCE_JSFUNCTION, RESOURCE_JSLOCALIZEDSTRINGS, RESOURCE_SCRIPT, RESOURCE_STYLESHEET, SKIN_DIRECTORY, TIMEFORMATPROPERTIESPLUGIN_RESOURCE_LOCATION| Constructor and Description |
|---|
DefaultTemplateManager(Engine engine,
java.util.Properties properties)
Creates a new TemplateManager.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
findJSP(javax.servlet.jsp.PageContext pageContext,
java.lang.String name)
A utility method for finding a JSP page.
|
java.lang.String |
findJSP(javax.servlet.jsp.PageContext pageContext,
java.lang.String template,
java.lang.String name)
Attempts to locate a resource under the given template.
|
java.lang.String |
findResource(Context ctx,
java.lang.String template,
java.lang.String name)
Attempts to locate a resource under the given template.
|
WikiModuleInfo |
getModuleInfo(java.lang.String moduleName)
Returns the
WikiModuleInfo information about the provided moduleName. |
java.util.Set<java.lang.String> |
listSkins(javax.servlet.jsp.PageContext pageContext,
java.lang.String template)
Lists the skins available under this template.
|
java.util.Map<java.lang.String,java.lang.String> |
listTimeFormats(javax.servlet.jsp.PageContext pageContext)
List all available timeformats, read from the jspwiki.properties
|
java.util.Collection<WikiModuleInfo> |
modules()
Returns a collection of modules currently managed by this ModuleManager.
|
boolean |
templateExists(java.lang.String templateName)
Check the existence of a template.
|
checkCompatibility, modulesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddResourceRequest, getJSLocalizedStrings, getMarker, getResourceRequests, getResourceTypes, listLanguages, listTimeZonescheckCompatibilitypublic DefaultTemplateManager(Engine engine, java.util.Properties properties)
engine - The owning engine.properties - The property list used to initialize this.public boolean templateExists(java.lang.String templateName)
templateExists in interface TemplateManagerpublic java.lang.String findJSP(javax.servlet.jsp.PageContext pageContext, java.lang.String name)
findJSP in interface TemplateManagerpageContext - the JSP PageContextname - The name of the JSP page to look for (e.g "Wiki.jsp")public java.lang.String findJSP(javax.servlet.jsp.PageContext pageContext, java.lang.String template, java.lang.String name)
Even though the name suggests only JSP files can be located, but in fact this method can find also other resources than JSP files.
findJSP in interface TemplateManagerpageContext - The JSP PageContexttemplate - From which template we should seek initially?name - Which resource are we looking for (e.g. "ViewTemplate.jsp")public java.lang.String findResource(Context ctx, java.lang.String template, java.lang.String name)
This method is typically used to locate any resource, including JSP pages, images, scripts, etc.
findResource in interface TemplateManagerctx - the wiki contexttemplate - the name of the template to usename - the name of the resource to finepublic java.util.Set<java.lang.String> listSkins(javax.servlet.jsp.PageContext pageContext, java.lang.String template)
listSkins in interface TemplateManagerpageContext - the JSP PageContexttemplate - The template to searchpublic java.util.Map<java.lang.String,java.lang.String> listTimeFormats(javax.servlet.jsp.PageContext pageContext)
listTimeFormats in interface TemplateManagerpageContext - page contextpublic java.util.Collection<WikiModuleInfo> modules()
modules in interface ModuleManagerpublic WikiModuleInfo getModuleInfo(java.lang.String moduleName)
WikiModuleInfo information about the provided moduleName.getModuleInfo in interface ModuleManagerCopyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.