Class CmsWrapperPreference
- java.lang.Object
-
- org.opencms.configuration.preferences.CmsWrapperPreference
-
- All Implemented Interfaces:
I_CmsPreference
public class CmsWrapperPreference extends java.lang.Object implements I_CmsPreference
Wrapper used for built-in preferene which have also been configured in opencms-workplace.xml.
-
-
Constructor Summary
Constructors Constructor Description CmsWrapperPreference(CmsPreferenceData prefData, I_CmsPreference wrappedPref)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.dom4j.ElementcreateConfigurationItem()Creates the configuration for this preference.java.lang.StringgetDefaultValue()Gets the default value for the preference.java.lang.StringgetName()Gets the preference name.CmsXmlContentPropertygetPropertyDefinition(CmsObject cms)Gets the metadata describing how the setting should be edited.java.lang.StringgetTab()Gets the preference tab.java.lang.StringgetValue(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, java.lang.String value)Sets the value of the preference in a CmsDefaultUserSettings instance.
-
-
-
Constructor Detail
-
CmsWrapperPreference
public CmsWrapperPreference(CmsPreferenceData prefData, I_CmsPreference wrappedPref)
Creates a new instance.- Parameters:
prefData- the configured preference datawrappedPref- the preference being wrapped
-
-
Method Detail
-
createConfigurationItem
public org.dom4j.Element 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:
I_CmsPreference.createConfigurationItem()
-
getDefaultValue
public java.lang.String getDefaultValue()
Description copied from interface:I_CmsPreferenceGets the default value for the preference.- Specified by:
getDefaultValuein interfaceI_CmsPreference- Returns:
- the default value
- See Also:
I_CmsPreference.getDefaultValue()
-
getName
public java.lang.String getName()
Description copied from interface:I_CmsPreferenceGets the preference name.- Specified by:
getNamein interfaceI_CmsPreference- Returns:
- the preference name
- See Also:
I_CmsPreference.getName()
-
getPropertyDefinition
public CmsXmlContentProperty getPropertyDefinition(CmsObject cms)
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:
I_CmsPreference.getPropertyDefinition(org.opencms.file.CmsObject)
-
getTab
public java.lang.String getTab()
Description copied from interface:I_CmsPreferenceGets the preference tab.- Specified by:
getTabin interfaceI_CmsPreference- Returns:
- the preference tab
- See Also:
I_CmsPreference.getTab()
-
getValue
public java.lang.String getValue(CmsDefaultUserSettings userSettings)
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:
I_CmsPreference.getValue(org.opencms.configuration.CmsDefaultUserSettings)
-
isDisabled
public boolean isDisabled(CmsObject cms)
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:
I_CmsPreference.isDisabled(CmsObject)
-
setValue
public void setValue(CmsDefaultUserSettings settings, java.lang.String value)
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:
I_CmsPreference.setValue(org.opencms.configuration.CmsDefaultUserSettings, java.lang.String)
-
-