Class CmsADEConfigDataInternal

java.lang.Object
org.opencms.ade.configuration.CmsADEConfigDataInternal

public class CmsADEConfigDataInternal extends 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.

  • Field Details

  • Constructor Details

    • CmsADEConfigDataInternal

      public CmsADEConfigDataInternal(CmsObject cms, CmsResource resource, boolean isModuleConfig, String basePath, List<CmsADEConfigDataInternal.ConfigReference> masterConfigs, List<CmsResourceTypeConfig> resourceTypeConfig, CmsGalleryDisabledTypesMode galleryDisabledTypesMode, CmsGalleryDisabledTypesMode galleryDisabledFunctionsMode, boolean discardInheritedTypes, List<CmsPropertyConfig> propertyConfig, org.opencms.ade.configuration.CmsConfigurationReader.DiscardPropertiesMode discardPropertiesMode, List<CmsDetailPageInfo> detailPageInfos, List<CmsModelPageConfigWithoutResource> modelPages, List<CmsFunctionReference> functionReferences, boolean discardInheritedModelPages, boolean createContentsLocally, boolean preferDetailPagesForLocalContents, boolean excludeExternalDetailContents, boolean includeInSiteSelector, CmsFormatterChangeSet formatterChangeSet, boolean removeAllFunctions, Set<CmsUUID> functionIds, Set<CmsUUID> functionsToRemove, boolean removeAllPlugins, Set<CmsUUID> addedPlugins, Set<CmsUUID> removedPlugins, Boolean useFormatterKeys, CmsTypeOrderingMode orderingMode, CmsAddContentRestriction restriction, CmsUUID sharedSettingOverride, boolean removeSharedSettingOverrides, CmsUUID attributeEditorConfigId, Map<String,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
      galleryDisabledFunctionsMode - the mode controlling how to deal with disabled functions
      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(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, String basePath, List<CmsADEConfigDataInternal.ConfigReference> masterConfigs, List<CmsResourceTypeConfig> resourceTypeConfig, boolean discardInheritedTypes, List<CmsPropertyConfig> propertyConfig, org.opencms.ade.configuration.CmsConfigurationReader.DiscardPropertiesMode discardPropertiesMode, List<CmsDetailPageInfo> detailPageInfos, List<CmsModelPageConfig> modelPages, List<CmsFunctionReference> functionReferences, boolean discardInheritedModelPages, boolean createContentsLocally, boolean preferDetailPagesForLocalContents, boolean excludeExternalDetailContents, boolean includeInSiteSelector, CmsFormatterChangeSet formatterChangeSet, boolean removeAllFunctions, 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 Details

    • emptyConfiguration

      Creates an empty configuration for a given base path.

      Parameters:
      basePath - the base path
      Returns:
      the empty configuration object
    • getAddContentRestriction

      Gets the restrictions for the 'Add content' dialog.
      Returns:
      the restrictions for the 'Add content' dialog
    • getAddedPlugins

      Gets the set of ids of added site plugins.
      Returns:
      the set of ids of added site plugins
    • getAttributeEditorConfigId

      Gets the structure id of the sitemap attribute editor configuration
      Returns:
      the structure id of the sitemap attribute editor configuration
    • getAttributes

      Gets the map of attributes for this sitemap configuration.
      Returns:
      the map of attributes
    • getBasePath

      public String getBasePath()
      Gets the base path.

      Returns:
      the base path
    • 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

      Returns the set of configured dynamic functions, regardless of whether the 'remove all formatters' option is enabled.
      Returns:
      the dynamic functions
    • getFormatterChangeSet

      Gets the formatter change set.

      Returns:
      the formatter change set.

    • getFunctionReferences

      Gets the dynamic function references.

      Returns:
      the dynamic function references
    • getFunctionsToRemove

      Gets the ids of dynamic functions to remove.
      Returns:
      the ids of dynamic functions to remove
    • getGalleryDisabledFunctionsMode

      Gets the mode for how disabled functions should be handled.
      Returns:
      the mode for disabled functions
    • getMasterConfigs

      Gets the structure ids of the master configuration files.
      Returns:
      the structure ids of the master configurations
    • getOwnDetailPages

      Returns the ownDetailPages.

      Returns:
      the ownDetailPages
    • getOwnModelPageConfig

      Returns the ownModelPageConfig.

      Returns:
      the ownModelPageConfig
    • getOwnPropertyConfigurations

      Returns the ownPropertyConfigurations.

      Returns:
      the ownPropertyConfigurations
    • getOwnResourceTypes

      Gets the resource types defined in this configuration.

      Returns:
      the resource type configurations
    • getRemovedPlugins

      Gets the set of ids of removed site plugins.
      Returns:
      the set of ids of removed site plugins
    • getResource

      Returns the resource.

      Returns:
      the resource
    • getSharedSettingOverride

      Gets the shared setting override ID (may be null).
      Returns:
      the shared setting override ID
    • getTypeOrderingMode

      Gets the type ordering mode.
      Returns:
      the type ordering mode
    • 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

      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

      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

      Returns true if shared setting overrides inherited from other sitemap configurations should be discarded.
      Returns:
      true if inherited shared setting overrides should be discarded
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • 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.