Package com.microstrategy.web.objects
Interface WebTemplateMetricSubtotals
-
public interface WebTemplateMetricSubtotals
Deprecated.Subtotals are defined at the template level now. Please useWebTemplateSubtotals
instead.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.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description WebTemplateMetricSubtotal
add(int subTotalType)
Deprecated.Attempts to add aWebTemplateMetricSubtotal
object to the collection, and return it.WebTemplateMetricSubtotal
addCustom(WebMetric implementationMetric)
Deprecated.Adds a custom subtotal to the collection, and returns it.void
clear()
Deprecated.Removes all subtotal objects from the collection.boolean
containsActiveType(int subTotalType)
Deprecated.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).java.util.Enumeration
elements()
Deprecated.Returns a java.util.Enumeration containing the objects in the collections.WebTemplateMetricSubtotals
findTypedObjects(int[] types)
Deprecated.Returns aWebTemplateMetricSubtotals
object containing only subtotal objects which are one of the given types.WebTemplateMetricSubtotal
get(int index)
Deprecated.Returns theWebTemplateMetricSubtotal
object with the given index in this collection.WebTemplateMetricSubtotal
getByType(int subTotalType)
Deprecated.Returns the first object in the collection with the given subtotal type.WebTemplateMetricSubtotal
getItemByKey(int key)
Deprecated.Returns theWebTemplateMetricSubtotal
object with the given key.boolean
isEmpty()
Deprecated.Returns whether the collection is empty.boolean
isReadOnly()
Deprecated.Returns whether the subtotal collection is read-only.void
remove(int index)
Deprecated.Removes theWebTemplateMetricSubtotal
object with the given index from the collecton.void
remove(WebTemplateMetricSubtotal object)
Deprecated.Removes the givenWebTemplateMetricSubtotal
object from the collection.void
removeCustom(WebTemplateMetricSubtotal metricSubtotal)
Deprecated.Removes the custom subtotal object from the collection.void
removeItemByKey(int key)
Deprecated.Removes theWebTemplateMetricSubtotal
object with the given key from the collection.int
size()
Deprecated.Returns the number of items in the collection.
-
-
-
Method Detail
-
add
WebTemplateMetricSubtotal add(int subTotalType) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
Deprecated.Attempts to add aWebTemplateMetricSubtotal
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, fromEnumDSSXMLMetricType
.- Returns:
- A
WebTemplateMetricSubtotal
object, which was either added to the collection or already existed in the collection. - Throws:
java.lang.IllegalArgumentException
- Thrown if the metric type is invalid, or if a type of custom is given.java.lang.UnsupportedOperationException
- Thrown if the subtotal collection is read-only.
-
addCustom
WebTemplateMetricSubtotal addCustom(WebMetric implementationMetric) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
Deprecated.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
- TheWebMetric
object which implements the custom subtotal.- Returns:
- A
WebTemplateMetricSubtotal
object, which was either added to the collection or already existed in the collection. - Throws:
java.lang.IllegalArgumentException
- Thrown if the implementation metric is null.java.lang.UnsupportedOperationException
- Thrown if the subtotal collection is read-only.
-
get
WebTemplateMetricSubtotal get(int index) throws java.lang.IndexOutOfBoundsException
Deprecated.Returns theWebTemplateMetricSubtotal
object with the given index in this collection.- Parameters:
index
- The index to return in the collection.- Returns:
- The
WebTemplateMetricSubtotal
object at the given index. - Throws:
java.lang.IndexOutOfBoundsException
- Thrown if the index does not exist in the collection.
-
getItemByKey
WebTemplateMetricSubtotal getItemByKey(int key) throws java.lang.IllegalArgumentException
Deprecated.Returns theWebTemplateMetricSubtotal
object with the given key.- Parameters:
key
- The key to find in the collection.- Returns:
- The
WebTemplateMetricSubtotal
object with the given key. - Throws:
java.lang.IllegalArgumentException
- Thrown if the given key cannot be found in the collection.
-
getByType
WebTemplateMetricSubtotal getByType(int subTotalType) throws java.lang.IllegalArgumentException
Deprecated.Returns the first object in the collection with the given subtotal type.- Parameters:
subTotalType
- The subtotal type, fromEnumDSSXMLMetricType
.- Returns:
- The first
WebTemplateMetricSubtotal
object found with the given type. - Throws:
java.lang.IllegalArgumentException
- Thrown if no object with the given type could be found.
-
remove
void remove(int index) throws java.lang.IndexOutOfBoundsException, java.lang.UnsupportedOperationException
Deprecated.Removes theWebTemplateMetricSubtotal
object with the given index from the collecton.- Parameters:
index
- The index of the item to remove from the collection.- Throws:
java.lang.IndexOutOfBoundsException
- Thrown if no item with the given index can be found.java.lang.UnsupportedOperationException
- Thrown if the template which this collection belongs to is read-only.
-
removeItemByKey
void removeItemByKey(int key) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
Deprecated.Removes theWebTemplateMetricSubtotal
object with the given key from the collection.- Parameters:
key
- The key of the item to remove from the collection.- Throws:
java.lang.IllegalArgumentException
- Thrown if no item with the given key can be found.java.lang.UnsupportedOperationException
- Thrown if the collection is read-only.
-
remove
void remove(WebTemplateMetricSubtotal object) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
Deprecated.Removes the givenWebTemplateMetricSubtotal
object from the collection.- Parameters:
object
- TheWebTemplateMetricSubtotal
object to remove from the collection. This must not refer to a custom subtotal.- Throws:
java.lang.IllegalArgumentException
- Thrown if the object cannot be found in the collection.java.lang.UnsupportedOperationException
- Thrown if the collection is read-only.
-
removeCustom
void removeCustom(WebTemplateMetricSubtotal metricSubtotal) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
Deprecated.Removes the custom subtotal object from the collection.- Parameters:
metricSubtotal
- TheWebTemplateMetricSubtotal
object in the collection to remove, corresponding to a custom subtotal.- Throws:
java.lang.IllegalArgumentException
- Thrown if the given object is not found in the collection.java.lang.UnsupportedOperationException
- Thrown if the collection is read-only.
-
clear
void clear() throws java.lang.UnsupportedOperationException
Deprecated.Removes all subtotal objects from the collection. This will effectively remove all subtotals from the metric which this collection is associated with.- Throws:
java.lang.UnsupportedOperationException
- Thrown if the collection is read-only.
-
containsActiveType
boolean containsActiveType(int subTotalType)
Deprecated.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, fromEnumDSSXMLMetricType
.- Returns:
- True if the subtotal type is active, false otherwise.
-
findTypedObjects
WebTemplateMetricSubtotals findTypedObjects(int[] types)
Deprecated.Returns aWebTemplateMetricSubtotals
object containing only subtotal objects which are one of the given types.- Parameters:
types
- The types to filter into the new subtotal collection.- Returns:
- A
WebTemplateMetricSubtotals
object containing only subtotal objects which are one of the given types.
-
isReadOnly
boolean isReadOnly()
Deprecated.Returns whether the subtotal collection is read-only.- Returns:
- True if the collection is read-only, false otherwise.
-
size
int size()
Deprecated.Returns the number of items in the collection.- Returns:
- The number of items in the collection.
-
isEmpty
boolean isEmpty()
Deprecated.Returns whether the collection is empty.- Returns:
- True if the collection is empty, false otherwise.
-
elements
java.util.Enumeration elements()
Deprecated.Returns a java.util.Enumeration containing the objects in the collections.- Returns:
- A java.util.Enumeration containing the
WebTemplateMetricSubtotal
objects in the collection.
-
-