public interface

WebTemplateSubtotals

com.microstrategy.web.objects.WebTemplateSubtotals

Class Overview

The WebTemplateSubtotals object represents the collection of subtotals on a template This object can be used to get the list of available subtotals, active subtotals etc, turn on a subtotal by position (axis), across level (unit) or grouped by some template units. Each object in the collection is of type WebTemplateSubtotal.

Summary

Public Methods
abstract WebTemplateSubtotal activateAxisSubtotal(int index, int subtotalStyle, int axisIndex)
Adds an axis or 'By Position' subtotal of the given type, with the given style, to the given axis.
abstract WebTemplateSubtotal activateGroupBySubtotal(int index, WebObjectInfo[][] units)
Adds a 'Group by' subtotal of the given type, grouped by the units defined in the array of units.
abstract WebTemplateSubtotal activateUnitSubtotal(int index, WebObjectInfo[] units)
Adds a Unit or 'Across Level' subtotal of the given type across the given set of template units.
abstract void deActivate(int index)
Inactivates the WebTemplateSubtotal object with the given index in the collection.
abstract void deActivateAll()
Inactivates all active subtotal objects from the collection.
abstract Enumeration elements()
Returns a java.util.Enumeration containing the objects in the collections.
abstract WebTemplateSubtotal get(int index)
Returns the WebTemplateSubtotal object with the given index in this collection.
abstract Enumeration getActiveSubtotals()
Returns an enumeration or collection of WebTemplateSubtotal objects that are active for the report.
abstract WebTemplateSubtotal getByType(int type)
Returns the WebTemplateSubtotal object with the given type.
abstract int getSubtotalsPosition(int axis)
Returns the subtotals position property for the given axis, from EnumDSSXMLSubtotalsPosition
abstract boolean isEmpty()
Returns whether the collection is empty.
abstract boolean isTypeActive(int subTotalType)
Returns whether the collection contains an object of the given subtotal type which is active (meaning that it is turned on for some axis or unit or group by).
abstract void setSubtotalsPosition(int axis, int position)
Sets the subtotals position property for the given axis, from EnumDSSXMLSubtotalsPosition
abstract int size()
Returns the number of items in the collection.

Public Methods

public abstract WebTemplateSubtotal activateAxisSubtotal (int index, int subtotalStyle, int axisIndex)

Adds an axis or 'By Position' subtotal of the given type, with the given style, to the given axis.

Parameters
index The index of the subtotal in the collection.
subtotalStyle The style of subtotal to add, from EnumDSSXMLSubtotalStyle.
axisIndex The axis to add the subtotal to, from EnumDSSXMLAxisName.
Returns
  • WebTemplateSubtotal A reference to the subtotal that was just added
Throws
IllegalArgumentException Thrown if one of the parameters is invalid.

public abstract WebTemplateSubtotal activateGroupBySubtotal (int index, WebObjectInfo[][] units)

Adds a 'Group by' subtotal of the given type, grouped by the units defined in the array of units.

Parameters
index The index of the subtotal in the collection.
units Array of array of template units.
Returns
  • WebTemplateSubtotal A reference to the subtotal that was just added
Throws
IllegalArgumentException

public abstract WebTemplateSubtotal activateUnitSubtotal (int index, WebObjectInfo[] units)

Adds a Unit or 'Across Level' subtotal of the given type across the given set of template units.

Parameters
index The index of the subtotal in the collection.
units Array of WebObjectInfo objects across which to add the subtotal.
Returns
  • WebTemplateSubtotal A reference to the subtotal that was just added
Throws
IllegalArgumentException Thrown if one of the parameters are invalid.

public abstract void deActivate (int index)

Inactivates the WebTemplateSubtotal object with the given index in the collection.

Parameters
index The index of the item to render inactive.
Throws
IndexOutOfBoundsException Thrown if no item with the given index can be found.

public abstract void deActivateAll ()

Inactivates all active subtotal objects from the collection. This will effectively remove all subtotals instances associated with each subtotal

public abstract Enumeration elements ()

Returns a java.util.Enumeration containing the objects in the collections.

Returns

public abstract WebTemplateSubtotal get (int index)

Returns the WebTemplateSubtotal object with the given index in this collection.

Parameters
index The index to return in the collection.
Returns
Throws
IndexOutOfBoundsException Thrown if the index does not exist in the collection.

public abstract Enumeration getActiveSubtotals ()

Returns an enumeration or collection of WebTemplateSubtotal objects that are active for the report.

Returns

public abstract WebTemplateSubtotal getByType (int type)

Returns the WebTemplateSubtotal object with the given type. If no such subtotal with the given type exists for the template, this will return null. If there are more than 1 subtotal with the given type, it will return the first such subtotal

Parameters
type from EnumDSSXMLMetricType

public abstract int getSubtotalsPosition (int axis)

Returns the subtotals position property for the given axis, from EnumDSSXMLSubtotalsPosition

Parameters
axis The axis for which the subtotal position is requested, from EnumDSSXMLAxisName
Returns

public abstract boolean isEmpty ()

Returns whether the collection is empty.

Returns
  • True if the collection is empty, false otherwise.

public abstract boolean isTypeActive (int subTotalType)

Returns whether the collection contains an object of the given subtotal type which is active (meaning that it is turned on for some axis or unit or group by).

Parameters
subTotalType The type of subtotal to check for, from EnumDSSXMLMetricType.
Returns
  • True if the subtotal type is active, false otherwise.

public abstract void setSubtotalsPosition (int axis, int position)

Sets the subtotals position property for the given axis, from EnumDSSXMLSubtotalsPosition

Parameters
axis The axis for which the subtotal position is requested, from EnumDSSXMLAxisName
position The subtotals position property for the axis

public abstract int size ()

Returns the number of items in the collection.

Returns
  • The number of items in the collection.