|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface I_CmsTemplateContextProvider
Interface for template context providers.
Implementations of this class are used to dynamically determine a template used for rendering a page at runtime, e.g. there could be one template for desktop browsers and another for mobile browsers. It is possible to override the template using a cookie containing the name of the template context which should be used as a value. The cookie name is determined by the template context provider.
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,CmsTemplateContext> |
getAllContexts()
Gets a map of all template contexts, with the template context names as keys. |
java.lang.String |
getEditorStyleSheet(CmsObject cms,
java.lang.String editedResourcePath)
Returns the style sheet to be used for the editor. |
java.lang.String |
getOverrideCookieName()
Gets the name of the cookie which should be used for overriding the template context. |
CmsTemplateContext |
getTemplateContext(CmsObject cms,
javax.servlet.http.HttpServletRequest request,
CmsResource resource)
Determines the template context from the current CMS context, request, and resource. |
void |
initialize(CmsObject cms)
Initializes the context provider using a CMS object. |
| Method Detail |
|---|
java.util.Map<java.lang.String,CmsTemplateContext> getAllContexts()
java.lang.String getEditorStyleSheet(CmsObject cms,
java.lang.String editedResourcePath)
cms - the current CMS contexteditedResourcePath - the path of the edited resource
java.lang.String getOverrideCookieName()
CmsTemplateContext getTemplateContext(CmsObject cms,
javax.servlet.http.HttpServletRequest request,
CmsResource resource)
cms - the CMS contextrequest - the current requestresource - the resource being rendered
void initialize(CmsObject cms)
cms - the current CMS context
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||