|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.turbine.services.BaseInitable org.apache.turbine.services.BaseService org.apache.turbine.services.TurbineBaseService org.apache.jetspeed.services.template.JetspeedTemplateService
This service extends the TurbineTemplateService to modify its behaviour: Not only layout and screen packages, but also the screen templates are searched in the template neames filepath, so that a fallback strategy is provided, that can be used for multi-language, multi-device and browser-specific support support.
E.g: a template name "/html/en/US/IE/mytemplate" would search for following files (in the given order):
TurbineTemplateService part:
Field Summary |
Fields inherited from class org.apache.turbine.services.BaseService |
configuration, name, properties, serviceBroker |
Fields inherited from class org.apache.turbine.services.BaseInitable |
initableBroker, isInitialized |
Fields inherited from interface org.apache.turbine.services.Service |
SERVICE_NAME |
Constructor Summary | |
JetspeedTemplateService()
|
Method Summary | |
java.lang.String |
getDefaultExtension()
Get the default extension given in the properties file. |
java.lang.String |
getDefaultLayoutTemplate()
Get the default layout template given in the properties file. |
java.lang.String |
getDefaultNavigation()
Get the default Navigation given in the properties file. |
java.lang.String |
getDefaultScreen()
Get the Screen template given in the properties file. |
java.lang.String |
getLayoutTemplateName(java.lang.String name)
Locate and return the name of a layout template. |
java.lang.String |
getNavigationName(java.lang.String name)
Locate and return the name of a Navigation module. |
java.lang.String |
getScreenName(java.lang.String name)
Locate and return the name of a Screen module. |
java.lang.String |
getScreenTemplateName(java.lang.String key)
Locate and return the name of a screen template. |
void |
init(javax.servlet.ServletConfig config)
Called the first time the Service is used. |
protected java.lang.String |
parseNavigationTemplate(java.lang.String template)
Parse the template name out to a package path to locate the Navigation module. |
protected java.lang.String[] |
parseScreenTemplate(java.lang.String template)
This method takes the template parameter and parses it, so that relevant Screen/Layout-template information can be extracted. |
Methods inherited from class org.apache.turbine.services.TurbineBaseService |
init, init, init, shutdown |
Methods inherited from class org.apache.turbine.services.BaseService |
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker |
Methods inherited from class org.apache.turbine.services.BaseInitable |
getInit, getInitableBroker, setInit, setInitableBroker |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.turbine.services.Initable |
getInit, setInitableBroker |
Constructor Detail |
public JetspeedTemplateService()
Method Detail |
public void init(javax.servlet.ServletConfig config) throws org.apache.turbine.services.InitializationException
config
- A ServletConfig.
org.apache.turbine.services.InitializationException
public java.lang.String getDefaultScreen()
public java.lang.String getDefaultNavigation()
public java.lang.String getDefaultLayoutTemplate()
public java.lang.String getScreenTemplateName(java.lang.String key) throws java.lang.Exception
Exception,
- a generic exception.
java.lang.Exception
public java.lang.String getLayoutTemplateName(java.lang.String name) throws java.lang.Exception
name
- A String with the name of the template.
Exception,
- a generic exception.
java.lang.Exception
public java.lang.String getNavigationName(java.lang.String name) throws java.lang.Exception
name
- A String with the name of the template.
Exception,
- a generic exception.
java.lang.Exception
public java.lang.String getScreenName(java.lang.String name) throws java.lang.Exception
name
- A String with the name of the template.
Exception,
- a generic exception.
java.lang.Exception
public java.lang.String getDefaultExtension()
protected java.lang.String[] parseScreenTemplate(java.lang.String template) throws java.lang.Exception
template
- A String with the template name.
java.lang.Exception
protected java.lang.String parseNavigationTemplate(java.lang.String template)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |