org.apache.jetspeed.services.template
Interface TemplateLocatorService

All Superinterfaces:
org.apache.turbine.services.Initable, org.apache.turbine.services.Service
All Known Implementing Classes:
JetspeedTemplateLocatorService

public interface TemplateLocatorService
extends org.apache.turbine.services.Service

This interface is a facade for all template location related operations. Template location algorithms are different from the Velocity template location, since Jetspeed has a specialized template directory structure. This is a fix to get us through unti the TurbineTemplateService can locate resources by NLS and mediatype. Then it can be removed

The directory structure is currently layout out in the following order: /templateType/mediaType/LanguageCode/CountryCode

Example: /screens/html/en/US/resource.vm

Version:
$Id: TemplateLocatorService.java,v 1.8 2004/02/23 03:38:54 jford Exp $
Author:
David Sean Taylor, Paul Spencer, Chris Kimpton

Field Summary
static java.lang.String SERVICE_NAME
          The name of this service
 
Method Summary
 java.lang.String locateControllerTemplate(org.apache.turbine.util.RunData data, java.lang.String template)
          Locate a controller template using Jetspeed template location algorithm, searching by mediatype and language criteria extracted from the request state in rundata.
 java.lang.String locateControlTemplate(org.apache.turbine.util.RunData data, java.lang.String template)
          Locate a control template using Jetspeed template location algorithm, searching by mediatype and language criteria extracted from the request state in rundata.
 java.lang.String locateEmailTemplate(org.apache.turbine.util.RunData data, java.lang.String template)
          Locate an email template using Jetspeed template location algorithm, searching by language criteria extracted from the request state in rundata.
 java.lang.String locateEmailTemplate(org.apache.turbine.util.RunData data, java.lang.String template, java.util.Locale locale)
          Locate an email template using Jetspeed template location algorithm
 java.lang.String locateLayoutTemplate(org.apache.turbine.util.RunData data, java.lang.String template)
          Locate a layout template using Jetspeed template location algorithm, searching by mediatype and language criteria extracted from the request state in rundata.
 java.lang.String locateNavigationTemplate(org.apache.turbine.util.RunData data, java.lang.String template)
          Locate a navigation template using Jetspeed template location algorithm, searching by mediatype and language criteria extracted from the request state in rundata.
 java.lang.String locateParameterTemplate(org.apache.turbine.util.RunData data, java.lang.String template)
          Locate a parameter style template using Jetspeed template location algorithm, searching by mediatype and language criteria extracted from the request state in rundata.
 java.lang.String locatePortletTemplate(org.apache.turbine.util.RunData data, java.lang.String template)
          Locate a portlet template using Jetspeed template location algorithm, searching by mediatype and language criteria extracted from the request state in rundata.
 java.lang.String locateScreenTemplate(org.apache.turbine.util.RunData data, java.lang.String template)
          Locate a screen template using Jetspeed template location algorithm, searching by mediatype and language criteria extracted from the request state in rundata.
 
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
The name of this service

See Also:
Constant Field Values
Method Detail

locateScreenTemplate

public java.lang.String locateScreenTemplate(org.apache.turbine.util.RunData data,
                                             java.lang.String template)
Locate a screen template using Jetspeed template location algorithm, searching by mediatype and language criteria extracted from the request state in rundata.

Parameters:
data - The rundata for the request.
template - The name of the template.
Returns:
The path relative to the screens directory for the requested screen template, or null if not found.

locateLayoutTemplate

public java.lang.String locateLayoutTemplate(org.apache.turbine.util.RunData data,
                                             java.lang.String template)
Locate a layout template using Jetspeed template location algorithm, searching by mediatype and language criteria extracted from the request state in rundata.

Parameters:
data - The rundata for the request.
template - The name of the template.
Returns:
The path relative to the layouts directory for the requested layout template, or null if not found.

locatePortletTemplate

public java.lang.String locatePortletTemplate(org.apache.turbine.util.RunData data,
                                              java.lang.String template)
Locate a portlet template using Jetspeed template location algorithm, searching by mediatype and language criteria extracted from the request state in rundata.

Parameters:
data - The rundata for the request.
template - The name of the template.
Returns:
The path relative to the portlets directory for the requested portlet template, or null if not found.

locateControlTemplate

public java.lang.String locateControlTemplate(org.apache.turbine.util.RunData data,
                                              java.lang.String template)
Locate a control template using Jetspeed template location algorithm, searching by mediatype and language criteria extracted from the request state in rundata.

Parameters:
data - The rundata for the request.
template - The name of the template.
Returns:
The path relative to the controls directory for the requested control template, or null if not found.

locateControllerTemplate

public java.lang.String locateControllerTemplate(org.apache.turbine.util.RunData data,
                                                 java.lang.String template)
Locate a controller template using Jetspeed template location algorithm, searching by mediatype and language criteria extracted from the request state in rundata.

Parameters:
data - The rundata for the request.
template - The name of the template.
Returns:
The path relative to the controllers directory for the requested controller template, or null if not found.

locateNavigationTemplate

public java.lang.String locateNavigationTemplate(org.apache.turbine.util.RunData data,
                                                 java.lang.String template)
Locate a navigation template using Jetspeed template location algorithm, searching by mediatype and language criteria extracted from the request state in rundata.

Parameters:
data - The rundata for the request.
template - The name of the template.
Returns:
The path relative to the controllers directory for the requested controller template, or null if not found.

locateEmailTemplate

public java.lang.String locateEmailTemplate(org.apache.turbine.util.RunData data,
                                            java.lang.String template)
Locate an email template using Jetspeed template location algorithm, searching by language criteria extracted from the request state in rundata.

Parameters:
data - The rundata for the request.
template - The name of the template.
Returns:
The path relative to the emails directory for the requested email template, or null if not found.

locateEmailTemplate

public java.lang.String locateEmailTemplate(org.apache.turbine.util.RunData data,
                                            java.lang.String template,
                                            java.util.Locale locale)
Locate an email template using Jetspeed template location algorithm

Parameters:
data - The rundata for the request.
template - The name of the template.
locale - The locale of the template.
Returns:
The path relative to the emails directory for the requested email template, or null if not found.

locateParameterTemplate

public java.lang.String locateParameterTemplate(org.apache.turbine.util.RunData data,
                                                java.lang.String template)
Locate a parameter style template using Jetspeed template location algorithm, searching by mediatype and language criteria extracted from the request state in rundata.

Parameters:
data - The rundata for the request.
template - The name of the template.
Returns:
The path relative to the parameters directory for the requested portlet template, or null if not found.


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.