public final class CmsTemplateMapper extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
m_configPath
The path to the mapper configuration.
|
protected boolean |
m_enabled
Flag which controls whether this is enabled.
|
Constructor and Description |
---|
CmsTemplateMapper(java.lang.String configPath)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
static CmsTemplateMapper |
get()
Gets a template mapper.
|
static CmsTemplateMapper |
get(javax.servlet.ServletRequest request)
Gets the template mapper for the current request.
|
static java.lang.String |
getTemplateMapperConfig(javax.servlet.ServletRequest request)
Checks if the selected template context is "templatemapper".
|
void |
setForSave(boolean forSave)
Sets the for-save mode.
|
protected CmsContainerElementBean |
transformContainerElement(CmsObject cms,
CmsTemplateMapperConfiguration config,
CmsContainerElementBean element)
Helper method to transform a single container element.
|
CmsContainerPageBean |
transformContainerpageBean(CmsObject cms,
CmsContainerPageBean input,
java.lang.String rootPath)
Transforms a container page bean.
|
CmsContainerElementBean |
transformDetailElement(CmsObject cms,
CmsContainerElementBean input,
java.lang.String rootPath)
Transforms a container element bean used for detail elements.
|
CmsGroupContainerBean |
transformGroupContainer(CmsObject cms,
CmsGroupContainerBean input,
java.lang.String rootPath)
Transforms a group container bean.
|
protected boolean m_enabled
protected java.lang.String m_configPath
public CmsTemplateMapper(java.lang.String configPath)
configPath
- the template mapper configuration VFS pathpublic static CmsTemplateMapper get()
public static CmsTemplateMapper get(javax.servlet.ServletRequest request)
request
- the current requestpublic static java.lang.String getTemplateMapperConfig(javax.servlet.ServletRequest request)
request
- the current requestpublic void setForSave(boolean forSave)
forSave
- true if for-save mode should be enabledpublic CmsContainerPageBean transformContainerpageBean(CmsObject cms, CmsContainerPageBean input, java.lang.String rootPath)
cms
- the current CMS contextinput
- the bean to be transformedrootPath
- the root path of the pagepublic CmsContainerElementBean transformDetailElement(CmsObject cms, CmsContainerElementBean input, java.lang.String rootPath)
cms
- the current CMS contextinput
- the bean to be transformedrootPath
- the root path of the pagepublic CmsGroupContainerBean transformGroupContainer(CmsObject cms, CmsGroupContainerBean input, java.lang.String rootPath)
cms
- the current CMS contextinput
- the input bean to be transformedrootPath
- the root path of the container pageprotected CmsContainerElementBean transformContainerElement(CmsObject cms, CmsTemplateMapperConfiguration config, CmsContainerElementBean element)
cms
- the CMS contextconfig
- the configurationelement
- the container element to be transformed