Class CmsUserDefinedPreference
java.lang.Object
org.opencms.configuration.preferences.A_CmsPreference
org.opencms.configuration.preferences.CmsUserDefinedPreference
- All Implemented Interfaces:
 I_CmsPreference
Subclass for user-defined preferences.
- 
Constructor Summary
ConstructorsConstructorDescriptionCmsUserDefinedPreference(String name, String value, CmsXmlContentProperty prop, String tab) Creates a new instance. - 
Method Summary
Modifier and TypeMethodDescriptionstatic voidfillAttributes(CmsPreferenceData pref, org.dom4j.Element elem) Helper method used to create the configuration attributes for a CmsPreferenceData bean.Gets the default value for the preference.getName()Gets the preference name.protected CmsXmlContentPropertyGets the user-independent property configuration.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 .voidsetValue(CmsDefaultUserSettings settings, String value) Sets the value of the preference in a CmsDefaultUserSettings instance.Methods inherited from class org.opencms.configuration.preferences.A_CmsPreference
createConfigurationItem, isDisabled 
- 
Constructor Details
- 
CmsUserDefinedPreference
Creates a new instance.- Parameters:
 name- the preference namevalue- the preference valueprop- the bean containing the widget configuration for the preferencetab- the tab on which to display the widget
 
 - 
 - 
Method Details
- 
fillAttributes
Helper method used to create the configuration attributes for a CmsPreferenceData bean.- Parameters:
 pref- the preference dataelem- the element in which the attributes should be created
 - 
getDefaultValue
Description copied from interface:I_CmsPreferenceGets the default value for the preference.- Returns:
 - the default value
 - See Also:
 
 - 
getName
Description copied from interface:I_CmsPreferenceGets the preference name.- 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- Overrides:
 getPropertyDefinitionin classA_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.- Returns:
 - the preference tab
 - See Also:
 
 - 
getValue
Description copied from interface:I_CmsPreferenceReads the value of the preference from a CmsDefaultUserSettings instance .- Parameters:
 userSettings- the user settings from which to read the preference value- Returns:
 - the preference value
 - See Also:
 
 - 
setValue
Description copied from interface:I_CmsPreferenceSets the value of the preference in a CmsDefaultUserSettings instance.- Parameters:
 settings- the settings used to store the preference valuevalue- the new value- See Also:
 
 - 
getPropertyDefinition
Description copied from class:A_CmsPreferenceGets the user-independent property configuration.This is what is used to write the preference back to the workplace configuration.
- Specified by:
 getPropertyDefinitionin classA_CmsPreference- Returns:
 - the property configuration
 - See Also:
 
 
 -