public class CmsUserDefinedPreference extends A_CmsPreference
Constructor and Description |
---|
CmsUserDefinedPreference(java.lang.String name,
java.lang.String value,
CmsXmlContentProperty prop,
java.lang.String tab)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
static void |
fillAttributes(CmsPreferenceData pref,
org.dom4j.Element elem)
Helper method used to create the configuration attributes for a CmsPreferenceData bean.
|
java.lang.String |
getDefaultValue()
Gets the default value for the preference.
|
java.lang.String |
getName()
Gets the preference name.
|
protected CmsXmlContentProperty |
getPropertyDefinition()
Gets the user-independent property configuration.
|
CmsXmlContentProperty |
getPropertyDefinition(CmsObject cms)
Gets the metadata describing how the setting should be edited.
|
java.lang.String |
getTab()
Gets the preference tab.
|
java.lang.String |
getValue(CmsDefaultUserSettings userSettings)
Reads the value of the preference from a CmsDefaultUserSettings instance .
|
void |
setValue(CmsDefaultUserSettings settings,
java.lang.String value)
Sets the value of the preference in a CmsDefaultUserSettings instance.
|
createConfigurationItem, isDisabled
public CmsUserDefinedPreference(java.lang.String name, java.lang.String value, CmsXmlContentProperty prop, java.lang.String tab)
name
- the preference namevalue
- the preference valueprop
- the bean containing the widget configuration for the preferencetab
- the tab on which to display the widgetpublic static void fillAttributes(CmsPreferenceData pref, org.dom4j.Element elem)
pref
- the preference dataelem
- the element in which the attributes should be createdpublic java.lang.String getDefaultValue()
I_CmsPreference
I_CmsPreference.getDefaultValue()
public java.lang.String getName()
I_CmsPreference
I_CmsPreference.getName()
public CmsXmlContentProperty getPropertyDefinition(CmsObject cms)
I_CmsPreference
getPropertyDefinition
in interface I_CmsPreference
getPropertyDefinition
in class A_CmsPreference
cms
- the current CMS contextI_CmsPreference.getPropertyDefinition(org.opencms.file.CmsObject)
public java.lang.String getTab()
I_CmsPreference
I_CmsPreference.getTab()
public java.lang.String getValue(CmsDefaultUserSettings userSettings)
I_CmsPreference
userSettings
- the user settings from which to read the preference valueI_CmsPreference.getValue(org.opencms.configuration.CmsDefaultUserSettings)
public void setValue(CmsDefaultUserSettings settings, java.lang.String value)
I_CmsPreference
settings
- the settings used to store the preference valuevalue
- the new valueI_CmsPreference.setValue(org.opencms.configuration.CmsDefaultUserSettings, java.lang.String)
protected CmsXmlContentProperty getPropertyDefinition()
A_CmsPreference
This is what is used to write the preference back to the workplace configuration.
getPropertyDefinition
in class A_CmsPreference
A_CmsPreference.getPropertyDefinition()