Class CmsADEConfigData
- java.lang.Object
-
- org.opencms.ade.configuration.CmsADEConfigData
-
public class CmsADEConfigData extends java.lang.Object
A class which represents the accessible configuration data at a given point in a sitemap.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
CmsADEConfigData.DetailInfo
Bean which contains the detail information for a single sub-sitemap and resource type.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTR_BINARY_UPLOAD_TARGET
Sitemap attribute for the upload folder.protected CmsADEConfigDataInternal
m_data
The wrapped configuration bean containing the actual data.static java.lang.String
REQ_LOG_PREFIX
Prefix for logging special request log messages.static java.lang.String
REQUEST_LOG_CHANNEL
Channel for logging special request log messages.
-
Constructor Summary
Constructors Constructor Description CmsADEConfigData(CmsADEConfigDataInternal data, CmsADEConfigCacheState cache, CmsADEConfigurationSequence configSequence)
Creates a new configuration data object, based on an internal configuration data bean and a configuration cache state.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyAllFormatterChanges(CmsFormatterIndex formatterIndex, CmsFormatterConfigurationCacheState formatterCacheState)
Applies the formatter change sets of this and all parent configurations to a formatter indexprotected void
clearCaches()
Clears the internal formatter caches.static <C extends I_CmsConfigurationObject<C>>
java.util.List<C>combineConfigurationElements(java.util.List<C> parentConfigs, java.util.List<C> childConfigs, boolean preserveDisabled)
Generic method to merge lists of named configuration objects.protected void
createContentDirectory()
Creates the content directory for this configuration node if possible.I_CmsFormatterBean
findFormatter(java.lang.String name)
Gets the 'best' formatter for the given name.I_CmsFormatterBean
findFormatter(CmsUUID id)
Gets the 'best' formatter for the given ID.java.util.Map<CmsUUID,I_CmsFormatterBean>
getActiveFormatters()
Gets the active external (non-schema) formatters for this sub-sitemap.java.util.Set<java.lang.String>
getActiveTypeNames()
Gets the set of names of types active in this sitemap configuration.CmsAddContentRestriction
getAddContentRestriction()
Gets the 'add content' restriction for this configuration.java.util.List<CmsDetailPageInfo>
getAllDetailPages()
Gets the list of all detail pages.java.util.List<CmsDetailPageInfo>
getAllDetailPages(boolean update)
Gets a list of all detail pages.java.util.Set<java.lang.String>
getAncestorTypeNames()
Gets the set of names of types configured in this or any ancestor sitemap configurations.java.lang.String
getAttribute(java.lang.String key, java.lang.String defaultValue)
Gets the value of an attribute, or a default valuejava.util.Map<java.lang.String,CmsADEConfigDataInternal.AttributeValue>
getAttributes()
Gets the map of attributes configured for this sitemap, including values inherited from parent sitemaps.java.lang.String
getBasePath()
Gets the configuration base path.CmsFormatterConfigurationCacheState
getCachedFormatters()
Gets the cached formatters.protected CmsObject
getCms()
Gets the CMS object used for VFS operations.protected CmsObject
getCmsObject()
Gets the CMS object used for VFS operations.java.util.List<java.lang.String>
getConfigPaths()
Gets an (immutable) list of paths of configuration files in inheritance order.java.util.Set<java.lang.String>
getConfiguredWorkplaceBundles()
Returns the names of the bundles configured as workplace bundles in any module configuration.java.lang.String
getContentFolderPath()
Gets the content folder path.java.util.List<CmsResourceTypeConfig>
getCreatableTypes(CmsObject cms, java.lang.String pageFolderRootPath)
Returns a list of the creatable resource types.CmsDetailPageInfo
getDefaultDetailPage()
Returns the default detail page.CmsModelPageConfig
getDefaultModelPage()
Returns the default model page.java.util.List<CmsADEConfigData.DetailInfo>
getDetailInfos(CmsObject cms)
Gets the detail information for this sitemap config data object.java.util.List<CmsDetailPageInfo>
getDetailPagesForType(java.lang.String type)
Gets the detail pages for a specific type.protected java.util.Map<java.lang.String,java.util.List<CmsDetailPageInfo>>
getDetailPagesMap(java.util.List<CmsDetailPageInfo> detailPages)
Helper method to converts a list of detail pages to a map from type names to lists of detail pages for each type.CmsAdvancedDirectEditProvider.SitemapDirectEditPermissions
getDirectEditPermissions(java.lang.String type)
Returns the direct edit permissions for e.g.java.util.List<I_CmsFormatterBean>
getDisplayFormatters(CmsObject cms)
Returns all available display formatters.CmsFunctionAvailability
getDynamicFunctionAvailability(CmsFormatterConfigurationCacheState formatterConfig)
Gets the bean that represents the dynamic function availability.java.lang.String
getExternalDetailContentExclusionFolder()
Gets the root path of the closest subsite going up the tree which has the 'exclude external detail contents' option enabled, or '/' if no such subsite exists.protected java.util.Map<java.lang.String,java.lang.String>
getFolderTypes()
Collects the folder types in a map.java.util.List<CmsFormatterChangeSet>
getFormatterChangeSets()
Returns the formatter change sets for this and all parent sitemaps, ordered by increasing folder depth of the sitemap.CmsFormatterConfiguration
getFormatters(CmsObject cms, CmsResource res)
Gets the formatter configuration for a resource.protected CmsFormatterConfiguration
getFormatters(CmsObject cms, I_CmsResourceType resType, CmsFormatterConfiguration schemaFormatters)
Gets the formatter configuration for a resource type.protected CmsFormatterConfiguration
getFormattersFromSchema(CmsObject cms, CmsResource res)
Gets the formatters from the schema.CmsFunctionReference
getFunctionReference(java.lang.String name)
Gets a named function reference.java.util.List<CmsFunctionReference>
getFunctionReferences()
Gets the list of configured function references.java.util.Map<CmsUUID,I_CmsFormatterBean>
getInactiveFormatters()
Gets the map of external (non-schema) formatters which are inactive in this sub-sitemap.CmsDetailPageInfo
getMainDetailPage(java.lang.String type)
Gets the main detail page for a specific type.java.util.List<CmsModelPageConfig>
getModelPages()
Gets the list of available model pages.java.util.List<CmsModelPageConfig>
getModelPages(boolean includeDisable)
Gets the list of available model pages.CmsFormatterChangeSet
getOwnFormatterChangeSet()
Gets the formatter changes for this sitemap configuration.static java.lang.String
getParentFormatterKey(java.lang.String key)
If the given formatter key has a sub-formatter suffix, returns the part before it, otherwise returns null.java.util.List<CmsPropertyConfig>
getPropertyConfiguration()
Gets the configuration for the available properties.java.util.Map<java.lang.String,CmsXmlContentProperty>
getPropertyConfiguration(java.util.Map<java.lang.String,CmsXmlContentProperty> defaultProperties)
Computes the ordered map of properties to display in the property dialog, given the map of default property configurations passed as a parameter.java.util.Map<java.lang.String,CmsXmlContentProperty>
getPropertyConfigurationAsMap()
Gets the property configuration as a map of CmsXmlContentProperty instances.CmsResource
getResource()
Returns the resource from which this configuration was read.CmsResourceTypeConfig
getResourceType(java.lang.String typeName)
Returns the configuration for a specific resource type.java.util.List<CmsResourceTypeConfig>
getResourceTypes()
Gets a list of all available resource type configurations.java.util.Collection<CmsResourceTypeConfig>
getSearchableTypes(CmsObject cms)
Gets the searchable resource type configurations.com.google.common.collect.ImmutableList<CmsUUID>
getSharedSettingOverrides()
Gets the list of structure ids of the shared setting overrides, ordered by increasing specificity.java.util.Set<CmsUUID>
getSitePluginIds()
Gets the ids of site plugins which are active in this sitemap configuration.java.util.List<CmsSitePlugin>
getSitePlugins()
Gets the list of site plugins active in this sitemap configuration.CmsTypeOrderingMode
getTypeOrderingMode()
Gets the type ordering mode.java.util.Set<java.lang.String>
getTypesWithActiveSchemaFormatters()
Gets the set of resource type names for which schema formatters can be enabled or disabled and which are not disabled in this sub-sitemap.java.util.Set<java.lang.String>
getTypesWithModifiableFormatters()
Gets the set of names of resource types which have schema-based formatters that can be enabled or disabled.boolean
hasFormatters(CmsObject cms, I_CmsResourceType resType, java.util.Collection<CmsContainer> containers)
Checks if there are any matching formatters for the given set of containers.protected java.util.List<CmsFunctionReference>
internalGetFunctionReferences()
Internal method for getting the function references.protected java.util.List<CmsResourceTypeConfig>
internalGetResourceTypes(boolean filterDisabled)
Helper method for getting the list of resource types.boolean
isCreateContentsLocally()
Returns the value of the "create contents locally" flag.boolean
isDiscardInheritedModelPages()
Returns the value of the "discard inherited model pages" flag.boolean
isDiscardInheritedProperties()
Returns the value of the "discard inherited properties" flag.boolean
isDiscardInheritedTypes()
Returns the value of the "discard inherited types" flag.boolean
isExcludeExternalDetailContents()
True if detail contents outside this sitemap should not be rendered in detail pages from this sitemap.boolean
isIncludeInSiteSelector()
Returns true if the subsite should be included in the site selector.boolean
isModuleConfiguration()
Returns true if this is a module configuration instead of a normal sitemap configuration.boolean
isPreferDetailPagesForLocalContents()
Returns true if detail pages from this sitemap should be preferred for links to contents in this sitemap.boolean
isSearchContentFormatter(CmsUUID jspId)
Checks if any formatter with the given JSP id has the 'search content' option set to true.boolean
isUseFormatterKeys()
Returns true if the new container page format, which uses formatter keys (but also is different in other ways from the new formatprotected java.util.List<CmsDetailPageInfo>
mergeDetailPages(java.util.List<CmsDetailPageInfo> parentDetailPages, java.util.List<CmsDetailPageInfo> ownDetailPages)
Merges two lists of detail pages, one from a parent configuration and one from a child configuration.CmsADEConfigData
parent()
Fetches the parent configuration of this configuration.protected java.util.List<CmsDetailPageInfo>
updateUris(java.util.List<CmsDetailPageInfo> detailPages)
Helper method to correct paths in detail page beans if the corresponding resources have been moved.
-
-
-
Field Detail
-
ATTR_BINARY_UPLOAD_TARGET
public static final java.lang.String ATTR_BINARY_UPLOAD_TARGET
Sitemap attribute for the upload folder.- See Also:
- Constant Field Values
-
REQ_LOG_PREFIX
public static final java.lang.String REQ_LOG_PREFIX
Prefix for logging special request log messages.- See Also:
- Constant Field Values
-
REQUEST_LOG_CHANNEL
public static final java.lang.String REQUEST_LOG_CHANNEL
Channel for logging special request log messages.- See Also:
- Constant Field Values
-
m_data
protected CmsADEConfigDataInternal m_data
The wrapped configuration bean containing the actual data.
-
-
Constructor Detail
-
CmsADEConfigData
public CmsADEConfigData(CmsADEConfigDataInternal data, CmsADEConfigCacheState cache, CmsADEConfigurationSequence configSequence)
Creates a new configuration data object, based on an internal configuration data bean and a configuration cache state.- Parameters:
data
- the internal configuration data beancache
- the configuration cache stateconfigSequence
- the configuration sequence
-
-
Method Detail
-
combineConfigurationElements
public static <C extends I_CmsConfigurationObject<C>> java.util.List<C> combineConfigurationElements(java.util.List<C> parentConfigs, java.util.List<C> childConfigs, boolean preserveDisabled)
Generic method to merge lists of named configuration objects.The lists are merged such that the configuration objects from the child list rise to the front of the result list, and two configuration objects will be merged themselves if they share the same name.
For example, if we have two lists of configuration objects:
parent: A1, B1, C1
child: D2, B2
then the resulting list will look like:
D2, B3, A1, C1
where B3 is the result of merging B1 and B2.
- Type Parameters:
C
- the type of configuration object- Parameters:
parentConfigs
- the parent configurationschildConfigs
- the child configurationspreserveDisabled
- if true, try to merge parents with disabled children instead of discarding them- Returns:
- the merged configuration object list
-
getParentFormatterKey
public static final java.lang.String getParentFormatterKey(java.lang.String key)
If the given formatter key has a sub-formatter suffix, returns the part before it, otherwise returns null.- Parameters:
key
- the formatter key- Returns:
- the parent formatter key
-
applyAllFormatterChanges
public void applyAllFormatterChanges(CmsFormatterIndex formatterIndex, CmsFormatterConfigurationCacheState formatterCacheState)
Applies the formatter change sets of this and all parent configurations to a formatter index- Parameters:
formatterIndex
- the collection of formatters to apply the changes toformatterCacheState
- the formatter cache state from which new external formatters should be fetched
-
findFormatter
public I_CmsFormatterBean findFormatter(CmsUUID id)
Gets the 'best' formatter for the given ID.If the formatter with the ID has a key, then the active formatter with the same key is returned. Otherwise, the formatter matching the ID is returned. So being active and having the same key is prioritized over an exact ID match.
- Parameters:
id
- the formatter ID- Returns:
- the best formatter the given ID
-
findFormatter
public I_CmsFormatterBean findFormatter(java.lang.String name)
Gets the 'best' formatter for the given name.The name can be either a formatter key, or a formatter UUID. If it's a key, an active formatter with that key is returned. If it's a UUID, and the formatter with that UUID has no key, it will be returned. If it does have a key, the active formatter with that key is returned (so being active and having the same key is prioritized over an exact ID match).
- Parameters:
name
- a formatter name (key or ID)- Returns:
- the best formatter for that name, or null if no formatter could be found
-
getActiveFormatters
public java.util.Map<CmsUUID,I_CmsFormatterBean> getActiveFormatters()
Gets the active external (non-schema) formatters for this sub-sitemap.- Returns:
- the map of active external formatters by structure id
-
getActiveTypeNames
public java.util.Set<java.lang.String> getActiveTypeNames()
Gets the set of names of types active in this sitemap configuration.- Returns:
- the set of type names of active types
-
getAddContentRestriction
public CmsAddContentRestriction getAddContentRestriction()
Gets the 'add content' restriction for this configuration.- Returns:
- the 'add content' restriction
-
getAllDetailPages
public java.util.List<CmsDetailPageInfo> getAllDetailPages()
Gets the list of all detail pages.- Returns:
- the list of all detail pages
-
getAllDetailPages
public java.util.List<CmsDetailPageInfo> getAllDetailPages(boolean update)
Gets a list of all detail pages.- Parameters:
update
- if true, this method will try to correct the root paths in the returned objects if the corresponding resources have been moved- Returns:
- the list of all detail pages
-
getAncestorTypeNames
public java.util.Set<java.lang.String> getAncestorTypeNames()
Gets the set of names of types configured in this or any ancestor sitemap configurations.- Returns:
- the set of type names from all ancestor configurations
-
getAttribute
public java.lang.String getAttribute(java.lang.String key, java.lang.String defaultValue)
Gets the value of an attribute, or a default value- Parameters:
key
- the attribute keydefaultValue
- the value to return if no attribute with the given name is found- Returns:
- the attribute value
-
getAttributes
public java.util.Map<java.lang.String,CmsADEConfigDataInternal.AttributeValue> getAttributes()
Gets the map of attributes configured for this sitemap, including values inherited from parent sitemaps.- Returns:
- the map of attributes
-
getBasePath
public java.lang.String getBasePath()
Gets the configuration base path.For example, if the configuration file is located at /sites/default/.content/.config, the base path is /sites/default.
- Returns:
- the base path of the configuration
-
getCachedFormatters
public CmsFormatterConfigurationCacheState getCachedFormatters()
Gets the cached formatters.- Returns:
- the cached formatters
-
getConfigPaths
public java.util.List<java.lang.String> getConfigPaths()
Gets an (immutable) list of paths of configuration files in inheritance order.- Returns:
- the list of configuration files
-
getConfiguredWorkplaceBundles
public java.util.Set<java.lang.String> getConfiguredWorkplaceBundles()
Returns the names of the bundles configured as workplace bundles in any module configuration.- Returns:
- the names of the bundles configured as workplace bundles in any module configuration.
-
getContentFolderPath
public java.lang.String getContentFolderPath()
Gets the content folder path.For example, if the configuration file is located at /sites/default/.content/.config, the content folder path is /sites/default/.content
- Returns:
- the content folder path
-
getCreatableTypes
public java.util.List<CmsResourceTypeConfig> getCreatableTypes(CmsObject cms, java.lang.String pageFolderRootPath) throws CmsException
Returns a list of the creatable resource types.- Parameters:
cms
- the CMS context used to check whether the resource types are creatablepageFolderRootPath
- the root path of the current container page- Returns:
- the list of creatable resource type
- Throws:
CmsException
- if something goes wrong
-
getDefaultDetailPage
public CmsDetailPageInfo getDefaultDetailPage()
Returns the default detail page.- Returns:
- the default detail page
-
getDefaultModelPage
public CmsModelPageConfig getDefaultModelPage()
Returns the default model page.- Returns:
- the default model page
-
getDetailInfos
public java.util.List<CmsADEConfigData.DetailInfo> getDetailInfos(CmsObject cms)
Gets the detail information for this sitemap config data object.- Parameters:
cms
- the CMS context- Returns:
- the list of detail information
-
getDetailPagesForType
public java.util.List<CmsDetailPageInfo> getDetailPagesForType(java.lang.String type)
Gets the detail pages for a specific type.- Parameters:
type
- the type name- Returns:
- the list of detail pages for that type
-
getDirectEditPermissions
public CmsAdvancedDirectEditProvider.SitemapDirectEditPermissions getDirectEditPermissions(java.lang.String type)
Returns the direct edit permissions for e.g. list elements with the given type.- Parameters:
type
- the resource type name- Returns:
- the permissions
-
getDisplayFormatters
public java.util.List<I_CmsFormatterBean> getDisplayFormatters(CmsObject cms)
Returns all available display formatters.- Parameters:
cms
- the cms context- Returns:
- the available display formatters
-
getDynamicFunctionAvailability
public CmsFunctionAvailability getDynamicFunctionAvailability(CmsFormatterConfigurationCacheState formatterConfig)
Gets the bean that represents the dynamic function availability.- Parameters:
formatterConfig
- the formatter configuration state- Returns:
- the dynamic function availability
-
getExternalDetailContentExclusionFolder
public java.lang.String getExternalDetailContentExclusionFolder()
Gets the root path of the closest subsite going up the tree which has the 'exclude external detail contents' option enabled, or '/' if no such subsite exists.- Returns:
- the root path of the closest subsite with 'external detail contents excluded'
-
getFormatterChangeSets
public java.util.List<CmsFormatterChangeSet> getFormatterChangeSets()
Returns the formatter change sets for this and all parent sitemaps, ordered by increasing folder depth of the sitemap.- Returns:
- the formatter change sets for all ancestor sitemaps
-
getFormatters
public CmsFormatterConfiguration getFormatters(CmsObject cms, CmsResource res)
Gets the formatter configuration for a resource.- Parameters:
cms
- the current CMS contextres
- the resource for which the formatter configuration should be retrieved- Returns:
- the configuration of formatters for the resource
-
getFunctionReference
public CmsFunctionReference getFunctionReference(java.lang.String name)
Gets a named function reference.- Parameters:
name
- the name of the function reference- Returns:
- the function reference for the given name
-
getFunctionReferences
public java.util.List<CmsFunctionReference> getFunctionReferences()
Gets the list of configured function references.- Returns:
- the list of configured function references
-
getInactiveFormatters
public java.util.Map<CmsUUID,I_CmsFormatterBean> getInactiveFormatters()
Gets the map of external (non-schema) formatters which are inactive in this sub-sitemap.- Returns:
- the map inactive external formatters
-
getMainDetailPage
public CmsDetailPageInfo getMainDetailPage(java.lang.String type)
Gets the main detail page for a specific type.- Parameters:
type
- the type name- Returns:
- the main detail page for that type
-
getModelPages
public java.util.List<CmsModelPageConfig> getModelPages()
Gets the list of available model pages.- Returns:
- the list of available model pages
-
getModelPages
public java.util.List<CmsModelPageConfig> getModelPages(boolean includeDisable)
Gets the list of available model pages.- Parameters:
includeDisable
-true
to include disabled model pages- Returns:
- the list of available model pages
-
getOwnFormatterChangeSet
public CmsFormatterChangeSet getOwnFormatterChangeSet()
Gets the formatter changes for this sitemap configuration.- Returns:
- the formatter change set
-
getPropertyConfiguration
public java.util.List<CmsPropertyConfig> getPropertyConfiguration()
Gets the configuration for the available properties.- Returns:
- the configuration for the available properties
-
getPropertyConfiguration
public java.util.Map<java.lang.String,CmsXmlContentProperty> getPropertyConfiguration(java.util.Map<java.lang.String,CmsXmlContentProperty> defaultProperties)
Computes the ordered map of properties to display in the property dialog, given the map of default property configurations passed as a parameter.- Parameters:
defaultProperties
- the default property configurations- Returns:
- the ordered map of property configurations for the property dialog
-
getPropertyConfigurationAsMap
public java.util.Map<java.lang.String,CmsXmlContentProperty> getPropertyConfigurationAsMap()
Gets the property configuration as a map of CmsXmlContentProperty instances.- Returns:
- the map of property configurations
-
getResource
public CmsResource getResource()
Returns the resource from which this configuration was read.- Returns:
- the resource from which this configuration was read
-
getResourceType
public CmsResourceTypeConfig getResourceType(java.lang.String typeName)
Returns the configuration for a specific resource type.- Parameters:
typeName
- the name of the type- Returns:
- the resource type configuration for that type
-
getResourceTypes
public java.util.List<CmsResourceTypeConfig> getResourceTypes()
Gets a list of all available resource type configurations.- Returns:
- the available resource type configurations
-
getSearchableTypes
public java.util.Collection<CmsResourceTypeConfig> getSearchableTypes(CmsObject cms)
Gets the searchable resource type configurations.- Parameters:
cms
- the current CMS context- Returns:
- the searchable resource type configurations
-
getSharedSettingOverrides
public com.google.common.collect.ImmutableList<CmsUUID> getSharedSettingOverrides()
Gets the list of structure ids of the shared setting overrides, ordered by increasing specificity.- Returns:
- the list of structure ids of shared setting overrides
-
getSitePluginIds
public java.util.Set<CmsUUID> getSitePluginIds()
Gets the ids of site plugins which are active in this sitemap configuration.- Returns:
- the ids of active site plugins
-
getSitePlugins
public java.util.List<CmsSitePlugin> getSitePlugins()
Gets the list of site plugins active in this sitemap configuration.- Returns:
- the list of active site plugins
-
getTypeOrderingMode
public CmsTypeOrderingMode getTypeOrderingMode()
Gets the type ordering mode.- Returns:
- the type ordering mode
-
getTypesWithActiveSchemaFormatters
public java.util.Set<java.lang.String> getTypesWithActiveSchemaFormatters()
Gets the set of resource type names for which schema formatters can be enabled or disabled and which are not disabled in this sub-sitemap.- Returns:
- the set of types for which schema formatters are active
-
getTypesWithModifiableFormatters
public java.util.Set<java.lang.String> getTypesWithModifiableFormatters()
Gets the set of names of resource types which have schema-based formatters that can be enabled or disabled.- Returns:
- the set of names of resource types which have schema-based formatters that can be enabled or disabled
-
hasFormatters
public boolean hasFormatters(CmsObject cms, I_CmsResourceType resType, java.util.Collection<CmsContainer> containers)
Checks if there are any matching formatters for the given set of containers.- Parameters:
cms
- the current CMS contextresType
- the resource type for which the formatter configuration should be retrievedcontainers
- the page containers- Returns:
- if there are any matching formatters
-
isCreateContentsLocally
public boolean isCreateContentsLocally()
Returns the value of the "create contents locally" flag.If this flag is set, contents of types configured in a super-sitemap will be created in the sub-sitemap (if the user creates them from the sub-sitemap).
- Returns:
- the "create contents locally" flag
-
isDiscardInheritedModelPages
public boolean isDiscardInheritedModelPages()
Returns the value of the "discard inherited model pages" flag.If this flag is set, inherited model pages will be discarded for this sitemap.
- Returns:
- the "discard inherited model pages" flag
-
isDiscardInheritedProperties
public boolean isDiscardInheritedProperties()
Returns the value of the "discard inherited properties" flag.If this is flag is set, inherited property definitions will be discarded for this sitemap.
- Returns:
- the "discard inherited properties" flag.
-
isDiscardInheritedTypes
public boolean isDiscardInheritedTypes()
Returns the value of the "discard inherited types" flag.If this flag is set, inherited resource types from a super-sitemap will be discarded for this sitemap.
- Returns:
- the "discard inherited types" flag
-
isExcludeExternalDetailContents
public boolean isExcludeExternalDetailContents()
True if detail contents outside this sitemap should not be rendered in detail pages from this sitemap.- Returns:
- true if detail contents outside this sitemap should not be rendered in detail pages from this sitemap.
-
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
-
isModuleConfiguration
public boolean isModuleConfiguration()
Returns true if this is a module configuration instead of a normal sitemap configuration.- Returns:
- true if this is a module configuration
-
isPreferDetailPagesForLocalContents
public boolean isPreferDetailPagesForLocalContents()
Returns true if detail pages from this sitemap should be preferred for links to contents in this sitemap.- Returns:
- true if detail pages from this sitemap should be preferred for links to contents in this sitemap
-
isSearchContentFormatter
public boolean isSearchContentFormatter(CmsUUID jspId)
Checks if any formatter with the given JSP id has the 'search content' option set to true.- Parameters:
jspId
- the structure id of a formatter JSP- Returns:
- true if any of the formatters
-
isUseFormatterKeys
public boolean isUseFormatterKeys()
Returns true if the new container page format, which uses formatter keys (but also is different in other ways from the new format- Returns:
- true if formatter keys should be used
-
parent
public CmsADEConfigData parent()
Fetches the parent configuration of this configuration.If this configuration is a sitemap configuration with no direct parent configuration, the module configuration will be returned. If this configuration already is a module configuration, null will be returned.
- Returns:
- the parent configuration
-
clearCaches
protected void clearCaches()
Clears the internal formatter caches.This should only be used for test cases.
-
createContentDirectory
protected void createContentDirectory() throws CmsException
Creates the content directory for this configuration node if possible.- Throws:
CmsException
- if something goes wrong
-
getCms
protected CmsObject getCms()
Gets the CMS object used for VFS operations.- Returns:
- the CMS object used for VFS operations
-
getCmsObject
protected CmsObject getCmsObject()
Gets the CMS object used for VFS operations.- Returns:
- the CMS object
-
getDetailPagesMap
protected java.util.Map<java.lang.String,java.util.List<CmsDetailPageInfo>> getDetailPagesMap(java.util.List<CmsDetailPageInfo> detailPages)
Helper method to converts a list of detail pages to a map from type names to lists of detail pages for each type.- Parameters:
detailPages
- the list of detail pages- Returns:
- the map of detail pages
-
getFolderTypes
protected java.util.Map<java.lang.String,java.lang.String> getFolderTypes() throws CmsException
Collects the folder types in a map.- Returns:
- the map of folder types
- Throws:
CmsException
- if something goes wrong
-
getFormatters
protected CmsFormatterConfiguration getFormatters(CmsObject cms, I_CmsResourceType resType, CmsFormatterConfiguration schemaFormatters)
Gets the formatter configuration for a resource type.- Parameters:
cms
- the current CMS contextresType
- the resource typeschemaFormatters
- the resource schema formatters- Returns:
- the configuration of formatters for the resource type
-
getFormattersFromSchema
protected CmsFormatterConfiguration getFormattersFromSchema(CmsObject cms, CmsResource res)
Gets the formatters from the schema.- Parameters:
cms
- the current CMS contextres
- the resource for which the formatters should be retrieved- Returns:
- the formatters from the schema
-
internalGetFunctionReferences
protected java.util.List<CmsFunctionReference> internalGetFunctionReferences()
Internal method for getting the function references.- Returns:
- the function references
-
internalGetResourceTypes
protected java.util.List<CmsResourceTypeConfig> internalGetResourceTypes(boolean filterDisabled)
Helper method for getting the list of resource types.- Parameters:
filterDisabled
- true if disabled types should be filtered from the result- Returns:
- the list of resource types
-
mergeDetailPages
protected java.util.List<CmsDetailPageInfo> mergeDetailPages(java.util.List<CmsDetailPageInfo> parentDetailPages, java.util.List<CmsDetailPageInfo> ownDetailPages)
Merges two lists of detail pages, one from a parent configuration and one from a child configuration.- Parameters:
parentDetailPages
- the parent's detail pagesownDetailPages
- the child's detail pages- Returns:
- the merged detail pages
-
updateUris
protected java.util.List<CmsDetailPageInfo> updateUris(java.util.List<CmsDetailPageInfo> detailPages)
Helper method to correct paths in detail page beans if the corresponding resources have been moved.- Parameters:
detailPages
- the original list of detail pages- Returns:
- the corrected list of detail pages
-
-