public interface

WebTemplateMetricSubtotals

com.microstrategy.web.objects.WebTemplateMetricSubtotals

This interface is deprecated.
Subtotals are defined at the template level now. Please use WebTemplateSubtotals instead.

Class Overview

The WebTemplateMetricSubtotals object represents the collection of subtotals on a template metric. This object can be used to add and remove subtotals from the report for this metric.

Summary

Public Methods
abstract WebTemplateMetricSubtotal add(int subTotalType)
Attempts to add a WebTemplateMetricSubtotal object to the collection, and return it.
abstract WebTemplateMetricSubtotal addCustom(WebMetric implementationMetric)
Adds a custom subtotal to the collection, and returns it.
abstract void clear()
Removes all subtotal objects from the collection.
abstract boolean containsActiveType(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).
abstract Enumeration elements()
Returns a java.util.Enumeration containing the objects in the collections.
abstract WebTemplateMetricSubtotals findTypedObjects(int[] types)
Returns a WebTemplateMetricSubtotals object containing only subtotal objects which are one of the given types.
abstract WebTemplateMetricSubtotal get(int index)
Returns the WebTemplateMetricSubtotal object with the given index in this collection.
abstract WebTemplateMetricSubtotal getByType(int subTotalType)
Returns the first object in the collection with the given subtotal type.
abstract WebTemplateMetricSubtotal getItemByKey(int key)
Returns the WebTemplateMetricSubtotal object with the given key.
abstract boolean isEmpty()
Returns whether the collection is empty.
abstract boolean isReadOnly()
Returns whether the subtotal collection is read-only.
abstract void remove(WebTemplateMetricSubtotal object)
Removes the given WebTemplateMetricSubtotal object from the collection.
abstract void remove(int index)
Removes the WebTemplateMetricSubtotal object with the given index from the collecton.
abstract void removeCustom(WebTemplateMetricSubtotal metricSubtotal)
Removes the custom subtotal object from the collection.
abstract void removeItemByKey(int key)
Removes the WebTemplateMetricSubtotal object with the given key from the collection.
abstract int size()
Returns the number of items in the collection.

Public Methods

public abstract WebTemplateMetricSubtotal add (int subTotalType)

Attempts to add a WebTemplateMetricSubtotal object to the collection, and return it. This is the first step that must be taken to add a subtotal to a report. This will not generate a delta XML; it will simply create the subtotal object, which can then be used to add and remove that subtotal type.

Parameters
subTotalType The subtotal type to add to the collection, from EnumDSSXMLMetricType.
Returns
Throws
IllegalArgumentException Thrown if the metric type is invalid, or if a type of custom is given.
UnsupportedOperationException Thrown if the subtotal collection is read-only.

public abstract WebTemplateMetricSubtotal addCustom (WebMetric implementationMetric)

Adds a custom subtotal to the collection, and returns it. A custom subtotal is a subtotal which specifies an implementation metric. This is the first step that must be taken to add a subtotal to a report. This will not generate a delta XML; it will simply create the subtotal object, which can then be used to add and remove that subtotal type.

Parameters
implementationMetric The WebMetric object which implements the custom subtotal.
Returns
Throws
IllegalArgumentException Thrown if the implementation metric is null.
UnsupportedOperationException Thrown if the subtotal collection is read-only.

public abstract void clear ()

Removes all subtotal objects from the collection. This will effectively remove all subtotals from the metric which this collection is associated with.

Throws
UnsupportedOperationException Thrown if the collection is read-only.

public abstract boolean containsActiveType (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).

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

public abstract Enumeration elements ()

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

Returns

public abstract WebTemplateMetricSubtotals findTypedObjects (int[] types)

Returns a WebTemplateMetricSubtotals object containing only subtotal objects which are one of the given types.

Parameters
types The types to filter into the new subtotal collection.
Returns

public abstract WebTemplateMetricSubtotal get (int index)

Returns the WebTemplateMetricSubtotal 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 WebTemplateMetricSubtotal getByType (int subTotalType)

Returns the first object in the collection with the given subtotal type.

Parameters
subTotalType The subtotal type, from EnumDSSXMLMetricType.
Returns
Throws
IllegalArgumentException Thrown if no object with the given type could be found.

public abstract WebTemplateMetricSubtotal getItemByKey (int key)

Returns the WebTemplateMetricSubtotal object with the given key.

Parameters
key The key to find in the collection.
Returns
Throws
IllegalArgumentException Thrown if the given key cannot be found in the collection.

public abstract boolean isEmpty ()

Returns whether the collection is empty.

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

public abstract boolean isReadOnly ()

Returns whether the subtotal collection is read-only.

Returns
  • True if the collection is read-only, false otherwise.

public abstract void remove (WebTemplateMetricSubtotal object)

Removes the given WebTemplateMetricSubtotal object from the collection.

Parameters
object The WebTemplateMetricSubtotal object to remove from the collection. This must not refer to a custom subtotal.
Throws
IllegalArgumentException Thrown if the object cannot be found in the collection.
UnsupportedOperationException Thrown if the collection is read-only.

public abstract void remove (int index)

Removes the WebTemplateMetricSubtotal object with the given index from the collecton.

Parameters
index The index of the item to remove from the collection.
Throws
IndexOutOfBoundsException Thrown if no item with the given index can be found.
UnsupportedOperationException Thrown if the template which this collection belongs to is read-only.

public abstract void removeCustom (WebTemplateMetricSubtotal metricSubtotal)

Removes the custom subtotal object from the collection.

Parameters
metricSubtotal The WebTemplateMetricSubtotal object in the collection to remove, corresponding to a custom subtotal.
Throws
IllegalArgumentException Thrown if the given object is not found in the collection.
UnsupportedOperationException Thrown if the collection is read-only.

public abstract void removeItemByKey (int key)

Removes the WebTemplateMetricSubtotal object with the given key from the collection.

Parameters
key The key of the item to remove from the collection.
Throws
IllegalArgumentException Thrown if no item with the given key can be found.
UnsupportedOperationException Thrown if the collection is read-only.

public abstract int size ()

Returns the number of items in the collection.

Returns
  • The number of items in the collection.