Package org.opencms.configuration
Class CmsElementWithAttrsParamConfigHelper
java.lang.Object
org.opencms.configuration.CmsElementWithAttrsParamConfigHelper
Helper class for parsing an element with no content but several attributes into a subclass of I_CmsConfigurationParameterHandler.
-
Constructor Summary
ConstructorDescriptionCmsElementWithAttrsParamConfigHelper
(String parentPath, String name, Class<?> cls, String... attrs) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRules
(org.apache.commons.digester3.Digester digester) Adds the configuration parsing rules to the digester.void
generateXml
(org.dom4j.Element parent, I_CmsConfigurationParameterHandler config) Generates the XML configuration from the given configuration object.Gets the xPath of the configuration element.
-
Constructor Details
-
CmsElementWithAttrsParamConfigHelper
public CmsElementWithAttrsParamConfigHelper(String parentPath, String name, Class<?> cls, String... attrs) Creates a new instance.- Parameters:
parentPath
- the parent XPathname
- the XML element namecls
- the class to use for the configuration (must be subclass of I_CmsConfigurationParameterHandler)attrs
- the attributes to read / write
-
-
Method Details
-
addRules
Adds the configuration parsing rules to the digester.- Parameters:
digester
- the digester to which the rules should be added
-
generateXml
Generates the XML configuration from the given configuration object.- Parameters:
parent
- the parent elementconfig
- the configuration
-
getBasePath
Gets the xPath of the configuration element.- Returns:
- the xPath of the configuration element
-