Class CmsContainerConfigurationCacheState
- java.lang.Object
-
- org.opencms.ade.containerpage.inherited.CmsContainerConfigurationCacheState
-
public class CmsContainerConfigurationCacheState extends java.lang.Object
A cache class for storing inherited container configurations.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
INHERITANCE_CONFIG_FILE_NAME
The standard file name for inherited container configurations.static org.apache.commons.logging.Log
LOG
The logger instance for this class.
-
Constructor Summary
Constructors Constructor Description CmsContainerConfigurationCacheState(java.util.Collection<CmsContainerConfigurationGroup> groups)
Creates a new cache state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getBasePath(java.lang.String rootPath)
Returns the base path for a given configuration file.protected java.lang.String
getCacheKey(java.lang.String basePath)
Gets the cache key for a given base path.CmsContainerConfiguration
getContainerConfiguration(java.lang.String rootPath, java.lang.String name)
Gets the container configuration for a given root path, name and locale.CmsContainerConfigurationCacheState
updateWithChangedGroups(java.util.Map<CmsUUID,CmsContainerConfigurationGroup> updateGroups)
Creates a new inheritance container cache state, which is based on this instance, but with some changed configurations.
-
-
-
Field Detail
-
INHERITANCE_CONFIG_FILE_NAME
public static final java.lang.String INHERITANCE_CONFIG_FILE_NAME
The standard file name for inherited container configurations.- See Also:
- Constant Field Values
-
LOG
public static final org.apache.commons.logging.Log LOG
The logger instance for this class.
-
-
Constructor Detail
-
CmsContainerConfigurationCacheState
public CmsContainerConfigurationCacheState(java.util.Collection<CmsContainerConfigurationGroup> groups)
Creates a new cache state.- Parameters:
groups
- the inheritance group configurations.
-
-
Method Detail
-
getContainerConfiguration
public CmsContainerConfiguration getContainerConfiguration(java.lang.String rootPath, java.lang.String name)
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(java.util.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
protected java.lang.String getBasePath(java.lang.String rootPath)
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
protected java.lang.String getCacheKey(java.lang.String basePath)
Gets the cache key for a given base path.- Parameters:
basePath
- the base path- Returns:
- the cache key for the base path
-
-