java.lang.Object | |
↳ | com.microstrategy.web.preferences.PreferenceDefinitionBase |
![]() |
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)
.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Constructor for creating PreferenceDefinition objects from XML parsing.
Whether changes to the preference will also propagate to other Intelligence Servers in the cluster. Defaults to true.
Retrieves a list of PreferenceAllowableValue
objects which are supported by thie preference.
A description of the definition.
The name/key of the definition.
The scope refers to the PreferenceLevel which this definition applies.
PreferenceLevel
scope.
The value of the definition.
Configures whether changes to the preference will also propagate to other Intelligence Servers in the cluster.
propagate | whether to propagate preference value changes to other servers in the cluster. |
---|
Update the description of a definition.
value | The new definition description. |
---|
Updates the scope of the definition.
lvl | The new PreferenceLevel scope.
|
---|
IllegalArgumentException |
---|
Type is an application dependent declaration - typically used for validating the value property. See specific PreferenceDefinition implementations for further details.
type | type of the definition. |
---|
Update the value of the definition.
value | the new definition value. |
---|
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.
This restores the state of the preference definition from a set of XML attributes.
PreferencesException | |
PreferencesException |
This restores the state of the preference definition from a set of XML attributes.
PreferencesException |
---|
This method is triggered by callback when setting preference values.
PreferencesException |
---|