com.microstrategy.web.app.beans.PageByUnit |
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.
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 | ||||||||||
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()
Helper method that checks whether any pivot is available.
| ||||||||||
abstract boolean |
isPivotAvailable(int axis)
Indicates if pivoting to the corresponding axis is available for this unit.
| ||||||||||
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.
|
Constant used by getSortType()
to indicate the unit is sorted ascending.
Constant used by getSortType()
to indicate the unit is using its default sort.
Constant used by getSortType()
to indicate the unit is sorted descending.
Constant used by getSortType()
to indicate the unit is not sorted.
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 aWebObjectInfo
(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 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.
PageByElementList
associated with this unit.
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.
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
.
PageByUnit
in the units collection.
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
.
PageByUnit
in the units collection.
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 current sort of this unit. This is only meaningful if the unit can be sorted. It returns one of the following values:
This returns the WebObjectInfo
associated with this unit (if any).
In case the unit is the Metrics-axis, it will have no target associated.
WebObjectInfo
linked to this unit; null
if none.
returns the target component bean (Report Bean or RW Bean).
Returns the underlying title
object associated with this unit.
for documents it returns null;.
title
object associated with this unit.Returns the underlying WebApi
object associated with this unit.
For reports it returns an instance of a WebTemplateUnit
; for documents it
returns a RWGroupByUnit
.
WebApi
object associated with this unit.
It returns the EnumDSSXMLTemplateUnitType
associated with this unit. This
is only meaningful in the case of reports as documents don't use WebTemplateUnits
.
EnumDSSXMLTemplateUnitType
associated with this unit.
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.
true
if this unit can be removed from this report/document definition.Indicates if this is the first unit in the collection of page-by units.
true
if this is the first unit of the list.
Indicates if this is the last unit in the collection of page-by units.
true
if this is the last unit of the list.
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.
true
if this unit can be pivoted to any 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.
axis | the axis for which this unit would be pivoted. |
---|
true
if this unit can be pivoted to the corresponding axis.
Indicates if the user can open the properties editor for this unit. This feature is only available for documents..
true
if the properties editor is available for this unit.
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.
true
if this unit can be removed from the page-by section of this report/document,
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.
true
if this unit can be renamed in this report/document
Indicates if sorting is available for this unit. For example, reports don't support sorting on page-by units.
true
if the document can be sorted for this unit