Package org.opencms.xml.templatemapper
Class CmsTemplateMapperConfiguration
java.lang.Object
org.opencms.xml.templatemapper.CmsTemplateMapperConfiguration
Configuration for the template mapper.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
XML attribute name.static final String
XML attribute name.static final String
XML attribute name.static final CmsTemplateMapperConfiguration
Empty configuratin.static final String
XML element name.static final String
XML element name.static final String
XML element name.static final String
XML element name. -
Constructor Summary
ConstructorDescriptionCreates an empty mapper configuration which is not active for any path.CmsTemplateMapperConfiguration
(CmsObject cms, org.dom4j.Document doc) Parses a template mapper configuration from an XML document. -
Method Summary
Modifier and TypeMethodDescriptionGets the mapped type for a given element group type, or null if there is no mapped type.Gets the mapped formatter configuration structure id string for another formatter configuration structure id string.getMappedFormatterJspId
(CmsUUID formatterId) Gets the mapped formatter JSP structure id for another formatter JSP structure id.boolean
isEnabledForPath
(String rootPath) Checks if the mapping is enabled for the given root path.
-
Field Details
-
A_ENABLED
XML attribute name.- See Also:
-
A_NEW
XML attribute name.- See Also:
-
A_OLD
XML attribute name.- See Also:
-
EMPTY_CONFIG
Empty configuratin. -
N_FORMATTER_CONFIG
XML element name.- See Also:
-
N_FORMATTER_JSP
XML element name.- See Also:
-
N_ELEMENT_GROUP_TYPE
XML element name.- See Also:
-
N_PATH
XML element name.- See Also:
-
-
Constructor Details
-
CmsTemplateMapperConfiguration
public CmsTemplateMapperConfiguration()Creates an empty mapper configuration which is not active for any path. -
CmsTemplateMapperConfiguration
Parses a template mapper configuration from an XML document.- Parameters:
cms
- the current CMS contextdoc
- the XML document containing the configuration- Throws:
CmsException
- if something goes wrong
-
-
Method Details
-
getMappedElementGroupType
Gets the mapped type for a given element group type, or null if there is no mapped type.- Parameters:
type
- the original element group type- Returns:
- the mapped element group type
-
getMappedFormatterConfiguration
Gets the mapped formatter configuration structure id string for another formatter configuration structure id string.- Parameters:
id
- the structure id of a formatter configuration as a string- Returns:
- the mapped formatter configuration structure id of a string
-
getMappedFormatterJspId
Gets the mapped formatter JSP structure id for another formatter JSP structure id.- Parameters:
formatterId
- the input formatter JSP structure id- Returns:
- the mapped formatter JSP structure id
-
isEnabledForPath
Checks if the mapping is enabled for the given root path.- Parameters:
rootPath
- a VFS root path- Returns:
- true if the configuration is enabled for the given root path
-