public abstract class

PreferenceDefinitionBase

extends Object
implements PreferenceDefinition
java.lang.Object
   ↳ com.microstrategy.web.preferences.PreferenceDefinitionBase
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This class encapsulates the definition of a preference. It may be extended to provide handling of custom preferences with user-defined properties and validation. Subclasses are likely to override validate(String, Preferences, Object), setAttributes(Attributes, PreferenceLevels), and buildXmlAttributes(XMLBuilder).

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.web.preferences.PreferenceDefinition
Fields
protected List<PreferenceAllowableValue> _allowableValues
protected boolean _clusterPropagate
protected String _description
protected PreferenceLevels _levels
protected String _name
protected PreferenceLevel _scope
protected String _type
protected String _value
Public Constructors
PreferenceDefinitionBase()
Constructor for creating PreferenceDefinition objects from XML parsing.
Public Methods
boolean clusterPropagate()
Whether changes to the preference will also propagate to other Intelligence Servers in the cluster.
List<PreferenceAllowableValue> getAllowableValues()
Retrieves a list of PreferenceAllowableValue objects which are supported by thie preference.
String getDescription()
A description of the definition.
String getName()
The name/key of the definition.
PreferenceLevel getScope()
The scope refers to the PreferenceLevel which this definition applies.
String getType()
String getValue()
The value of the definition.
void setClusterPropagate(boolean propagate)
Configures whether changes to the preference will also propagate to other Intelligence Servers in the cluster.
void setDescription(String value)
Update the description of a definition.
void setScope(PreferenceLevel lvl)
Updates the scope of the definition.
void setType(String type)
Type is an application dependent declaration - typically used for validating the value property.
void setValue(String value)
Update the value of the definition.
String toString()
Protected Methods
abstract void buildXmlAttributes(XMLBuilder builder)
This is used to persist the state of the preference definition.
PreferenceLevels getEnumPreferenceLevels()
abstract void setAttributes(Attributes attrs, PreferenceLevels group, boolean update)
This restores the state of the preference definition from a set of XML attributes.
abstract void setAttributes(Attributes attrs, PreferenceLevels group)
This restores the state of the preference definition from a set of XML attributes.
void setEnumPreferenceLevels(PreferenceLevels lvls)
void setName(String name)
abstract void validate(String value, Preferences pref, Object validationObject)
This method is triggered by callback when setting preference values.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.microstrategy.web.preferences.PreferenceDefinition

Fields

protected List<PreferenceAllowableValue> _allowableValues

protected boolean _clusterPropagate

protected String _description

protected PreferenceLevels _levels

protected String _name

protected PreferenceLevel _scope

protected String _type

protected String _value

Public Constructors

public PreferenceDefinitionBase ()

Constructor for creating PreferenceDefinition objects from XML parsing.

Public Methods

public boolean clusterPropagate ()

Whether changes to the preference will also propagate to other Intelligence Servers in the cluster. Defaults to true.

Returns
  • whether changes to the preference will also propagate to other Servers in the cluster.

public List<PreferenceAllowableValue> getAllowableValues ()

Retrieves a list of PreferenceAllowableValue objects which are supported by thie preference.

Returns
  • A list of allowable value objects supoprted by this preference.

public String getDescription ()

A description of the definition.

Returns
  • The definition description.

public String getName ()

The name/key of the definition.

public PreferenceLevel getScope ()

The scope refers to the PreferenceLevel which this definition applies.

Returns

public String getType ()

public String getValue ()

The value of the definition.

Returns
  • The definition value.

public void setClusterPropagate (boolean propagate)

Configures whether changes to the preference will also propagate to other Intelligence Servers in the cluster.

Parameters
propagate whether to propagate preference value changes to other servers in the cluster.

public void setDescription (String value)

Update the description of a definition.

Parameters
value The new definition description.

public void setScope (PreferenceLevel lvl)

Updates the scope of the definition.

Parameters
lvl The new PreferenceLevel scope.
Throws
IllegalArgumentException

public void setType (String type)

Type is an application dependent declaration - typically used for validating the value property. See specific PreferenceDefinition implementations for further details.

Parameters
type type of the definition.

public void setValue (String value)

Update the value of the definition.

Parameters
value the new definition value.

public String toString ()

Protected Methods

protected abstract void buildXmlAttributes (XMLBuilder builder)

This is used to persist the state of the preference definition. Only attributes are set on the builder node. No new nodes should be created, nor existing ones closed.

protected PreferenceLevels getEnumPreferenceLevels ()

protected abstract void setAttributes (Attributes attrs, PreferenceLevels group, boolean update)

This restores the state of the preference definition from a set of XML attributes.

Throws
PreferencesException
PreferencesException

protected abstract void setAttributes (Attributes attrs, PreferenceLevels group)

This restores the state of the preference definition from a set of XML attributes.

protected void setEnumPreferenceLevels (PreferenceLevels lvls)

protected void setName (String name)

protected abstract void validate (String value, Preferences pref, Object validationObject)

This method is triggered by callback when setting preference values.