Package org.opencms.xml.templatemapper
Class CmsTemplateMapperConfiguration
- java.lang.Object
-
- org.opencms.xml.templatemapper.CmsTemplateMapperConfiguration
-
public class CmsTemplateMapperConfiguration extends java.lang.Object
Configuration for the template mapper.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
A_ENABLED
XML attribute name.static java.lang.String
A_NEW
XML attribute name.static java.lang.String
A_OLD
XML attribute name.static CmsTemplateMapperConfiguration
EMPTY_CONFIG
Empty configuratin.static java.lang.String
N_ELEMENT_GROUP_TYPE
XML element name.static java.lang.String
N_FORMATTER_CONFIG
XML element name.static java.lang.String
N_FORMATTER_JSP
XML element name.static java.lang.String
N_PATH
XML element name.
-
Constructor Summary
Constructors Constructor Description CmsTemplateMapperConfiguration()
Creates 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMappedElementGroupType(java.lang.String type)
Gets the mapped type for a given element group type, or null if there is no mapped type.java.lang.String
getMappedFormatterConfiguration(java.lang.String id)
Gets the mapped formatter configuration structure id string for another formatter configuration structure id string.CmsUUID
getMappedFormatterJspId(CmsUUID formatterId)
Gets the mapped formatter JSP structure id for another formatter JSP structure id.boolean
isEnabledForPath(java.lang.String rootPath)
Checks if the mapping is enabled for the given root path.
-
-
-
Field Detail
-
A_ENABLED
public static final java.lang.String A_ENABLED
XML attribute name.- See Also:
- Constant Field Values
-
A_NEW
public static final java.lang.String A_NEW
XML attribute name.- See Also:
- Constant Field Values
-
A_OLD
public static final java.lang.String A_OLD
XML attribute name.- See Also:
- Constant Field Values
-
EMPTY_CONFIG
public static final CmsTemplateMapperConfiguration EMPTY_CONFIG
Empty configuratin.
-
N_FORMATTER_CONFIG
public static final java.lang.String N_FORMATTER_CONFIG
XML element name.- See Also:
- Constant Field Values
-
N_FORMATTER_JSP
public static final java.lang.String N_FORMATTER_JSP
XML element name.- See Also:
- Constant Field Values
-
N_ELEMENT_GROUP_TYPE
public static final java.lang.String N_ELEMENT_GROUP_TYPE
XML element name.- See Also:
- Constant Field Values
-
N_PATH
public static final java.lang.String N_PATH
XML element name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsTemplateMapperConfiguration
public CmsTemplateMapperConfiguration()
Creates an empty mapper configuration which is not active for any path.
-
CmsTemplateMapperConfiguration
public CmsTemplateMapperConfiguration(CmsObject cms, org.dom4j.Document doc) throws CmsException
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 Detail
-
getMappedElementGroupType
public java.lang.String getMappedElementGroupType(java.lang.String type)
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
public java.lang.String getMappedFormatterConfiguration(java.lang.String id)
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
public CmsUUID getMappedFormatterJspId(CmsUUID formatterId)
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
public boolean isEnabledForPath(java.lang.String rootPath)
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
-
-