Class CmsSettingConfiguration

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

public class CmsSettingConfiguration extends Object
Contains the setting-related data for a formatter bean.
  • Constructor Details

    • CmsSettingConfiguration

      Creates an empty configuration.
    • CmsSettingConfiguration

      public CmsSettingConfiguration(List<CmsXmlContentProperty> listedSettings, Map<CmsUUID,Map<CmsSharedSettingKey,CmsXmlContentProperty>> sharedSettingConfigsById, List<CmsUUID> includeIds, String formatterKey, String displayType)
      Parameters:
      listedSettings - the setting entries configured in the formatter configuration
      sharedSettingConfigsById - the map of shared setting configurations, with their structure ids as keys
      includeIds - the list of structure ids of shared setting configurations referenced from the formatter configuration
      formatterKey - the key of the formatter using this setting configuration (may be null)
      displayType - the display type
  • Method Details

    • findDefiningFile

      Finds the shared setting configuration file that defines the given setting, searching the sitemap setting overrides first (highest priority) and then the formatter's own shared setting files, in order of decreasing specificity. Read-only, used for configuration origin discovery.

      Parameters:
      overrideIds - the sitemap setting override file ids in ascending specificity, e.g. from CmsADEConfigData.getSharedSettingOverrides()
      settingName - the setting name (the property name of the setting)
      Returns:
      the file defining the setting, or null if no shared setting file defines it
    • getSettings

      public Map<String,CmsXmlContentProperty> getSettings(com.google.common.collect.ImmutableList<CmsUUID> sharedSettingOverrides)
      Gets the setting map by looking up the configured settings' include names in either the shared settings files configured in the formatter configuration, or the override shared settings files whose ids are passed as parameter.

      Setting definitions from Override shared settings files have higher priority than those referenced in the formatter configuration, and later entries in both lists have higher prioritiy than earlier ones.

      Parameters:
      sharedSettingOverrides - the structure ids of Override shared setting configurations (highest priority last)
      Returns:
      the setting definition map