public class CmsConfigurationReader
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static java.util.Locale |
DEFAULT_LOCALE
The default locale for configuration objects.
|
static java.lang.String |
N_ADD_FORMATTER
Node name for added formatters.
|
static java.lang.String |
N_ADD_FORMATTERS
Node name for the nested content with the added formatters.
|
static java.lang.String |
N_CREATE_CONTENTS_LOCALLY
The create content locally node name.
|
static java.lang.String |
N_DEFAULT
The default node name.
|
static java.lang.String |
N_DESCRIPTION
The description node name.
|
static java.lang.String |
N_DETAIL_PAGE
The detail page node name.
|
static java.lang.String |
N_DETAIL_PAGES_DISABLED
The detail pages disabled node name.
|
static java.lang.String |
N_DISABLED
The disabled node name.
|
static java.lang.String |
N_DISCARD_MODEL_PAGES
The discard model pages node name.
|
static java.lang.String |
N_DISCARD_PROPERTIES
The discard properties node name.
|
static java.lang.String |
N_DISCARD_TYPES
The discard types node name.
|
static java.lang.String |
N_DISPLAY_NAME
The display name node name.
|
static java.lang.String |
N_ERROR
The error node name.
|
static java.lang.String |
N_FOLDER
The folder node name.
|
static java.lang.String |
N_FORMATTER
The formatter node name.
|
static java.lang.String |
N_FUNCTION
The function node name.
|
static java.lang.String |
N_FUNCTION_REF
The function reference node name.
|
static java.lang.String |
N_IS_DEFAULT
The is default node name.
|
static java.lang.String |
N_IS_PREVIEW
The is preview node name.
|
static java.lang.String |
N_JSP
The JSP node name.
|
static java.lang.String |
N_MAX_WIDTH
The max width node name.
|
static java.lang.String |
N_MIN_WIDTH
The min width node name.
|
static java.lang.String |
N_MODEL_PAGE
The model page node name.
|
static java.lang.String |
N_NAME
The folder name node name.
|
static java.lang.String |
N_NAME_PATTERN
The name pattern node name.
|
static java.lang.String |
N_ORDER
The order node name.
|
static java.lang.String |
N_PAGE
The page node name.
|
static java.lang.String |
N_PATH
The folder path node name.
|
static java.lang.String |
N_PREFER_FOLDER
The prefer folder node name.
|
static java.lang.String |
N_PROPERTY
The property node name.
|
static java.lang.String |
N_PROPERTY_NAME
The property name node name.
|
static java.lang.String |
N_REMOVE_FORMATTER
Node name for removed formatters.
|
static java.lang.String |
N_REMOVE_FORMATTERS
Node name for the nested content with the removed formatters.
|
static java.lang.String |
N_RESOURCE_TYPE
The resource type node name.
|
static java.lang.String |
N_RULE_REGEX
The regex rule node name.
|
static java.lang.String |
N_RULE_TYPE
The rule type node name.
|
static java.lang.String |
N_TYPE
The type node name.
|
static java.lang.String |
N_TYPE_NAME
The type name node name.
|
static java.lang.String |
N_WIDGET
The widget node name.
|
static java.lang.String |
N_WIDGET_CONFIG
The widget configuration node name.
|
构造器和说明 |
---|
CmsConfigurationReader(CmsObject cms)
Creates a new configuration reader.
|
限定符和类型 | 方法和说明 |
---|---|
protected boolean |
getBoolean(I_CmsXmlContentLocation parent,
java.lang.String name)
Helper method to read a boolean value from the XML.
|
java.util.List<CmsFunctionReference> |
getFunctionReferences()
Returns the list of function references.
|
static java.lang.String |
getString(CmsObject cms,
I_CmsXmlContentValueLocation location)
Gets the string value of an XML content location.
|
protected java.lang.String |
getString(I_CmsXmlContentValueLocation location)
Gets the string value of an XML content location.
|
protected CmsADEConfigData |
mergeConfigurations(java.util.List<CmsADEConfigData> configurations)
Merges a list of multiple configuration objects into a single configuration object.
|
java.util.Set<java.lang.String> |
parseAddFormatters(I_CmsXmlContentLocation node)
Parses the formatters to add.
|
CmsADEConfigData |
parseConfiguration(java.lang.String basePath,
CmsXmlContent content)
Parses a configuration XML content and creates a configuration object from it.
|
protected void |
parseDetailPage(I_CmsXmlContentLocation node)
Parses the detail pages from an XML content node.
|
CmsFolderOrName |
parseFolderOrName(java.lang.String basePath,
I_CmsXmlContentLocation location)
Parses a folder which may either be given as a path or as a folder name.
|
CmsFormatterBean |
parseFormatter(java.lang.String typeName,
I_CmsXmlContentLocation node)
Parses a formatter bean.
|
protected CmsFormatterChangeSet |
parseFormatterChangeSet(I_CmsXmlContentLocation node)
Parses the formatter change set.
|
protected void |
parseFunctionReference(I_CmsXmlContentLocation node)
Parses a function reference node.
|
void |
parseModelPage(I_CmsXmlContentLocation node)
Parses model page data from the XML content.
|
static CmsPropertyConfig |
parseProperty(CmsObject cms,
I_CmsXmlContentLocation field)
Helper method to parse a property.
|
java.util.Set<java.lang.String> |
parseRemoveFormatters(I_CmsXmlContentLocation node)
Parses the set of formatters to remove.
|
void |
parseResourceTypeConfig(java.lang.String basePath,
I_CmsXmlContentLocation node)
Parses a resource type configuration element from the XML content.
|
CmsADEConfigData |
parseSitemapConfiguration(java.lang.String basePath,
CmsResource configRes)
Parses the sitemap configuration given the configuration file and base path.
|
CmsADEConfigData |
readModuleConfigurations()
Reads the configurations of all modules and combines them into a single configuration object.
|
public static final java.util.Locale DEFAULT_LOCALE
public static final java.lang.String N_ADD_FORMATTER
public static final java.lang.String N_ADD_FORMATTERS
public static final java.lang.String N_CREATE_CONTENTS_LOCALLY
public static final java.lang.String N_DEFAULT
public static final java.lang.String N_DESCRIPTION
public static final java.lang.String N_DETAIL_PAGE
public static final java.lang.String N_DETAIL_PAGES_DISABLED
public static final java.lang.String N_DISABLED
public static final java.lang.String N_DISCARD_MODEL_PAGES
public static final java.lang.String N_DISCARD_PROPERTIES
public static final java.lang.String N_DISCARD_TYPES
public static final java.lang.String N_DISPLAY_NAME
public static final java.lang.String N_ERROR
public static final java.lang.String N_FOLDER
public static final java.lang.String N_FORMATTER
public static final java.lang.String N_FUNCTION
public static final java.lang.String N_FUNCTION_REF
public static final java.lang.String N_IS_DEFAULT
public static final java.lang.String N_IS_PREVIEW
public static final java.lang.String N_JSP
public static final java.lang.String N_MAX_WIDTH
public static final java.lang.String N_MIN_WIDTH
public static final java.lang.String N_MODEL_PAGE
public static final java.lang.String N_NAME
public static final java.lang.String N_NAME_PATTERN
public static final java.lang.String N_ORDER
public static final java.lang.String N_PAGE
public static final java.lang.String N_PATH
public static final java.lang.String N_PREFER_FOLDER
public static final java.lang.String N_PROPERTY
public static final java.lang.String N_PROPERTY_NAME
public static final java.lang.String N_REMOVE_FORMATTER
public static final java.lang.String N_REMOVE_FORMATTERS
public static final java.lang.String N_RESOURCE_TYPE
public static final java.lang.String N_RULE_REGEX
public static final java.lang.String N_RULE_TYPE
public static final java.lang.String N_TYPE
public static final java.lang.String N_TYPE_NAME
public static final java.lang.String N_WIDGET
public static final java.lang.String N_WIDGET_CONFIG
public CmsConfigurationReader(CmsObject cms)
cms
- the CMS context which should be used to read the configuration data.public static java.lang.String getString(CmsObject cms, I_CmsXmlContentValueLocation location)
cms
- the CMS context to uselocation
- an XML content locationpublic static CmsPropertyConfig parseProperty(CmsObject cms, I_CmsXmlContentLocation field)
cms
- the CMS context to usefield
- the location of the parent valuepublic java.util.List<CmsFunctionReference> getFunctionReferences()
public java.util.Set<java.lang.String> parseAddFormatters(I_CmsXmlContentLocation node)
node
- the parent nodepublic CmsADEConfigData parseConfiguration(java.lang.String basePath, CmsXmlContent content) throws CmsException
basePath
- the base pathcontent
- the XML contentCmsException
- if something goes wrongpublic CmsFolderOrName parseFolderOrName(java.lang.String basePath, I_CmsXmlContentLocation location) throws CmsException
basePath
- the base path for the configurationlocation
- the XML content node from which to parse the folderCmsException
- if something goes wrongpublic CmsFormatterBean parseFormatter(java.lang.String typeName, I_CmsXmlContentLocation node)
typeName
- the type name for which the formatter is being parsednode
- the node from which to parse the formatter datapublic void parseModelPage(I_CmsXmlContentLocation node) throws CmsException
node
- the XML content nodeCmsException
- if something goes wrongpublic java.util.Set<java.lang.String> parseRemoveFormatters(I_CmsXmlContentLocation node)
node
- the parent nodepublic void parseResourceTypeConfig(java.lang.String basePath, I_CmsXmlContentLocation node) throws CmsException
basePath
- the base path of the configurationnode
- the XML configuration nodeCmsException
- if something goes wrongpublic CmsADEConfigData parseSitemapConfiguration(java.lang.String basePath, CmsResource configRes) throws CmsException
basePath
- the base pathconfigRes
- the configuration file resourceCmsException
- if something goes wrongpublic CmsADEConfigData readModuleConfigurations()
protected boolean getBoolean(I_CmsXmlContentLocation parent, java.lang.String name)
If the element is not found in the XML, false is returned.
parent
- the parent nodename
- the name of the XML content valueprotected java.lang.String getString(I_CmsXmlContentValueLocation location)
location
- an XML content locationprotected CmsADEConfigData mergeConfigurations(java.util.List<CmsADEConfigData> configurations)
configurations
- the list of configuration objects.protected void parseDetailPage(I_CmsXmlContentLocation node) throws CmsException
node
- the XML content nodeCmsException
- if something goes wrongprotected CmsFormatterChangeSet parseFormatterChangeSet(I_CmsXmlContentLocation node)
node
- the parent nodeprotected void parseFunctionReference(I_CmsXmlContentLocation node)
node
- the function reference node