Class 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.

    • 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 context
        resource - the resource from which this configuration data was read
        isModuleConfig - true if this is a module configuration
        basePath - the base path
        masterConfigs - structure ids of master configuration files
        resourceTypeConfig - the resource type configuration
        galleryDisabledTypesMode - the display mode deactivated types in the gallery dialog
        discardInheritedTypes - the "discard inherited types" flag
        propertyConfig - the property configuration
        discardPropertiesMode - the "discard inherited properties" mode
        detailPageInfos - the detail page configuration
        modelPages - the model page configuration
        functionReferences - the function reference configuration
        discardInheritedModelPages - the "discard inherited model pages" flag
        createContentsLocally - the "create contents locally" flag
        preferDetailPagesForLocalContents - the "preferDetailPagesForLocalContents" flag
        excludeExternalDetailContents - the "excludeExternalDetailContents" flag
        includeInSiteSelector - the "includeInSiteSelector" flag
        formatterChangeSet - the formatter changes
        removeAllFunctions - flag indicating whether all functions should be removed
        functionIds - the dynamic functions available
        functionsToRemove - the function ids to remove
        removeAllPlugins - true all site plugins should be removed
        removedPlugins - the ids of site plugins to remove
        addedPlugins - the ids of site plugins to add
        useFormatterKeys - mode for using formatter keys / the new container page format
        orderingMode - the mode used to order the resource types
        restriction - the restrictions for the 'Add content' dialog
        sharedSettingOverride - shared setting override id, may be null
        removeSharedSettingOverrides - true if inherited shared setting overrides should be removed
        attributeEditorConfigId - the structure id of the attribute editor configuration file
        attributes - 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 read
        isModuleConfig - true if this is a module configuration
        basePath - the base path
        masterConfigs - structure ids of master configuration files
        resourceTypeConfig - the resource type configuration
        discardInheritedTypes - the "discard inherited types" flag
        propertyConfig - the property configuration
        discardPropertiesMode - the "discard inherited properties" mode
        detailPageInfos - the detail page configuration
        modelPages - the model page configuration
        functionReferences - the function reference configuration
        discardInheritedModelPages - the "discard inherited model pages" flag
        createContentsLocally - the "create contents locally" flag
        preferDetailPagesForLocalContents - the "preferDetailPagesForLocalContents" flag
        excludeExternalDetailContents - the "excludeExternalDetailContents" flag
        includeInSiteSelector - the "includeInSiteSelector" flag
        formatterChangeSet - the formatter changes
        removeAllFunctions - flag indicating whether all functions should be removed
        functionIds - 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
      • getAddedPlugins

        public java.util.Set<CmsUUIDgetAddedPlugins()
        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
      • getBasePath

        public java.lang.String getBasePath()
        Gets the base path.

        Returns:
        the base path
      • getDiscardPropertiesMode

        public org.opencms.ade.configuration.CmsConfigurationReader.DiscardPropertiesMode getDiscardPropertiesMode()
        Gets the 'discard properties' mode.
        Returns:
        the discard properties mode
      • getDynamicFunctions

        public java.util.Collection<CmsUUIDgetDynamicFunctions()
        Returns the set of configured dynamic functions, regardless of whether the 'remove all formatters' option is enabled.
        Returns:
        the dynamic functions
      • getFunctionsToRemove

        public java.util.Collection<CmsUUIDgetFunctionsToRemove()
        Gets the ids of dynamic functions to remove.
        Returns:
        the ids of dynamic functions to remove
      • getMasterConfigs

        public java.util.List<CmsUUIDgetMasterConfigs()
        Gets the structure ids of the master configuration files.
        Returns:
        the structure ids of the master configurations
      • getRemovedPlugins

        public java.util.Set<CmsUUIDgetRemovedPlugins()
        Gets the set of ids of removed site plugins.
        Returns:
        the set of ids of removed site plugins
      • getSharedSettingOverride

        public CmsUUID getSharedSettingOverride()
        Gets the shared setting override ID (may be null).
        Returns:
        the shared setting override ID
      • 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
      • processModuleOrdering

        protected void processModuleOrdering()
        Handle the ordering from the module configurations.