Interface PageByUnit
- 
public interface PageByUnitThe
PageByUnitis the interface used by thePageByBeanto 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
WebApiobject 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
PageByUnituses thePageByElementListfor the list of elements the user can select to filter the data. Although typically it only has one, a unit may have morePageByElementListobjects;getElementLists()returns the enumeration ofPageByElementListobjects available for this unit.- Since:
 - MicroStrategy Web 8.0.0
 - See Also:
 PageByBean,PageByElementList,PageByElement
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static intSORT_ASCENDINGConstant used bygetSortType()to indicate the unit is sorted ascending.static intSORT_DEFAULTConstant used bygetSortType()to indicate the unit is using its default sort.static intSORT_DESCENDINGConstant used bygetSortType()to indicate the unit is sorted descending.static intSORT_EMPTYConstant used bygetSortType()to indicate the unit is not sorted. 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetAlias()This method returns the alias for this unit.WebAttributeFormsgetDisplayAttrForms()intgetDisplayType()java.util.EnumerationgetElementLists()Returns the enumeration ofPageByElementListavailable for this unit.java.lang.StringgetKey()The key is used to uniquely identify the Page-by unit within the units collection.PageByUnitgetNext()This method is used to navigate across the collection of page-by units.PageByUnitgetPrevious()This method is used to navigate across the collection of page-by units.java.lang.StringgetRenameKey()This method returns the key used by the rename dialog to identify this unit within the working set.intgetSortType()Returns the current sort of this unit.WebObjectInfogetTarget()This returns theWebObjectInfoassociated with this unit (if any).WebComponentgetTargetBean()returns the target component bean (Report Bean or RW Bean).WebTitlegetTitle()Returns the underlyingtitleobject associated with this unit.java.lang.ObjectgetUnit()Returns the underlyingWebApiobject associated with this unit.intgetUnitType()It returns theEnumDSSXMLTemplateUnitTypeassociated with this unit.booleanisDeleteAvailable()Indicates if the current unit can be deleted from the list of working set of objects.booleanisFirst()Indicates if this is the first unit in the collection of page-by units.booleanisLast()Indicates if this is the last unit in the collection of page-by units.booleanisPivotAvailable()Helper method that checks whether any pivot is available.booleanisPivotAvailable(int axis)Indicates if pivoting to the corresponding axis is available for this unit.booleanisPropertiesEditorAvailable()Indicates if the user can open the properties editor for this unit.booleanisRemoveAvailable()Indicates if the current unit can be removed from the list of page-by units.booleanisRenameAvailable()Indicates if the current unit alias can be changed.booleanisSortAvailable()Indicates if sorting is available for this unit. 
 - 
 
- 
- 
Field Detail
- 
SORT_EMPTY
static final int SORT_EMPTY
Constant used bygetSortType()to indicate the unit is not sorted.- See Also:
 - Constant Field Values
 
 
- 
SORT_DEFAULT
static final int SORT_DEFAULT
Constant used bygetSortType()to indicate the unit is using its default sort.- See Also:
 - Constant Field Values
 
 
- 
SORT_ASCENDING
static final int SORT_ASCENDING
Constant used bygetSortType()to indicate the unit is sorted ascending.- See Also:
 - Constant Field Values
 
 
- 
SORT_DESCENDING
static final int SORT_DESCENDING
Constant used bygetSortType()to indicate the unit is sorted descending.- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
getAlias
java.lang.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 underlyingWebObjectInfo.
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 thePageByUnitselects a descriptor as its alias.- Returns:
 - The alias that this unit should display.
 
 
- 
getTarget
WebObjectInfo getTarget()
This returns theWebObjectInfoassociated with this unit (if any). In case the unit is the Metrics-axis, it will have no target associated.- Returns:
 - The 
WebObjectInfolinked to this unit;nullif none. 
 
- 
getUnitType
int getUnitType()
It returns theEnumDSSXMLTemplateUnitTypeassociated with this unit. This is only meaningful in the case of reports as documents don't useWebTemplateUnits.- Returns:
 - The 
EnumDSSXMLTemplateUnitTypeassociated with this unit. 
 
- 
getKey
java.lang.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.
 
 
- 
getUnit
java.lang.Object getUnit()
Returns the underlyingWebApiobject associated with this unit. For reports it returns an instance of aWebTemplateUnit; for documents it returns aRWGroupByUnit.- Returns:
 - The underlying 
WebApiobject associated with this unit. 
 
- 
getTitle
WebTitle getTitle()
Returns the underlyingtitleobject associated with this unit. for documents it returns null;.- Returns:
 - The underlying 
titleobject associated with this unit. - Since:
 - MicroStrategy Web 9.0.0
 
 
- 
isFirst
boolean isFirst()
Indicates if this is the first unit in the collection of page-by units.- Returns:
 trueif this is the first unit of the list.
 
- 
isLast
boolean isLast()
Indicates if this is the last unit in the collection of page-by units.- Returns:
 trueif this is the last unit of the list.
 
- 
getPrevious
PageByUnit getPrevious()
This method is used to navigate across the collection of page-by units. It returns the previousPageByUnit; if this is the first one, it returnsnull.- Returns:
 - PageByUnit the previous 
PageByUnitin the units collection. 
 
- 
getNext
PageByUnit getNext()
This method is used to navigate across the collection of page-by units. It returns the nextPageByUnit; if this is the last one, it returnsnull.- Returns:
 - PageByUnit the next 
PageByUnitin the units collection. 
 
- 
isSortAvailable
boolean isSortAvailable()
Indicates if sorting is available for this unit. For example, reports don't support sorting on page-by units.- Returns:
 trueif the document can be sorted for this unit
 
- 
isPivotAvailable
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 returnsfalseif a user doesn't have enough.- Parameters:
 axis- the axis for which this unit would be pivoted.- Returns:
 trueif this unit can be pivoted to the corresponding axis.
 
- 
isPivotAvailable
boolean isPivotAvailable()
Helper method that checks whether any pivot is available. This method also checks for privileges and returnsfalseif a user doesn't have enough.- Returns:
 trueif this unit can be pivoted to any axis.
 
- 
isRemoveAvailable
boolean isRemoveAvailable()
Indicates if the current unit can be removed from the list of page-by units. This method would returnfalseif the unit is locked. It also checks for privileges and returnsfalseif a user doesn't have enough.- Returns:
 trueif this unit can be removed from the page-by section of this report/document,
 
- 
isDeleteAvailable
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
falseif the unit cannot be removed.- Returns:
 trueif this unit can be removed from this report/document definition.- Since:
 - MicroStrategy Web 8.0.1
 
 
- 
isRenameAvailable
boolean isRenameAvailable()
Indicates if the current unit alias can be changed. This method would returnfalseif the unit cannot be renamed. It also checks for privileges and returnsfalseif a user doesn't have enough.- Returns:
 trueif this unit can be renamed in this report/document
 
- 
isPropertiesEditorAvailable
boolean isPropertiesEditorAvailable()
Indicates if the user can open the properties editor for this unit. This feature is only available for documents..- Returns:
 trueif the properties editor is available for this unit.
 
- 
getSortType
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.
 
 
- 
getRenameKey
java.lang.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.
 
 
- 
getElementLists
java.util.Enumeration getElementLists()
Returns the enumeration of
PageByElementListavailable for this unit. APageByElementListrepresents the list of elements the user can select to filter the data. Although typically it only has one, a unit may have morePageByElementListobjects.When the bean is in design mode, the
PageByElementListsare not available and this method will return an empty enumeration.- Returns:
 - The enumeration of all possible 
PageByElementListassociated with this unit. 
 
- 
getTargetBean
WebComponent getTargetBean()
returns the target component bean (Report Bean or RW Bean).- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
getDisplayType
int getDisplayType()
 
- 
getDisplayAttrForms
WebAttributeForms getDisplayAttrForms()
 
 - 
 
 -