public class

PreferenceDefinitionImpl

extends PreferenceDefinitionBase
java.lang.Object
   ↳ com.microstrategy.web.preferences.PreferenceDefinitionBase
     ↳ com.microstrategy.web.preferences.PreferenceDefinitionImpl
Known Direct Subclasses

Class Overview

This class encapsulates the definition of a preference. Most definitions will simply use this implementation as the default. Custom definitions may extend the PreferenceDefinitionBase directly, or make use of predefined overrides offered by this class. Subclasses that override setAttributes(Attributes, PreferenceLevels), and buildXmlAttributes(XMLBuilder) should make the appropriate super call back to this class to handle the base attributes.

Summary

Constants
String Att_Class
String Att_ClusterPropagate
String Att_DescriptionID
String Att_Scope
String Tag_AllowableValue
String Tag_AllowableValues
[Expand]
Inherited Constants
From interface com.microstrategy.web.preferences.PreferenceDefinition
[Expand]
Inherited Fields
From class com.microstrategy.web.preferences.PreferenceDefinitionBase
Protected Constructors
PreferenceDefinitionImpl(String name, PreferenceLevels lvls)
PreferenceDefinitionImpl()
Constructor for creating PreferenceDefinition objects from XML parsing.
Public Methods
String toString()
Protected Methods
void buildXmlAttributes(XMLBuilder builder)
Constructs an XML representation of the preference definition.
void setAttributes(Attributes attrs, PreferenceLevels group, boolean update)
Populates the object with attributes from parsing the definition XML.
void setAttributes(Attributes attrs, PreferenceLevels group)
Populates the object with attributes from parsing the definition XML.
void validate(String value, Preferences pref, Object validationObject)
This method is deprecated. replaced by validateTransmute(String, Preferences, Object)
void validateAllowableValues(String value, Preferences pref, Object validationObject)
String validateTransmute(String value, Preferences pref, Object validationObject)
This method is triggered by callback when setting preference values.
[Expand]
Inherited Methods
From class com.microstrategy.web.preferences.PreferenceDefinitionBase
From class java.lang.Object
From interface com.microstrategy.web.preferences.PreferenceDefinition

Constants

public static final String Att_Class

Constant Value: "class"

public static final String Att_ClusterPropagate

Constant Value: "clusterPropagate"

public static final String Att_DescriptionID

Constant Value: "des-id"

public static final String Att_Scope

Constant Value: "scp"

public static final String Tag_AllowableValue

Constant Value: "allowableValue"

public static final String Tag_AllowableValues

Constant Value: "allowableValues"

Protected Constructors

protected PreferenceDefinitionImpl (String name, PreferenceLevels lvls)

protected PreferenceDefinitionImpl ()

Constructor for creating PreferenceDefinition objects from XML parsing.

Public Methods

public String toString ()

Protected Methods

protected void buildXmlAttributes (XMLBuilder builder)

Constructs an XML representation of the preference definition. Persists the following attributes: name, value, description, type, scope, and the implementation class of PreferenceDefinition (omitted if PreferenceDefinitionImpl).

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

Populates the object with attributes from parsing the definition XML. The attributes populated by PreferenceDefinitionImpl are as follows: name, value, description, type, scope, and the preference levels grouping.

Parameters
attrs properties of the definition in XML form.
group used to check the scope of the definition.
Throws
PreferencesException if errors occur during the population.

protected void setAttributes (Attributes attrs, PreferenceLevels group)

Populates the object with attributes from parsing the definition XML. The attributes populated by PreferenceDefinitionImpl are as follows: name, value, description, type, scope, and the preference levels grouping. This method will call the setAttributes method with the update as false

Parameters
attrs properties of the definition in XML form.
group used to check the scope of the definition.
Throws
PreferencesException if errors occur during the population.

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

This method is deprecated.
replaced by validateTransmute(String, Preferences, Object)

This method is triggered by callback when setting preference values. By default, this method doesn't do anything.

protected void validateAllowableValues (String value, Preferences pref, Object validationObject)

protected String validateTransmute (String value, Preferences pref, Object validationObject)

This method is triggered by callback when setting preference values. By default, this method doesn't do anything. The returned value will be used to set the preference value - this facilitates preprocessing such as trimming strings, or date time reformating.

Returns
  • transmuted preference value