Class CmsWrapperPreference
java.lang.Object
org.opencms.configuration.preferences.CmsWrapperPreference
- All Implemented Interfaces:
I_CmsPreference
Wrapper used for built-in preferene which have also been configured in opencms-workplace.xml.
-
Constructor Summary
ConstructorsConstructorDescriptionCmsWrapperPreference(CmsPreferenceData prefData, I_CmsPreference wrappedPref) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionorg.dom4j.ElementCreates the configuration for this preference.Gets the default value for the preference.getName()Gets the preference name.Gets the metadata describing how the setting should be edited.getTab()Gets the preference tab.getValue(CmsDefaultUserSettings userSettings) Reads the value of the preference from a CmsDefaultUserSettings instance .booleanisDisabled(CmsObject cms) Returns true if the preference is disabled.voidsetValue(CmsDefaultUserSettings settings, String value) Sets the value of the preference in a CmsDefaultUserSettings instance.
-
Constructor Details
-
CmsWrapperPreference
Creates a new instance.- Parameters:
prefData- the configured preference datawrappedPref- the preference being wrapped
-
-
Method Details
-
createConfigurationItem
Description copied from interface:I_CmsPreferenceCreates the configuration for this preference.- Specified by:
createConfigurationItemin interfaceI_CmsPreference- Returns:
- the configuration for this preference
- See Also:
-
getDefaultValue
Description copied from interface:I_CmsPreferenceGets the default value for the preference.- Specified by:
getDefaultValuein interfaceI_CmsPreference- Returns:
- the default value
- See Also:
-
getName
Description copied from interface:I_CmsPreferenceGets the preference name.- Specified by:
getNamein interfaceI_CmsPreference- Returns:
- the preference name
- See Also:
-
getPropertyDefinition
Description copied from interface:I_CmsPreferenceGets the metadata describing how the setting should be edited.- Specified by:
getPropertyDefinitionin interfaceI_CmsPreference- Parameters:
cms- the current CMS context- Returns:
- the metadata for the client which describes how the setting should be edited
- See Also:
-
getTab
Description copied from interface:I_CmsPreferenceGets the preference tab.- Specified by:
getTabin interfaceI_CmsPreference- Returns:
- the preference tab
- See Also:
-
getValue
Description copied from interface:I_CmsPreferenceReads the value of the preference from a CmsDefaultUserSettings instance .- Specified by:
getValuein interfaceI_CmsPreference- Parameters:
userSettings- the user settings from which to read the preference value- Returns:
- the preference value
- See Also:
-
isDisabled
Description copied from interface:I_CmsPreferenceReturns true if the preference is disabled.- Specified by:
isDisabledin interfaceI_CmsPreference- Parameters:
cms- the current CMS context- Returns:
- true if the preference is disabled
- See Also:
-
setValue
Description copied from interface:I_CmsPreferenceSets the value of the preference in a CmsDefaultUserSettings instance.- Specified by:
setValuein interfaceI_CmsPreference- Parameters:
settings- the settings used to store the preference valuevalue- the new value- See Also:
-