Class CmsContainerConfigurationCacheState
java.lang.Object
org.opencms.ade.containerpage.inherited.CmsContainerConfigurationCacheState
A cache class for storing inherited container configurations.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The standard file name for inherited container configurations.static final org.apache.commons.logging.Log
The logger instance for this class. -
Constructor Summary
ConstructorDescriptionCreates a new cache state. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
getBasePath
(String rootPath) Returns the base path for a given configuration file.protected String
getCacheKey
(String basePath) Gets the cache key for a given base path.getContainerConfiguration
(String rootPath, String name) Gets the container configuration for a given root path, name and locale.updateWithChangedGroups
(Map<CmsUUID, CmsContainerConfigurationGroup> updateGroups) Creates a new inheritance container cache state, which is based on this instance, but with some changed configurations.
-
Field Details
-
INHERITANCE_CONFIG_FILE_NAME
The standard file name for inherited container configurations.- See Also:
-
LOG
The logger instance for this class.
-
-
Constructor Details
-
CmsContainerConfigurationCacheState
Creates a new cache state.- Parameters:
groups
- the inheritance group configurations.
-
-
Method Details
-
getContainerConfiguration
Gets the container configuration for a given root path, name and locale.- Parameters:
rootPath
- the root pathname
- the configuration name- Returns:
- the container configuration for the given combination of parameters
-
updateWithChangedGroups
public CmsContainerConfigurationCacheState updateWithChangedGroups(Map<CmsUUID, CmsContainerConfigurationGroup> updateGroups) Creates a new inheritance container cache state, which is based on this instance, but with some changed configurations.- Parameters:
updateGroups
- a map of the updated configurations, with the structure ids as keys- Returns:
- the new cache state
-
getBasePath
Returns the base path for a given configuration file. E.g. the result for the input '/sites/default/.container-config' will be '/sites/default'.- Parameters:
rootPath
- the root path of the configuration file- Returns:
- the base path for the configuration file
-
getCacheKey
Gets the cache key for a given base path.- Parameters:
basePath
- the base path- Returns:
- the cache key for the base path
-