com.microstrategy.web.objects.WebTemplateMetrics |
The WebTemplateMetrics object represents the metrics collection which exists on a template. This object contains a collection of metrics, ordered by position. The WebTemplateMetrics object can be used to add, remove, and examine metrics on the template.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract WebTemplateMetric | add(WebObjectInfo object, boolean copyFormatting) | ||||||||||
abstract WebTemplateMetric |
add(WebObjectInfo object)
Adds the given object to the end of the metrics collection.
| ||||||||||
abstract WebTemplateMetric |
add(WebObjectInfo object, int beforeKey)
Adds the given object to the metrics collection before the object with the given key.
| ||||||||||
abstract void |
addSubtotal(int subtotalType, int subtotalStyle, int axisIndex)
This method is deprecated.
Subtotals are no longer defined at the template metrics level. They are now
defined at the template level. Use
activateAxisSubtotal(int, int, int) instead.
| ||||||||||
abstract boolean |
canToggleThresholds()
Indicates whether thresholds display can be turned on/off
| ||||||||||
abstract void |
clear()
Clears all metrics from the collection.
| ||||||||||
abstract void |
clear(boolean isDisableOnly)
Clears all metrics from the collection.
| ||||||||||
abstract boolean |
contains(WebObjectInfo object)
Searches for the
WebTemplateMetric object which refers to the given
WebObjectInfo object in the metrics collection. | ||||||||||
abstract boolean |
containsKey(int key)
Returns whether the given key exists in the metrics collection.
| ||||||||||
abstract Enumeration |
elements()
Returns a java.util.Enumeration, which can be used to iterate through the
WebTemplateMetric objects in the collection in position ordering. | ||||||||||
abstract WebTemplateMetric |
get(int index)
Returns the
WebTemplateMetric object with the given index. | ||||||||||
abstract WebTemplateMetric |
getItemById(String id)
Finds a template metric based on metric DSS ID.
| ||||||||||
abstract WebTemplateMetric |
getItemByKey(int key)
Returns the
WebTemplateMetric object with the given key. | ||||||||||
abstract WebTemplateUnit |
getTemplateUnit()
Returns the
WebTemplateUnit which this object is associated with. | ||||||||||
abstract boolean |
hasThresholds()
Indicates whether there are any thresholds defined on the underlying metrics
| ||||||||||
abstract int |
indexOf(String id)
Returns an index of the template metric for specified metric DSS ID or -1 if it is not
found.
| ||||||||||
abstract boolean |
isEmpty()
Returns true if the collection has no metrics in it.
| ||||||||||
abstract boolean |
isThresholdsDisplayEnabled()
Indicates whether at least one of the thresholds defined on the underlying metrics
is enabled
| ||||||||||
abstract int |
keyOf(WebObjectInfo object)
Searches for the
WebTemplateMetric object which refers to the given
WebObjectInfo object in the metrics collection, and returns the key of
that object. | ||||||||||
abstract void |
move(int fromPosition, int toPosition)
Moves the
WebTemplateMetric object at the given position in the collection to
the new position. | ||||||||||
abstract void |
move(int fromPosition, int toPosition, boolean needSetAlias)
Moves the
WebTemplateMetric object at the given position in the collection to
the new position. | ||||||||||
abstract void |
remove(int index)
Removes the
WebTemplateMetric object at the given index from the collection. | ||||||||||
abstract void |
remove(int index, boolean isDisableOnly)
Removes the
WebTemplateMetric object at the given index from the collection. | ||||||||||
abstract void |
removeAllSubtotals()
This method is deprecated.
Subtotals are no longer defined at the template metrics level. They are now
defined at the template level. Use
deActivateAll() instead.
| ||||||||||
abstract void |
removeItemByKey(int key, boolean isDisableOnly)
Removes the
WebTemplateMetric object with the given key from the collection. | ||||||||||
abstract void |
removeItemByKey(int key)
Removes the
WebTemplateMetric object with the given key from the collection. | ||||||||||
abstract void |
removeSubtotal(int subtotalType)
This method is deprecated.
Subtotals are no longer defined at the template metrics level. They are now
defined at the template level. Use
deActivate(int) instead.
| ||||||||||
abstract void |
setShowThresholds(boolean show)
Set or clear all threasholds of all metrics.
| ||||||||||
abstract int |
size()
Returns the number of
WebTemplateMetric objects in the metrics collection. |
IllegalArgumentException | |
---|---|
UnsupportedOperationException |
Adds the given object to the end of the metrics collection. This object must be of type DssXmlTypeMetric.
object | The metric to add to the collection. |
---|
WebTemplateMetric
object created to hold the WebObjectInfo
object.UnsupportedOperationException | Signals that the template is marked read-only. |
---|---|
IllegalArgumentException | Signals that the object passed to this method is not of type metric. |
Adds the given object to the metrics collection before the object with the given key. This object must be of type DssXmlTypeMetric.
object | The metric to add to the collection. |
---|---|
beforeKey | The key of another metric in the collection, which the new metric will be placed before. |
WebTemplateMetric
object created to hold the WebObjectInfo
object.UnsupportedOperationException | Signals that the template is marked read-only. |
---|---|
IllegalArgumentException | Signals that the object passed to this method is not of type metric, or if the key is not found in the metrics collection. |
This method is deprecated.
Subtotals are no longer defined at the template metrics level. They are now
defined at the template level. Use activateAxisSubtotal(int, int, int)
instead.
Adds a subtotal of the given type, with the given style, to the given index. This is done for all metrics on the report.
subtotalType | The type of subtotal to add, from EnumDSSXMLMetricType . |
---|---|
subtotalStyle | The style of subtotal to add, from EnumDSSXMLSubtotalStyle . |
axisIndex | The axis to add the subtotal to, from EnumDSSXMLAxisName . |
IllegalArgumentException | Thrown if one of the parameters are invalid. |
---|
Indicates whether thresholds display can be turned on/off
WebObjectsException | |
WebObjectsException |
Clears all metrics from the collection. Equivalent to calling remove on every object in the collection.
UnsupportedOperationException | Thrown if the template which this collection resides upon is marked to be read-only. |
---|
Clears all metrics from the collection. Equivalent to calling remove on every object in the collection.
isDisableOnly | Indicate if it is a 'disable from grid' or 'remove from grid' for RWD |
---|
UnsupportedOperationException | Thrown if the template which this collection resides upon is marked to be read-only. |
---|
Searches for the WebTemplateMetric
object which refers to the given
WebObjectInfo
object in the metrics collection.
object | The WebObjectInfo object to search for in the metrics collection. |
---|
Returns whether the given key exists in the metrics collection.
key | The key whose existence we're verifying. |
---|
Returns a java.util.Enumeration, which can be used to iterate through the
WebTemplateMetric
objects in the collection in position ordering.
WebTemplateMetric
objects.
Returns the WebTemplateMetric
object with the given index.
index | The index of the object to return from the collection. |
---|
WebTemplateMetric
object which the given key refers to.IndexOutOfBoundsException | Thrown if the index is outside the bounds of the collection. |
---|
Finds a template metric based on metric DSS ID. Returns null if metric not found.
id | metric DSS ID |
---|
Returns the WebTemplateMetric
object with the given key.
key | The key of the object to search for in the collection. |
---|
WebTemplateMetric
object which the given key refers to.IllegalArgumentException | Thrown if the key is not found in the metrics collection. |
---|
Returns the WebTemplateUnit
which this object is associated with.
WebTemplateUnit
object which contains the WebTemplateMetrics object.
Indicates whether there are any thresholds defined on the underlying metrics
Returns an index of the template metric for specified metric DSS ID or -1 if it is not found.
id | metric DSS ID |
---|
Returns true if the collection has no metrics in it.
Indicates whether at least one of the thresholds defined on the underlying metrics is enabled
Searches for the WebTemplateMetric
object which refers to the given
WebObjectInfo
object in the metrics collection, and returns the key of
that object.
object | The WebObjectInfo object whose key should be returned. |
---|
WebObjectInfo
object.IllegalArgumentException | Signals that the given object was not found in the collection. |
---|
Moves the WebTemplateMetric
object at the given position in the collection to
the new position. Note that position is a 1-based index on the collection.
Note that elements will be shifted as follows:
If fromPosition < toPosition then objects between the two given positions will be shifted to the left.
If fromPosition > toPosition then objects between the two given positions will be shifted to the right
fromPosition | The position of the WebTemplateMetric object in the metrics collection. |
---|---|
toPosition | The position to move the WebTemplateMetric object to. |
IllegalArgumentException | Thrown if either position given to this method does not exist in the collection. |
---|---|
UnsupportedOperationException | Thrown if the template which the metrics collection exists upon is marked read-only. |
Moves the WebTemplateMetric
object at the given position in the collection to
the new position. Note that position is a 1-based index on the collection.
Note that elements will be shifted as follows:
If fromPosition < toPosition then objects between the two given positions will be shifted to the left.
If fromPosition > toPosition then objects between the two given positions will be shifted to the right
fromPosition | The position of the WebTemplateMetric object in the metrics collection. |
---|---|
toPosition | The position to move the WebTemplateMetric object to. |
IllegalArgumentException | Thrown if either position given to this method does not exist in the collection. |
---|---|
UnsupportedOperationException | Thrown if the template which the metrics collection exists upon is marked read-only. |
Removes the WebTemplateMetric
object at the given index from the collection.
index | The index of the object to remove from the collection. |
---|
IndexOutOfBoundsException | Thrown if the given index is out of the bounds of the collection. |
---|---|
UnsupportedOperationException | Thrown if the template which this collection resides upon is marked to be read-only. |
Removes the WebTemplateMetric
object at the given index from the collection.
index | The index of the object to remove from the collection. |
---|---|
isDisableOnly | Indicate if it is a 'disable from grid' or 'remove from grid' for RWD |
IndexOutOfBoundsException | Thrown if the given index is out of the bounds of the collection. |
---|---|
UnsupportedOperationException | Thrown if the template which this collection resides upon is marked to be read-only. |
This method is deprecated.
Subtotals are no longer defined at the template metrics level. They are now
defined at the template level. Use deActivateAll()
instead.
Removes all subtotals from all metrics on the report.
Removes the WebTemplateMetric
object with the given key from the collection.
key | The key of the object to remove from the collection. |
---|---|
isDisableOnly | Indicate if it is a 'disable from grid' or 'remove from grid' for RWD |
IllegalArgumentException | Thrown if the key is not found in the metrics collection. |
---|---|
UnsupportedOperationException | Thrown if the template which this collection resides upon is marked to be read-only. |
Removes the WebTemplateMetric
object with the given key from the collection.
key | The key of the object to remove from the collection. |
---|
IllegalArgumentException | Thrown if the key is not found in the metrics collection. |
---|---|
UnsupportedOperationException | Thrown if the template which this collection resides upon is marked to be read-only. |
This method is deprecated.
Subtotals are no longer defined at the template metrics level. They are now
defined at the template level. Use deActivate(int)
instead.
Removes the subtotal with the given type from all metrics it is set on.
subtotalType | The type of the subtotal to remove, from EnumDSSXMLMetricType . |
---|
IllegalArgumentException | Thrown if the subtotal type is invalid. |
---|
Set or clear all threasholds of all metrics. To see the changes in data, applyChanges()
need to be called to retrieve another instance, which will have the changed data.
show | boolean to indicate whether to show or to hide all thresholds. |
---|
Returns the number of WebTemplateMetric
objects in the metrics collection.