Package com.microstrategy.web.objects
Interface WebTemplateSubtotals
-
public interface WebTemplateSubtotals
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 typeWebTemplateSubtotal
.- Since:
- MicroStrategy Web 9.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.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.WebTemplateSubtotal
activateUnitSubtotal(int index, WebObjectInfo[] units)
Adds a Unit or 'Across Level' subtotal of the given type across the given set of template units.void
deActivate(int index)
Inactivates theWebTemplateSubtotal
object with the given index in the collection.void
deActivateAll()
Inactivates all active subtotal objects from the collection.java.util.Enumeration
elements()
Returns a java.util.Enumeration containing the objects in the collections.WebTemplateSubtotal
get(int index)
Returns theWebTemplateSubtotal
object with the given index in this collection.java.util.Enumeration
getActiveSubtotals()
Returns an enumeration or collection ofWebTemplateSubtotal
objects that are active for the report.WebTemplateSubtotal
getByType(int type)
Returns theWebTemplateSubtotal
object with the given type.int
getSubtotalsPosition(int axis)
Returns the subtotals position property for the given axis, fromEnumDSSXMLSubtotalsPosition
boolean
isEmpty()
Returns whether the collection is empty.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).void
setSubtotalsPosition(int axis, int position)
Sets the subtotals position property for the given axis, fromEnumDSSXMLSubtotalsPosition
int
size()
Returns the number of items in the collection.
-
-
-
Method Detail
-
get
WebTemplateSubtotal get(int index) throws java.lang.IndexOutOfBoundsException
Returns theWebTemplateSubtotal
object with the given index in this collection.- Parameters:
index
- The index to return in the collection.- Returns:
- The
WebTemplateSubtotal
object at the given index. - Throws:
java.lang.IndexOutOfBoundsException
- Thrown if the index does not exist in the collection.
-
getByType
WebTemplateSubtotal getByType(int type)
Returns theWebTemplateSubtotal
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
- fromEnumDSSXMLMetricType
-
deActivate
void deActivate(int index) throws java.lang.IndexOutOfBoundsException
Inactivates theWebTemplateSubtotal
object 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
WebTemplateSubtotal
objects 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 ofWebObjectInfo
objects 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, fromEnumDSSXMLAxisName
position
- The subtotals position property for the axis
-
getActiveSubtotals
java.util.Enumeration getActiveSubtotals()
Returns an enumeration or collection ofWebTemplateSubtotal
objects that are active for the report.- Returns:
- An enumeration or collection of 'active'
WebTemplateSubtotal
objects
-
-