Class 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.

    • 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_CmsFormatterBeangetAutoEnabledFormatters()
        Gets the map of formatters which are automatically enabled.

        Returns:
        the map of automatically enabled formatters with structure ids as keys
      • getFormattersForType

        public java.util.Collection<I_CmsFormatterBeangetFormattersForType​(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 name
        filterAutoEnabled - true if only the automatically enabled formatters should be returned
        Returns:
        the formatters for the type