Package com.microstrategy.web.objects
Interface WebTemplateSubtotals
- 
public interface WebTemplateSubtotalsThe 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 typeWebTemplateSubtotal.- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebTemplateSubtotalactivateAxisSubtotal(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.WebTemplateSubtotalactivateGroupBySubtotal(int index, WebObjectInfo[][] units)Adds a 'Group by' subtotal of the given type, grouped by the units defined in the array of units.WebTemplateSubtotalactivateUnitSubtotal(int index, WebObjectInfo[] units)Adds a Unit or 'Across Level' subtotal of the given type across the given set of template units.voiddeActivate(int index)Inactivates theWebTemplateSubtotalobject with the given index in the collection.voiddeActivateAll()Inactivates all active subtotal objects from the collection.java.util.Enumerationelements()Returns a java.util.Enumeration containing the objects in the collections.WebTemplateSubtotalget(int index)Returns theWebTemplateSubtotalobject with the given index in this collection.java.util.EnumerationgetActiveSubtotals()Returns an enumeration or collection ofWebTemplateSubtotalobjects that are active for the report.WebTemplateSubtotalgetByType(int type)Returns theWebTemplateSubtotalobject with the given type.intgetSubtotalsPosition(int axis)Returns the subtotals position property for the given axis, fromEnumDSSXMLSubtotalsPositionbooleanisEmpty()Returns whether the collection is empty.booleanisTypeActive(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).voidsetSubtotalsPosition(int axis, int position)Sets the subtotals position property for the given axis, fromEnumDSSXMLSubtotalsPositionintsize()Returns the number of items in the collection. 
 - 
 
- 
- 
Method Detail
- 
get
WebTemplateSubtotal get(int index) throws java.lang.IndexOutOfBoundsException
Returns theWebTemplateSubtotalobject with the given index in this collection.- Parameters:
 index- The index to return in the collection.- Returns:
 - The 
WebTemplateSubtotalobject at the given index. - Throws:
 java.lang.IndexOutOfBoundsException- Thrown if the index does not exist in the collection.
 
- 
getByType
WebTemplateSubtotal getByType(int type)
Returns theWebTemplateSubtotalobject 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- fromEnumDSSXMLMetricType
 
- 
deActivate
void deActivate(int index) throws java.lang.IndexOutOfBoundsExceptionInactivates theWebTemplateSubtotalobject with the given index in the collection.- Parameters:
 index- The index of the item to render inactive.- Throws:
 java.lang.IndexOutOfBoundsException- Thrown if no item with the given index can be found.
 
- 
deActivateAll
void deActivateAll()
Inactivates all active subtotal objects from the collection. This will effectively remove all subtotals instances associated with each subtotal 
- 
isTypeActive
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, fromEnumDSSXMLMetricType.- Returns:
 - True if the subtotal type is active, false otherwise.
 
 
- 
size
int size()
Returns the number of items in the collection.- Returns:
 - The number of items in the collection.
 
 
- 
isEmpty
boolean isEmpty()
Returns whether the collection is empty.- Returns:
 - True if the collection is empty, false otherwise.
 
 
- 
elements
java.util.Enumeration elements()
Returns a java.util.Enumeration containing the objects in the collections.- Returns:
 - A java.util.Enumeration containing the 
WebTemplateSubtotalobjects in the collection. 
 
- 
activateAxisSubtotal
WebTemplateSubtotal activateAxisSubtotal(int index, int subtotalStyle, int axisIndex) throws java.lang.IllegalArgumentException
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, fromEnumDSSXMLSubtotalStyle.axisIndex- The axis to add the subtotal to, fromEnumDSSXMLAxisName.- Returns:
 - WebTemplateSubtotal A reference to the subtotal that was just added
 - Throws:
 java.lang.IllegalArgumentException- Thrown if one of the parameters is invalid.
 
- 
activateUnitSubtotal
WebTemplateSubtotal activateUnitSubtotal(int index, WebObjectInfo[] units) throws java.lang.IllegalArgumentException
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 ofWebObjectInfoobjects across which to add the subtotal.- Returns:
 - WebTemplateSubtotal A reference to the subtotal that was just added
 - Throws:
 java.lang.IllegalArgumentException- Thrown if one of the parameters are invalid.
 
- 
activateGroupBySubtotal
WebTemplateSubtotal activateGroupBySubtotal(int index, WebObjectInfo[][] units) throws java.lang.IllegalArgumentException
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:
 java.lang.IllegalArgumentException
 
- 
getSubtotalsPosition
int getSubtotalsPosition(int axis)
Returns the subtotals position property for the given axis, fromEnumDSSXMLSubtotalsPosition- Parameters:
 axis- The axis for which the subtotal position is requested, fromEnumDSSXMLAxisName- Returns:
 - The subtotals position property for the axis, from 
EnumDSSXMLSubtotalsPosition 
 
- 
setSubtotalsPosition
void setSubtotalsPosition(int axis, int position)Sets the subtotals position property for the given axis, fromEnumDSSXMLSubtotalsPosition- Parameters:
 axis- The axis for which the subtotal position is requested, fromEnumDSSXMLAxisNameposition- The subtotals position property for the axis
 
- 
getActiveSubtotals
java.util.Enumeration getActiveSubtotals()
Returns an enumeration or collection ofWebTemplateSubtotalobjects that are active for the report.- Returns:
 - An enumeration or collection of 'active' 
WebTemplateSubtotalobjects 
 
 - 
 
 -