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
ConstructorDescriptionCmsWrapperPreference
(CmsPreferenceData prefData, I_CmsPreference wrappedPref) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionorg.dom4j.Element
Creates 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 .boolean
isDisabled
(CmsObject cms) Returns true if the preference is disabled.void
setValue
(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_CmsPreference
Creates the configuration for this preference.- Specified by:
createConfigurationItem
in interfaceI_CmsPreference
- Returns:
- the configuration for this preference
- See Also:
-
getDefaultValue
Description copied from interface:I_CmsPreference
Gets the default value for the preference.- Specified by:
getDefaultValue
in interfaceI_CmsPreference
- Returns:
- the default value
- See Also:
-
getName
Description copied from interface:I_CmsPreference
Gets the preference name.- Specified by:
getName
in interfaceI_CmsPreference
- Returns:
- the preference name
- See Also:
-
getPropertyDefinition
Description copied from interface:I_CmsPreference
Gets the metadata describing how the setting should be edited.- Specified by:
getPropertyDefinition
in 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_CmsPreference
Gets the preference tab.- Specified by:
getTab
in interfaceI_CmsPreference
- Returns:
- the preference tab
- See Also:
-
getValue
Description copied from interface:I_CmsPreference
Reads the value of the preference from a CmsDefaultUserSettings instance .- Specified by:
getValue
in 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_CmsPreference
Returns true if the preference is disabled.- Specified by:
isDisabled
in interfaceI_CmsPreference
- Parameters:
cms
- the current CMS context- Returns:
- true if the preference is disabled
- See Also:
-
setValue
Description copied from interface:I_CmsPreference
Sets the value of the preference in a CmsDefaultUserSettings instance.- Specified by:
setValue
in interfaceI_CmsPreference
- Parameters:
settings
- the settings used to store the preference valuevalue
- the new value- See Also:
-