com.microstrategy.web.objects.WebTemplateMetric |
The WebTemplateMetric class represents a metric which currently exists on a template.
It gives access to the key and position of the metric on the template, and allows the user
to determine whether a metric is set to be the current element, or set the current element.
Finally, it can return the reference to the WebMetric
object which it contains.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract WebThresholds |
getAlerts()
Return a
WebThresholds collection which represents the list of 'delivery' thresholds. | ||||||||||
abstract String |
getAlias()
Returns the alias of the template metric.
| ||||||||||
abstract WebFormatContainer |
getFormatContainer()
Returns the format container on this metric, which contains the two
WebFormat objects. | ||||||||||
abstract String |
getFormula()
For derived metrics, this specifies the string representation of the metric formula.
| ||||||||||
abstract int |
getKey()
Returns the key of the metric on the template.
| ||||||||||
abstract WebMetric |
getMetric()
Returns the
WebMetric object which this WebTemplateMetric object refers to. | ||||||||||
abstract WebObjectInfo |
getMetricPrompt()
This method is deprecated.
Never implemented on the Intelligence Server.
| ||||||||||
abstract WebExpression | getOrCreateUnitLimit() | ||||||||||
abstract int |
getPosition()
Returns the position of the metric within the metrics collection.
| ||||||||||
abstract WebPrompt |
getPrompt()
Returns the
WebPrompt object which this WebTemplateMetric object refers to. | ||||||||||
abstract WebTemplateMetricSubtotals |
getSubtotals()
This method is deprecated.
Subtotals are no longer defined at the template metrics level. They are now
defined at the template level. Use
getSubtotals()
| ||||||||||
abstract Enumeration |
getTemplateSubtotals()
Returns a collection of
WebTemplateSubtotal objects that are applicable
to this metric. | ||||||||||
abstract String |
getTemplateUnitPropertyValue(String propertySetName, String propertyName)
Gets the value of a specific property. | ||||||||||
abstract WebTransactableUnit | getTransactableUnit() | ||||||||||
abstract WebExpression | getUnitLimit() | ||||||||||
abstract boolean | hasDynamicAlias() | ||||||||||
abstract boolean | hasThreshold() | ||||||||||
abstract boolean | hasUnitLimit() | ||||||||||
abstract Boolean | isAggFromBase() | ||||||||||
abstract boolean |
isCurrentElement()
Returns true if this WebTemplateMetric object is designated as the current element.
| ||||||||||
abstract boolean |
isDerived()
Specifies if this represents a derived metric.
| ||||||||||
abstract boolean |
isFormulaTokenStream()
Check whether the formula is a token stream
| ||||||||||
abstract boolean |
isLocked()
Returns whether the template unit is locked.
| ||||||||||
abstract boolean |
isSmartMetric()
Indicate if a metric itself is the smart metric | ||||||||||
abstract boolean |
isSmartMetricCalculatedInBase()
Indicate if it is smart on template metric level | ||||||||||
abstract void |
makeCurrentElement(int elementStatus)
Sets the current metric to be designated as the current element of the metrics axis,
using the specific element status.
| ||||||||||
abstract void |
makeCurrentElement()
Sets the current metric to be designated as the current element of the metrics axis.
| ||||||||||
abstract void | removeUnitLimit() | ||||||||||
abstract void | setAggFromBase(Boolean afb) | ||||||||||
abstract void |
setAlias(String alias, boolean isDynamic)
Sets the alias of the template metric.
| ||||||||||
abstract void |
setAlias(String alias)
Sets the alias of the template metric.
| ||||||||||
abstract void |
setDefaultForTemplateUnitProperty(String propertySetName, String propertyName)
Sets the value for the given property to be the default value for the property.
| ||||||||||
abstract void | setFormula(String formula, int aggFromBase, int stFromBase, Boolean isTokenStream, boolean isPassThrough) | ||||||||||
abstract void | setFormula(String formula, Boolean aggFromBase, boolean isPassThrough) | ||||||||||
abstract void |
setFormula(String formula)
Allows the user to set the formula of a derived metric.
| ||||||||||
abstract void |
setFormula(String formula, int aggFromBase, int stFromBase, Boolean isTokenStream)
Allows the user to set the formula of a derived metric.
| ||||||||||
abstract void |
setFormula(String formula, Boolean aggFromBase)
Allows the user to set the formula of a derived metric.
| ||||||||||
abstract void | setShowThresholds(boolean show) | ||||||||||
abstract void |
setTemplateUnitProperty(String propertySetName, String propertyName, String propertyValue)
Sets the value of a specific property. | ||||||||||
abstract void | setUnitLimit(WebExpression expr) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Return a WebThresholds
collection which represents the list of 'delivery' thresholds. These
thresholds are used to indicate that they are used in creating an alert subscription.
Returns the alias of the template metric. This may or may not be the same as the metric's name.
Returns the format container on this metric, which contains the two WebFormat
objects.
WebFormat
objects, an object of type WebFormatContainer
.UnsupportedOperationException | Thrown if this object refers to a metric prompt. |
---|
For derived metrics, this specifies the string representation of the metric formula.
UnsupportedOperationException | Thrown if the metric is not derived, and thus the formula is not available, or this object refers to a metric prompt. |
---|
Returns the key of the metric on the template.
This method is deprecated.
Never implemented on the Intelligence Server.
Returns the metric prompt associated with the WebTemplateMetric object.
WebObjectInfo
object, which describes the metric prompt
associated with the WebTemplateMetric.UnsupportedOperationException | Thrown if this object does not refer to a metric prompt. |
---|
Returns the position of the metric within the metrics collection. This position is 1-based.
This method is deprecated.
Subtotals are no longer defined at the template metrics level. They are now
defined at the template level. Use getSubtotals()
Returns the subtotals collection, which describes the subtotals set on this metric.
WebTemplateMetricSubtotals
object, which can be used to add/remove
subtotals from this metric.UnsupportedOperationException | Thrown if this object refers to a metric prompt. |
---|
Returns a collection of WebTemplateSubtotal
objects that are applicable
to this metric.
WebTemplateSubtotal
objectsGets the value of a specific property.
propertySetName | the property set name |
---|---|
propertyName | the property name |
WebObjectsException | |
IllegalArgumentException | |
WebObjectsException |
Returns true if this WebTemplateMetric object is designated as the current element.
Specifies if this represents a derived metric.
Check whether the formula is a token stream
Returns whether the template unit is locked. A locked template unit serves as a hint that the report designer did not want the user to remove this unit. Note that locking is not enforced by the Intelligence Server, instead allowing the API user to determine whether to enforce the lock state.
Indicate if a metric itself is the smart metric
Indicate if it is smart on template metric level
Sets the current metric to be designated as the current element of the metrics axis, using the specific element status.
elementStatus | A value in EnumDSSXMLCurrentElementStatus . |
---|
UnsupportedOperationException | Thowwn if this object refers to a metric prompt. |
---|
Sets the current metric to be designated as the current element of the metrics axis.
UnsupportedOperationException | Thowwn if this object refers to a metric prompt. |
---|
Sets the alias of the template metric.
alias | The alias to use for the metric, isDynamic The boolean to identify dynamic alias |
---|
UnsupportedOperationException | Thrown if this object refers to a metric prompt. |
---|
Sets the alias of the template metric.
alias | The alias to use for the metric. |
---|
UnsupportedOperationException | Thrown if this object refers to a metric prompt. |
---|
Sets the value for the given property to be the default value for the property.
propertySetName | the name of the property set which contains the property to change |
---|---|
propertyName | the name of the property to change |
IllegalArgumentException | if the property set name or property name is empty or does not exist |
---|---|
WebObjectsException | if an error occurs when setting the property value |
UnsupportedOperationException |
---|
UnsupportedOperationException |
---|
Allows the user to set the formula of a derived metric.
formula | The formula to use for the metric. |
---|
UnsupportedOperationException | Thrown if the metric is not derived, and thus the formula cannot be changed, or if this object refers to a metric prompt. |
---|
Allows the user to set the formula of a derived metric.
formula | The formula to use for the metric. |
---|---|
aggFromBase | whether the formula aggregate from base |
stFromBase | whether the formula subtotal from base |
isTokenStream | flag to indicate whether the formula is a token stream. |
UnsupportedOperationException | Thrown if the metric is not derived, and thus the formula cannot be changed, or if this object refers to a metric prompt. |
---|
Allows the user to set the formula of a derived metric.
formula | The formula to use for the metric. |
---|---|
aggFromBase | whether the formula aggregate from base |
UnsupportedOperationException | Thrown if the metric is not derived, and thus the formula cannot be changed, or if this object refers to a metric prompt. |
---|
show | whether to thresholds associated with this template metric |
---|
Sets the value of a specific property.
propertySetName | the property set name |
---|---|
propertyName | the property name |
propertyValue | the property value |
WebObjectsException | if there is a problem setting the new value |
---|---|
IllegalArgumentException | if no property set name or property name is specified, or they don't exist |