public interface

PageByUnit

com.microstrategy.web.app.beans.PageByUnit

Class Overview

The PageByUnit is the interface used by the PageByBean to represent a single unit.

A page-by unit controls the data displayed to the end-user: when a report or document is executed each unit is displayed with a combo-box that lists its elements; the data is automatically filtered based on the currently selected element.

Although conceptually the same, the underlying WebApi object used for the page-by axis and the group-by section are different. This interface allows the application to abstract their differences and handle a single object.

End users can manipulate the page-by units by selecting their current element, changing their arrangement (pivoting), and sorting them. Not all functionality is always available (for example, sorting is not available for reports). Methods like isSortAvailable() are used by the Transform to identify what functionality is.

The PageByUnit uses the PageByElementList for the list of elements the user can select to filter the data. Although typically it only has one, a unit may have more PageByElementList objects; getElementLists() returns the enumeration of PageByElementList objects available for this unit.

Summary

Constants
int SORT_ASCENDING Constant used by getSortType() to indicate the unit is sorted ascending.
int SORT_DEFAULT Constant used by getSortType() to indicate the unit is using its default sort.
int SORT_DESCENDING Constant used by getSortType() to indicate the unit is sorted descending.
int SORT_EMPTY Constant used by getSortType() to indicate the unit is not sorted.
Public Methods
abstract String getAlias()
This method returns the alias for this unit.
abstract WebAttributeForms getDisplayAttrForms()
abstract int getDisplayType()
abstract Enumeration getElementLists()

Returns the enumeration of PageByElementList available for this unit.

abstract String getKey()
The key is used to uniquely identify the Page-by unit within the units collection.
abstract PageByUnit getNext()
This method is used to navigate across the collection of page-by units.
abstract PageByUnit getPrevious()
This method is used to navigate across the collection of page-by units.
abstract String getRenameKey()
This method returns the key used by the rename dialog to identify this unit within the working set.
abstract int getSortType()
Returns the current sort of this unit.
abstract WebObjectInfo getTarget()
This returns the WebObjectInfo associated with this unit (if any).
abstract WebComponent getTargetBean()
returns the target component bean (Report Bean or RW Bean).
abstract WebTitle getTitle()
Returns the underlying title object associated with this unit.
abstract Object getUnit()
Returns the underlying WebApi object associated with this unit.
abstract int getUnitType()
It returns the EnumDSSXMLTemplateUnitType associated with this unit.
abstract boolean isDeleteAvailable()

Indicates if the current unit can be deleted from the list of working set of objects.

abstract boolean isFirst()
Indicates if this is the first unit in the collection of page-by units.
abstract boolean isLast()
Indicates if this is the last unit in the collection of page-by units.
abstract boolean isPivotAvailable(int axis)
Indicates if pivoting to the corresponding axis is available for this unit.
abstract boolean isPivotAvailable()
Helper method that checks whether any pivot is available.
abstract boolean isPropertiesEditorAvailable()
Indicates if the user can open the properties editor for this unit.
abstract boolean isRemoveAvailable()
Indicates if the current unit can be removed from the list of page-by units.
abstract boolean isRenameAvailable()
Indicates if the current unit alias can be changed.
abstract boolean isSortAvailable()
Indicates if sorting is available for this unit.

Constants

public static final int SORT_ASCENDING

Constant used by getSortType() to indicate the unit is sorted ascending.

Constant Value: 2 (0x00000002)

public static final int SORT_DEFAULT

Constant used by getSortType() to indicate the unit is using its default sort.

Constant Value: 1 (0x00000001)

public static final int SORT_DESCENDING

Constant used by getSortType() to indicate the unit is sorted descending.

Constant Value: 3 (0x00000003)

public static final int SORT_EMPTY

Constant used by getSortType() to indicate the unit is not sorted.

Constant Value: 0 (0x00000000)

Public Methods

public abstract String getAlias ()

This method returns the alias for this unit. The alias is the name of the unit displayed to the end user, typically the object of the underlying WebObjectInfo.

The alias might be different from the object's name, as end-users can change the alias in the working set.

In some ocassions, the unit its not linked to a WebObjectInfo (for example users can move the "Metrics" axis to the page-by), in these cases the PageByUnit selects a descriptor as its alias.

Returns
  • The alias that this unit should display.

public abstract WebAttributeForms getDisplayAttrForms ()

public abstract int getDisplayType ()

public abstract Enumeration getElementLists ()

Returns the enumeration of PageByElementList available for this unit. A PageByElementList represents the list of elements the user can select to filter the data. Although typically it only has one, a unit may have more PageByElementList objects.

When the bean is in design mode, the PageByElementLists are not available and this method will return an empty enumeration.

Returns

public abstract String getKey ()

The key is used to uniquely identify the Page-by unit within the units collection. This key is used in events to indicate which unit is being manipulated.

Returns
  • The key to recognize this unit in the collection for pivoting and other manipulations.

public abstract PageByUnit getNext ()

This method is used to navigate across the collection of page-by units. It returns the next PageByUnit; if this is the last one, it returns null.

Returns
  • PageByUnit the next PageByUnit in the units collection.

public abstract PageByUnit getPrevious ()

This method is used to navigate across the collection of page-by units. It returns the previous PageByUnit; if this is the first one, it returns null.

Returns
  • PageByUnit the previous PageByUnit in the units collection.

public abstract String getRenameKey ()

This method returns the key used by the rename dialog to identify this unit within the working set. This is only meaningful if the unit can be renamed.

Returns
  • The key used by the rename dialog to identify this unit.

public abstract int getSortType ()

Returns the current sort of this unit. This is only meaningful if the unit can be sorted. It returns one of the following values:

Returns
  • The current sort order.

public abstract WebObjectInfo getTarget ()

This returns the WebObjectInfo associated with this unit (if any). In case the unit is the Metrics-axis, it will have no target associated.

Returns
  • The WebObjectInfo linked to this unit; null if none.

public abstract WebComponent getTargetBean ()

returns the target component bean (Report Bean or RW Bean).

public abstract WebTitle getTitle ()

Returns the underlying title object associated with this unit. for documents it returns null;.

Returns
  • The underlying title object associated with this unit.

public abstract Object getUnit ()

Returns the underlying WebApi object associated with this unit. For reports it returns an instance of a WebTemplateUnit; for documents it returns a RWGroupByUnit.

Returns
  • The underlying WebApi object associated with this unit.

public abstract int getUnitType ()

It returns the EnumDSSXMLTemplateUnitType associated with this unit. This is only meaningful in the case of reports as documents don't use WebTemplateUnits.

Returns

public abstract boolean isDeleteAvailable ()

Indicates if the current unit can be deleted from the list of working set of objects. When you simply remove an object from the page-by, the object can still be used in other parts of the report/document definition. When you deleted from the working-set, though, the report definition changes, the unit is not available anymore and the report gets re-executed with the new definition.

This method should check for privileges and other factors that might prevent changing the report/document defition and returns false if the unit cannot be removed.

Returns
  • true if this unit can be removed from this report/document definition.

public abstract boolean isFirst ()

Indicates if this is the first unit in the collection of page-by units.

Returns
  • true if this is the first unit of the list.

public abstract boolean isLast ()

Indicates if this is the last unit in the collection of page-by units.

Returns
  • true if this is the last unit of the list.

public abstract boolean isPivotAvailable (int axis)

Indicates if pivoting to the corresponding axis is available for this unit. For example, documents support pivoting only to the page-by axis. This method also checks for privileges and returns false if a user doesn't have enough.

Parameters
axis the axis for which this unit would be pivoted.
Returns
  • true if this unit can be pivoted to the corresponding axis.

public abstract boolean isPivotAvailable ()

Helper method that checks whether any pivot is available. This method also checks for privileges and returns false if a user doesn't have enough.

Returns
  • true if this unit can be pivoted to any axis.

public abstract boolean isPropertiesEditorAvailable ()

Indicates if the user can open the properties editor for this unit. This feature is only available for documents..

Returns
  • true if the properties editor is available for this unit.

public abstract boolean isRemoveAvailable ()

Indicates if the current unit can be removed from the list of page-by units. This method would return false if the unit is locked. It also checks for privileges and returns false if a user doesn't have enough.

Returns
  • true if this unit can be removed from the page-by section of this report/document,

public abstract boolean isRenameAvailable ()

Indicates if the current unit alias can be changed. This method would return false if the unit cannot be renamed. It also checks for privileges and returns false if a user doesn't have enough.

Returns
  • true if this unit can be renamed in this report/document

public abstract boolean isSortAvailable ()

Indicates if sorting is available for this unit. For example, reports don't support sorting on page-by units.

Returns
  • true if the document can be sorted for this unit