Class CmsFormatterConfigurationCacheState

java.lang.Object
org.opencms.ade.configuration.formatters.CmsFormatterConfigurationCacheState

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 Details

  • Method Details

    • createUpdatedCopy

      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

      Gets the map of formatters which are automatically enabled.

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

      Gets the map of all formatters.

      Returns:
      the map of all formatters
    • getFormattersForType

      public Collection<I_CmsFormatterBean> getFormattersForType(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