public abstract class

PreferenceLevels

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

Class Overview

PreferenceLevel objects are typically grouped into application context groups. EnumPreferenceLevels is a factory for various groupings used in our framework. This abstract class generalizes the group operations without any dependence to any specific groupings. The convention of the array ordering is from the coarsest to finest level. In general, lookups will begin from a designated level, and if not found, will defer to its coarser parent level.

Summary

Protected Constructors
PreferenceLevels(PreferenceLevel[] levels)
Constructor for PreferenceLevels.
Public Methods
PreferenceLevel decode(int i)
Returns the PreferenceLevel at a given array position.
PreferenceLevel getChild(PreferenceLevel lvl)
PreferenceLevel getLast()
Returns the last PreferenceLevel object in the grouping.
final PreferenceLevel[] getLevels()
Returns an array of the PreferenceLevel grouping.
PreferenceLevel getParent(PreferenceLevel lvl)
PreferenceLevel getRoot()
Returns the first PreferenceLevel object in the grouping.
int indexOf(PreferenceLevel lvl)
Locates the position of the given PreferenceLevel in the PreferenceLevels array group.
boolean isOutOfScope(PreferenceLevel scopeBoundary, PreferenceLevel received)
This is to check to see if a received PreferenceLevel is within the scope of some defined PreferenceLevel boundary.
PreferenceLevel parse(String label)
Returns the PreferenceLevel from a label.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Protected Constructors

protected PreferenceLevels (PreferenceLevel[] levels)

Constructor for PreferenceLevels.

Public Methods

public PreferenceLevel decode (int i)

Returns the PreferenceLevel at a given array position.

Parameters
i Index position.
Returns
  • The PreferenceLevel.

public PreferenceLevel getChild (PreferenceLevel lvl)

public PreferenceLevel getLast ()

Returns the last PreferenceLevel object in the grouping.

public final PreferenceLevel[] getLevels ()

Returns an array of the PreferenceLevel grouping. The order of this grouping is important - the convention adopted here treats those ordered earlier in the array as more generic, while those further up the array as more specific. This affects the organization of default values.

Returns
  • The PreferenceLevel grouping

public PreferenceLevel getParent (PreferenceLevel lvl)

public PreferenceLevel getRoot ()

Returns the first PreferenceLevel object in the grouping.

public int indexOf (PreferenceLevel lvl)

Locates the position of the given PreferenceLevel in the PreferenceLevels array group.

Parameters
lvl The PreferenceLevel.
Returns
  • The index position in the array (starting from 0).

public boolean isOutOfScope (PreferenceLevel scopeBoundary, PreferenceLevel received)

This is to check to see if a received PreferenceLevel is within the scope of some defined PreferenceLevel boundary.

Throws
IllegalArgumentException

public PreferenceLevel parse (String label)

Returns the PreferenceLevel from a label.

Parameters
label Formal string description of the label.
Returns
  • The PreferenceLevel.
Throws
IllegalArgumentException

public String toString ()