Class CmsSettingConfiguration
java.lang.Object
org.opencms.ade.configuration.formatters.CmsSettingConfiguration
Contains the setting-related data for a formatter bean.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe shared setting configuration file that defines a setting, for configuration origin discovery: the file's structure id, whether the matching definition is formatter-specific, and whether it comes from a sitemap setting override (rather than the formatter's own shared settings). -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty configuration.CmsSettingConfiguration(List<CmsXmlContentProperty> listedSettings, Map<CmsUUID, Map<CmsSharedSettingKey, CmsXmlContentProperty>> sharedSettingConfigsById, List<CmsUUID> includeIds, String formatterKey, String displayType) -
Method Summary
Modifier and TypeMethodDescriptionfindDefiningFile(List<CmsUUID> overrideIds, String settingName) 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.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.
-
Constructor Details
-
CmsSettingConfiguration
public 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 configurationsharedSettingConfigsById- the map of shared setting configurations, with their structure ids as keysincludeIds- the list of structure ids of shared setting configurations referenced from the formatter configurationformatterKey- the key of the formatter using this setting configuration (may be null)displayType- the display type
-
-
Method Details
-
findDefiningFile
public CmsSettingConfiguration.CmsSettingDefiningFile findDefiningFile(List<CmsUUID> overrideIds, String settingName) 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. fromCmsADEConfigData.getSharedSettingOverrides()settingName- the setting name (the property name of the setting)- Returns:
- the file defining the setting, or
nullif 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
-