Package org.opencms.ade.configuration
Class CmsADEConfigDataInternal
- java.lang.Object
-
- org.opencms.ade.configuration.CmsADEConfigDataInternal
-
public class CmsADEConfigDataInternal extends java.lang.Object
Represents a parsed sitemap or module configuration.This is the internal representation stored in the cache. The configuration class which is actually returned by CmsADEManager, and which contains most of the logic related to sitemap configurations, is CmsADEConfigData.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsADEConfigDataInternal.AttributeValue
Represents the value of an attribute, with additional information about where the value originated from.
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_createContentsLocally
The "create contents locally" flag.protected boolean
m_discardInheritedModelPages
Should inherited model pages be discarded?protected boolean
m_discardInheritedTypes
Should inherited types be discarded?protected org.opencms.ade.configuration.CmsConfigurationReader.DiscardPropertiesMode
m_discardPropertiesMode
The 'discard properties' mode.protected CmsFormatterChangeSet
m_formatterChangeSet
The configured formatter changes.protected boolean
m_includeInSiteSelector
True if subsite should be included in site selector.protected boolean
m_isModuleConfig
True if this is a module configuration, not a normal sitemap configuration.protected java.util.List<CmsUUID>
m_masterConfigs
The master configuration structure ids.protected java.lang.Boolean
m_useFormatterKeys
Mode for using formatter keys / the new container page format.
-
Constructor Summary
Constructors Modifier Constructor Description CmsADEConfigDataInternal(java.lang.String basePath)
Creates an empty configuration data object with a given base path.CmsADEConfigDataInternal(CmsObject cms, CmsResource resource, boolean isModuleConfig, java.lang.String basePath, java.util.List<CmsUUID> masterConfigs, java.util.List<CmsResourceTypeConfig> resourceTypeConfig, CmsGalleryDisabledTypesMode galleryDisabledTypesMode, CmsGalleryDisabledTypesMode galleryDisabledFunctionsMode, boolean discardInheritedTypes, java.util.List<CmsPropertyConfig> propertyConfig, org.opencms.ade.configuration.CmsConfigurationReader.DiscardPropertiesMode discardPropertiesMode, java.util.List<CmsDetailPageInfo> detailPageInfos, java.util.List<CmsModelPageConfigWithoutResource> modelPages, java.util.List<CmsFunctionReference> functionReferences, boolean discardInheritedModelPages, boolean createContentsLocally, boolean preferDetailPagesForLocalContents, boolean excludeExternalDetailContents, boolean includeInSiteSelector, CmsFormatterChangeSet formatterChangeSet, boolean removeAllFunctions, java.util.Set<CmsUUID> functionIds, java.util.Set<CmsUUID> functionsToRemove, boolean removeAllPlugins, java.util.Set<CmsUUID> addedPlugins, java.util.Set<CmsUUID> removedPlugins, java.lang.Boolean useFormatterKeys, CmsTypeOrderingMode orderingMode, CmsAddContentRestriction restriction, CmsUUID sharedSettingOverride, boolean removeSharedSettingOverrides, CmsUUID attributeEditorConfigId, java.util.Map<java.lang.String,java.lang.String> attributes)
Creates a new configuration data instance.protected
CmsADEConfigDataInternal(CmsResource resource, boolean isModuleConfig, java.lang.String basePath, java.util.List<CmsUUID> masterConfigs, java.util.List<CmsResourceTypeConfig> resourceTypeConfig, boolean discardInheritedTypes, java.util.List<CmsPropertyConfig> propertyConfig, org.opencms.ade.configuration.CmsConfigurationReader.DiscardPropertiesMode discardPropertiesMode, java.util.List<CmsDetailPageInfo> detailPageInfos, java.util.List<CmsModelPageConfig> modelPages, java.util.List<CmsFunctionReference> functionReferences, boolean discardInheritedModelPages, boolean createContentsLocally, boolean preferDetailPagesForLocalContents, boolean excludeExternalDetailContents, boolean includeInSiteSelector, CmsFormatterChangeSet formatterChangeSet, boolean removeAllFunctions, java.util.Set<CmsUUID> functionIds)
Creates a new configuration data instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CmsADEConfigDataInternal
emptyConfiguration(java.lang.String basePath)
Creates an empty configuration for a given base path.CmsAddContentRestriction
getAddContentRestriction()
Gets the restrictions for the 'Add content' dialog.java.util.Set<CmsUUID>
getAddedPlugins()
Gets the set of ids of added site plugins.CmsUUID
getAttributeEditorConfigId()
Gets the structure id of the sitemap attribute editor configurationjava.util.Map<java.lang.String,CmsADEConfigDataInternal.AttributeValue>
getAttributes()
Gets the map of attributes for this sitemap configuration.java.lang.String
getBasePath()
Gets the base path.CmsGalleryDisabledTypesMode
getDisabledTypeMode()
Gets the display mode for deactivated types in the sitemap dialog.org.opencms.ade.configuration.CmsConfigurationReader.DiscardPropertiesMode
getDiscardPropertiesMode()
Gets the 'discard properties' mode.java.util.Collection<CmsUUID>
getDynamicFunctions()
Returns the set of configured dynamic functions, regardless of whether the 'remove all formatters' option is enabled.CmsFormatterChangeSet
getFormatterChangeSet()
Gets the formatter change set.java.util.List<CmsFunctionReference>
getFunctionReferences()
Gets the dynamic function references.java.util.Collection<CmsUUID>
getFunctionsToRemove()
Gets the ids of dynamic functions to remove.CmsGalleryDisabledTypesMode
getGalleryDisabledFunctionsMode()
java.util.List<CmsUUID>
getMasterConfigs()
Gets the structure ids of the master configuration files.java.util.List<CmsDetailPageInfo>
getOwnDetailPages()
Returns the ownDetailPages.java.util.List<CmsModelPageConfig>
getOwnModelPageConfig()
Returns the ownModelPageConfig.java.util.List<CmsPropertyConfig>
getOwnPropertyConfigurations()
Returns the ownPropertyConfigurations.java.util.List<CmsResourceTypeConfig>
getOwnResourceTypes()
Gets the resource types defined in this configuration.java.util.Set<CmsUUID>
getRemovedPlugins()
Gets the set of ids of removed site plugins.CmsResource
getResource()
Returns the resource.CmsUUID
getSharedSettingOverride()
Gets the shared setting override ID (may be null).CmsTypeOrderingMode
getTypeOrderingMode()
Gets the type ordering mode.java.lang.Boolean
getUseFormatterKeys()
Gets the 'use formatter keys' mode.boolean
isCreateContentsLocally()
Returns true if contents should be created in the sub-sitemap.boolean
isDiscardInheritedModelPages()
Returns true if inherited model pages should be discarded.boolean
isDiscardInheritedProperties()
Returns true if inherited properties should be discarded.boolean
isDiscardInheritedTypes()
Returns true if inherited types should be discarded.boolean
isExcludeExternalDetailContents()
Returns true if detail pages inside this subsite (and descendant subsites) should not be used for contents outside the subsite (and descendant subsites).boolean
isIncludeInSiteSelector()
Returns true if the subsite should be included in the site selector.boolean
isModuleConfig()
Returns the isModuleConfig.boolean
isPreferDetailPagesForLocalContents()
Returns true if detail pages from this sitemap should be preferred for creating links to detail contents located inside this sitemap.boolean
isRemoveAllFunctions()
True if all functions should be removed by this sitemap configuration.boolean
isRemoveAllPlugins()
Returns true if all site plugins inherited from parent sitemaps should be removed.boolean
isRemoveSharedSettingOverrides()
Returns true if shared setting overrides inherited from other sitemap configurations should be discarded.protected void
mergeParent(CmsADEConfigDataInternal parent)
Merges the parent's data into this object.protected void
processModuleOrdering()
Handle the ordering from the module configurations.
-
-
-
Field Detail
-
m_createContentsLocally
protected boolean m_createContentsLocally
The "create contents locally" flag.
-
m_discardInheritedModelPages
protected boolean m_discardInheritedModelPages
Should inherited model pages be discarded?
-
m_discardInheritedTypes
protected boolean m_discardInheritedTypes
Should inherited types be discarded?
-
m_discardPropertiesMode
protected org.opencms.ade.configuration.CmsConfigurationReader.DiscardPropertiesMode m_discardPropertiesMode
The 'discard properties' mode.
-
m_formatterChangeSet
protected CmsFormatterChangeSet m_formatterChangeSet
The configured formatter changes.
-
m_includeInSiteSelector
protected boolean m_includeInSiteSelector
True if subsite should be included in site selector.
-
m_isModuleConfig
protected boolean m_isModuleConfig
True if this is a module configuration, not a normal sitemap configuration.
-
m_masterConfigs
protected java.util.List<CmsUUID> m_masterConfigs
The master configuration structure ids.
-
m_useFormatterKeys
protected java.lang.Boolean m_useFormatterKeys
Mode for using formatter keys / the new container page format.
-
-
Constructor Detail
-
CmsADEConfigDataInternal
public CmsADEConfigDataInternal(CmsObject cms, CmsResource resource, boolean isModuleConfig, java.lang.String basePath, java.util.List<CmsUUID> masterConfigs, java.util.List<CmsResourceTypeConfig> resourceTypeConfig, CmsGalleryDisabledTypesMode galleryDisabledTypesMode, CmsGalleryDisabledTypesMode galleryDisabledFunctionsMode, boolean discardInheritedTypes, java.util.List<CmsPropertyConfig> propertyConfig, org.opencms.ade.configuration.CmsConfigurationReader.DiscardPropertiesMode discardPropertiesMode, java.util.List<CmsDetailPageInfo> detailPageInfos, java.util.List<CmsModelPageConfigWithoutResource> modelPages, java.util.List<CmsFunctionReference> functionReferences, boolean discardInheritedModelPages, boolean createContentsLocally, boolean preferDetailPagesForLocalContents, boolean excludeExternalDetailContents, boolean includeInSiteSelector, CmsFormatterChangeSet formatterChangeSet, boolean removeAllFunctions, java.util.Set<CmsUUID> functionIds, java.util.Set<CmsUUID> functionsToRemove, boolean removeAllPlugins, java.util.Set<CmsUUID> addedPlugins, java.util.Set<CmsUUID> removedPlugins, java.lang.Boolean useFormatterKeys, CmsTypeOrderingMode orderingMode, CmsAddContentRestriction restriction, CmsUUID sharedSettingOverride, boolean removeSharedSettingOverrides, CmsUUID attributeEditorConfigId, java.util.Map<java.lang.String,java.lang.String> attributes)
Creates a new configuration data instance.- Parameters:
cms
- the CMS contextresource
- the resource from which this configuration data was readisModuleConfig
- true if this is a module configurationbasePath
- the base pathmasterConfigs
- structure ids of master configuration filesresourceTypeConfig
- the resource type configurationgalleryDisabledTypesMode
- the display mode deactivated types in the gallery dialogdiscardInheritedTypes
- the "discard inherited types" flagpropertyConfig
- the property configurationdiscardPropertiesMode
- the "discard inherited properties" modedetailPageInfos
- the detail page configurationmodelPages
- the model page configurationfunctionReferences
- the function reference configurationdiscardInheritedModelPages
- the "discard inherited model pages" flagcreateContentsLocally
- the "create contents locally" flagpreferDetailPagesForLocalContents
- the "preferDetailPagesForLocalContents" flagexcludeExternalDetailContents
- the "excludeExternalDetailContents" flagincludeInSiteSelector
- the "includeInSiteSelector" flagformatterChangeSet
- the formatter changesremoveAllFunctions
- flag indicating whether all functions should be removedfunctionIds
- the dynamic functions availablefunctionsToRemove
- the function ids to removeremoveAllPlugins
- true all site plugins should be removedremovedPlugins
- the ids of site plugins to removeaddedPlugins
- the ids of site plugins to adduseFormatterKeys
- mode for using formatter keys / the new container page formatorderingMode
- the mode used to order the resource typesrestriction
- the restrictions for the 'Add content' dialogsharedSettingOverride
- shared setting override id, may be nullremoveSharedSettingOverrides
- true if inherited shared setting overrides should be removedattributeEditorConfigId
- the structure id of the attribute editor configuration fileattributes
- the map of attributes
-
CmsADEConfigDataInternal
public CmsADEConfigDataInternal(java.lang.String basePath)
Creates an empty configuration data object with a given base path.- Parameters:
basePath
- the base path
-
CmsADEConfigDataInternal
protected CmsADEConfigDataInternal(CmsResource resource, boolean isModuleConfig, java.lang.String basePath, java.util.List<CmsUUID> masterConfigs, java.util.List<CmsResourceTypeConfig> resourceTypeConfig, boolean discardInheritedTypes, java.util.List<CmsPropertyConfig> propertyConfig, org.opencms.ade.configuration.CmsConfigurationReader.DiscardPropertiesMode discardPropertiesMode, java.util.List<CmsDetailPageInfo> detailPageInfos, java.util.List<CmsModelPageConfig> modelPages, java.util.List<CmsFunctionReference> functionReferences, boolean discardInheritedModelPages, boolean createContentsLocally, boolean preferDetailPagesForLocalContents, boolean excludeExternalDetailContents, boolean includeInSiteSelector, CmsFormatterChangeSet formatterChangeSet, boolean removeAllFunctions, java.util.Set<CmsUUID> functionIds)
Creates a new configuration data instance.- Parameters:
resource
- the resource from which this configuration data was readisModuleConfig
- true if this is a module configurationbasePath
- the base pathmasterConfigs
- structure ids of master configuration filesresourceTypeConfig
- the resource type configurationdiscardInheritedTypes
- the "discard inherited types" flagpropertyConfig
- the property configurationdiscardPropertiesMode
- the "discard inherited properties" modedetailPageInfos
- the detail page configurationmodelPages
- the model page configurationfunctionReferences
- the function reference configurationdiscardInheritedModelPages
- the "discard inherited model pages" flagcreateContentsLocally
- the "create contents locally" flagpreferDetailPagesForLocalContents
- the "preferDetailPagesForLocalContents" flagexcludeExternalDetailContents
- the "excludeExternalDetailContents" flagincludeInSiteSelector
- the "includeInSiteSelector" flagformatterChangeSet
- the formatter changesremoveAllFunctions
- flag indicating whether all functions should be removedfunctionIds
- the dynamic functions available
-
-
Method Detail
-
emptyConfiguration
public static CmsADEConfigDataInternal emptyConfiguration(java.lang.String basePath)
Creates an empty configuration for a given base path.- Parameters:
basePath
- the base path- Returns:
- the empty configuration object
-
getAddContentRestriction
public CmsAddContentRestriction getAddContentRestriction()
Gets the restrictions for the 'Add content' dialog.- Returns:
- the restrictions for the 'Add content' dialog
-
getAddedPlugins
public java.util.Set<CmsUUID> getAddedPlugins()
Gets the set of ids of added site plugins.- Returns:
- the set of ids of added site plugins
-
getAttributeEditorConfigId
public CmsUUID getAttributeEditorConfigId()
Gets the structure id of the sitemap attribute editor configuration- Returns:
- the structure id of the sitemap attribute editor configuration
-
getAttributes
public java.util.Map<java.lang.String,CmsADEConfigDataInternal.AttributeValue> getAttributes()
Gets the map of attributes for this sitemap configuration.- Returns:
- the map of attributes
-
getBasePath
public java.lang.String getBasePath()
Gets the base path.- Returns:
- the base path
-
getDisabledTypeMode
public CmsGalleryDisabledTypesMode getDisabledTypeMode()
Gets the display mode for deactivated types in the sitemap dialog.- Returns:
- the display mode for deactivated types
-
getDiscardPropertiesMode
public org.opencms.ade.configuration.CmsConfigurationReader.DiscardPropertiesMode getDiscardPropertiesMode()
Gets the 'discard properties' mode.- Returns:
- the discard properties mode
-
getDynamicFunctions
public java.util.Collection<CmsUUID> getDynamicFunctions()
Returns the set of configured dynamic functions, regardless of whether the 'remove all formatters' option is enabled.- Returns:
- the dynamic functions
-
getFormatterChangeSet
public CmsFormatterChangeSet getFormatterChangeSet()
Gets the formatter change set.- Returns:
- the formatter change set.
-
getFunctionReferences
public java.util.List<CmsFunctionReference> getFunctionReferences()
Gets the dynamic function references.- Returns:
- the dynamic function references
-
getFunctionsToRemove
public java.util.Collection<CmsUUID> getFunctionsToRemove()
Gets the ids of dynamic functions to remove.- Returns:
- the ids of dynamic functions to remove
-
getGalleryDisabledFunctionsMode
public CmsGalleryDisabledTypesMode getGalleryDisabledFunctionsMode()
-
getMasterConfigs
public java.util.List<CmsUUID> getMasterConfigs()
Gets the structure ids of the master configuration files.- Returns:
- the structure ids of the master configurations
-
getOwnDetailPages
public java.util.List<CmsDetailPageInfo> getOwnDetailPages()
Returns the ownDetailPages.- Returns:
- the ownDetailPages
-
getOwnModelPageConfig
public java.util.List<CmsModelPageConfig> getOwnModelPageConfig()
Returns the ownModelPageConfig.- Returns:
- the ownModelPageConfig
-
getOwnPropertyConfigurations
public java.util.List<CmsPropertyConfig> getOwnPropertyConfigurations()
Returns the ownPropertyConfigurations.- Returns:
- the ownPropertyConfigurations
-
getOwnResourceTypes
public java.util.List<CmsResourceTypeConfig> getOwnResourceTypes()
Gets the resource types defined in this configuration.- Returns:
- the resource type configurations
-
getRemovedPlugins
public java.util.Set<CmsUUID> getRemovedPlugins()
Gets the set of ids of removed site plugins.- Returns:
- the set of ids of removed site plugins
-
getResource
public CmsResource getResource()
Returns the resource.- Returns:
- the resource
-
getSharedSettingOverride
public CmsUUID getSharedSettingOverride()
Gets the shared setting override ID (may be null).- Returns:
- the shared setting override ID
-
getTypeOrderingMode
public CmsTypeOrderingMode getTypeOrderingMode()
Gets the type ordering mode.- Returns:
- the type ordering mode
-
getUseFormatterKeys
public java.lang.Boolean getUseFormatterKeys()
Gets the 'use formatter keys' mode.If true, container pages will be written in the new format, including using formatter keys when possible.
- Returns:
- the 'use formatter keys' mode
-
isCreateContentsLocally
public boolean isCreateContentsLocally()
Returns true if contents should be created in the sub-sitemap.- Returns:
- true if contents should be created in the sub-sitemap
-
isDiscardInheritedModelPages
public boolean isDiscardInheritedModelPages()
Returns true if inherited model pages should be discarded.- Returns:
- true if inherited model pages should be discarded.
-
isDiscardInheritedProperties
public boolean isDiscardInheritedProperties()
Returns true if inherited properties should be discarded.- Returns:
- true if inherited property configurations should be discardded.
-
isDiscardInheritedTypes
public boolean isDiscardInheritedTypes()
Returns true if inherited types should be discarded.- Returns:
- true if inherited types should be discarded
-
isExcludeExternalDetailContents
public boolean isExcludeExternalDetailContents()
Returns true if detail pages inside this subsite (and descendant subsites) should not be used for contents outside the subsite (and descendant subsites).- Returns:
- true if external detail contents should be excluded
-
isIncludeInSiteSelector
public boolean isIncludeInSiteSelector()
Returns true if the subsite should be included in the site selector.- Returns:
- true if the subsite should be included in the site selector
-
isModuleConfig
public boolean isModuleConfig()
Returns the isModuleConfig.- Returns:
- the isModuleConfig
-
isPreferDetailPagesForLocalContents
public boolean isPreferDetailPagesForLocalContents()
Returns true if detail pages from this sitemap should be preferred for creating links to detail contents located inside this sitemap.- Returns:
- true if detail pages from this sitemap should be preferred
-
isRemoveAllFunctions
public boolean isRemoveAllFunctions()
True if all functions should be removed by this sitemap configuration.- Returns:
- true if all functions should be removed
-
isRemoveAllPlugins
public boolean isRemoveAllPlugins()
Returns true if all site plugins inherited from parent sitemaps should be removed.- Returns:
- true if all site plugins should be removed
-
isRemoveSharedSettingOverrides
public boolean isRemoveSharedSettingOverrides()
Returns true if shared setting overrides inherited from other sitemap configurations should be discarded.- Returns:
- true if inherited shared setting overrides should be discarded
-
mergeParent
protected void mergeParent(CmsADEConfigDataInternal parent)
Merges the parent's data into this object.- Parameters:
parent
- the parent configuration data
-
processModuleOrdering
protected void processModuleOrdering()
Handle the ordering from the module configurations.
-
-