public class CmsADEConfigData extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
CmsADEConfigData.DetailInfo
Bean which contains the detail information for a single sub-sitemap and resource type.
|
Modifier and Type | Field and Description |
---|---|
protected CmsADEConfigDataInternal |
m_data
The wrapped configuration bean containing the actual data.
|
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
void |
applyAllFormatterChanges(java.util.Map<CmsUUID,I_CmsFormatterBean> formatters,
CmsFormatterConfigurationCacheState formatterCacheState)
Applies the formatter change sets of this and all parent configurations to a map of external (non-schema) formatters.
|
static <C extends I_CmsConfigurationObject<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.
|
java.util.Map<CmsUUID,I_CmsFormatterBean> |
getActiveFormatters()
Gets the active external (non-schema) formatters for this sub-sitemap.
|
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.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.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.
|
java.util.List<I_CmsFormatterBean> |
getDisplayFormatters(CmsObject cms)
Returns all available display formatters.
|
java.util.Collection<CmsUUID> |
getDynamicFunctions()
Returns the restricted dynamic functions or
null . |
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.
|
java.util.List<CmsPropertyConfig> |
getPropertyConfiguration()
Gets the configuration for the available properties.
|
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.
|
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 |
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.
|
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.
|
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.
|
protected CmsADEConfigDataInternal m_data
public CmsADEConfigData(CmsADEConfigDataInternal data, CmsADEConfigCacheState cache, CmsADEConfigurationSequence configSequence)
data
- the internal configuration data beancache
- the configuration cache stateconfigSequence
- the configuration sequencepublic static <C extends I_CmsConfigurationObject<C>> java.util.List<C> combineConfigurationElements(java.util.List<C> parentConfigs, java.util.List<C> childConfigs, boolean preserveDisabled)
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.
C
- the type of configuration objectparentConfigs
- the parent configurationschildConfigs
- the child configurationspreserveDisabled
- if true, try to merge parents with disabled children instead of discarding thempublic void applyAllFormatterChanges(java.util.Map<CmsUUID,I_CmsFormatterBean> formatters, CmsFormatterConfigurationCacheState formatterCacheState)
formatters
- the external formatter map which will be modifiedformatterCacheState
- the formatter cache state from which new external formatters should be fetchedpublic java.util.Map<CmsUUID,I_CmsFormatterBean> getActiveFormatters()
public java.util.List<CmsDetailPageInfo> getAllDetailPages()
public java.util.List<CmsDetailPageInfo> getAllDetailPages(boolean update)
update
- if true, this method will try to correct the root paths in the returned objects if the corresponding resources have been movedpublic java.lang.String getBasePath()
For example, if the configuration file is located at /sites/default/.content/.config, the base path is /sites/default.
public CmsFormatterConfigurationCacheState getCachedFormatters()
public java.util.Set<java.lang.String> getConfiguredWorkplaceBundles()
public java.lang.String getContentFolderPath()
For example, if the configuration file is located at /sites/default/.content/.config, the content folder path is /sites/default/.content
public java.util.List<CmsResourceTypeConfig> getCreatableTypes(CmsObject cms, java.lang.String pageFolderRootPath) throws CmsException
cms
- the CMS context used to check whether the resource types are creatablepageFolderRootPath
- the root path of the current container pageCmsException
- if something goes wrongpublic CmsDetailPageInfo getDefaultDetailPage()
public CmsModelPageConfig getDefaultModelPage()
public java.util.List<CmsADEConfigData.DetailInfo> getDetailInfos(CmsObject cms)
cms
- the CMS contextpublic java.util.List<CmsDetailPageInfo> getDetailPagesForType(java.lang.String type)
type
- the type namepublic java.util.List<I_CmsFormatterBean> getDisplayFormatters(CmsObject cms)
cms
- the cms contextpublic java.util.Collection<CmsUUID> getDynamicFunctions()
null
.public java.util.List<CmsFormatterChangeSet> getFormatterChangeSets()
public CmsFormatterConfiguration getFormatters(CmsObject cms, CmsResource res)
cms
- the current CMS contextres
- the resource for which the formatter configuration should be retrievedpublic CmsFunctionReference getFunctionReference(java.lang.String name)
name
- the name of the function referencepublic java.util.List<CmsFunctionReference> getFunctionReferences()
public java.util.Map<CmsUUID,I_CmsFormatterBean> getInactiveFormatters()
public CmsDetailPageInfo getMainDetailPage(java.lang.String type)
type
- the type namepublic java.util.List<CmsModelPageConfig> getModelPages()
public java.util.List<CmsModelPageConfig> getModelPages(boolean includeDisable)
includeDisable
- true
to include disabled model pagespublic CmsFormatterChangeSet getOwnFormatterChangeSet()
public java.util.List<CmsPropertyConfig> getPropertyConfiguration()
public java.util.Map<java.lang.String,CmsXmlContentProperty> getPropertyConfigurationAsMap()
public CmsResource getResource()
public CmsResourceTypeConfig getResourceType(java.lang.String typeName)
typeName
- the name of the typepublic java.util.List<CmsResourceTypeConfig> getResourceTypes()
public java.util.Collection<CmsResourceTypeConfig> getSearchableTypes(CmsObject cms)
cms
- the current CMS contextpublic java.util.Set<java.lang.String> getTypesWithActiveSchemaFormatters()
public java.util.Set<java.lang.String> getTypesWithModifiableFormatters()
public boolean hasFormatters(CmsObject cms, I_CmsResourceType resType, java.util.Collection<CmsContainer> containers)
cms
- the current CMS contextresType
- the resource type for which the formatter configuration should be retrievedcontainers
- the page containerspublic boolean isCreateContentsLocally()
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).
public boolean isDiscardInheritedModelPages()
If this flag is set, inherited model pages will be discarded for this sitemap.
public boolean isDiscardInheritedProperties()
If this is flag is set, inherited property definitions will be discarded for this sitemap.
public boolean isDiscardInheritedTypes()
If this flag is set, inherited resource types from a super-sitemap will be discarded for this sitemap.
public boolean isModuleConfiguration()
public boolean isPreferDetailPagesForLocalContents()
public CmsADEConfigData parent()
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.
protected void createContentDirectory() throws CmsException
CmsException
- if something goes wrongprotected CmsObject getCms()
protected CmsObject getCmsObject()
protected java.util.Map<java.lang.String,java.util.List<CmsDetailPageInfo>> getDetailPagesMap(java.util.List<CmsDetailPageInfo> detailPages)
detailPages
- the list of detail pagesprotected java.util.Map<java.lang.String,java.lang.String> getFolderTypes() throws CmsException
CmsException
- if something goes wrongprotected CmsFormatterConfiguration getFormatters(CmsObject cms, I_CmsResourceType resType, CmsFormatterConfiguration schemaFormatters)
cms
- the current CMS contextresType
- the resource typeschemaFormatters
- the resource schema formattersprotected CmsFormatterConfiguration getFormattersFromSchema(CmsObject cms, CmsResource res)
cms
- the current CMS contextres
- the resource for which the formatters should be retrievedprotected java.util.List<CmsFunctionReference> internalGetFunctionReferences()
protected java.util.List<CmsResourceTypeConfig> internalGetResourceTypes(boolean filterDisabled)
filterDisabled
- true if disabled types should be filtered from the resultprotected java.util.List<CmsDetailPageInfo> mergeDetailPages(java.util.List<CmsDetailPageInfo> parentDetailPages, java.util.List<CmsDetailPageInfo> ownDetailPages)
parentDetailPages
- the parent's detail pagesownDetailPages
- the child's detail pagesprotected java.util.List<CmsDetailPageInfo> updateUris(java.util.List<CmsDetailPageInfo> detailPages)
detailPages
- the original list of detail pages