Class CmsFormatterConfigurationCacheState
- java.lang.Object
-
- org.opencms.ade.configuration.formatters.CmsFormatterConfigurationCacheState
-
public class CmsFormatterConfigurationCacheState extends java.lang.Object
Represents the currently cached collection of all formatter beans extracted from formatter configuration files.Objects of this class are immutable, but have a method to create an updated copy.
-
-
Constructor Summary
Constructors Constructor Description CmsFormatterConfigurationCacheState(java.util.Map<CmsUUID,I_CmsFormatterBean> formatters)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsFormatterConfigurationCacheState
createUpdatedCopy(java.util.Map<CmsUUID,I_CmsFormatterBean> updateFormatters)
Creates a new copy of this state in which some entries are removed or replaced.java.util.Map<CmsUUID,I_CmsFormatterBean>
getAutoEnabledFormatters()
Gets the map of formatters which are automatically enabled.java.util.Map<CmsUUID,I_CmsFormatterBean>
getFormatters()
Gets the map of all formatters.java.util.Collection<I_CmsFormatterBean>
getFormattersForType(java.lang.String resourceType, boolean filterAutoEnabled)
Gets the formatters for a specific resource types, and optionally only returns those which are automatically enabled.
-
-
-
Constructor Detail
-
CmsFormatterConfigurationCacheState
public CmsFormatterConfigurationCacheState(java.util.Map<CmsUUID,I_CmsFormatterBean> formatters)
Creates a new instance.- Parameters:
formatters
- the initial map of formatters
-
-
Method Detail
-
createUpdatedCopy
public CmsFormatterConfigurationCacheState createUpdatedCopy(java.util.Map<CmsUUID,I_CmsFormatterBean> updateFormatters)
Creates a new copy of this state in which some entries are removed or replaced.This does not change the state object on which the method is called.
- Parameters:
updateFormatters
- a map of formatters to change, where the key is the structure id and the value is either the replacement or null if the map entry should be removed- Returns:
- the updated copy
-
getAutoEnabledFormatters
public java.util.Map<CmsUUID,I_CmsFormatterBean> getAutoEnabledFormatters()
Gets the map of formatters which are automatically enabled.- Returns:
- the map of automatically enabled formatters with structure ids as keys
-
getFormatters
public java.util.Map<CmsUUID,I_CmsFormatterBean> getFormatters()
Gets the map of all formatters.- Returns:
- the map of all formatters
-
getFormattersForType
public java.util.Collection<I_CmsFormatterBean> getFormattersForType(java.lang.String resourceType, boolean filterAutoEnabled)
Gets the formatters for a specific resource types, and optionally only returns those which are automatically enabled.- Parameters:
resourceType
- the resource type namefilterAutoEnabled
- true if only the automatically enabled formatters should be returned- Returns:
- the formatters for the type
-
-