public interface

WebTemplateMetric

implements WebHyperLinkContainer WebThresholdsContainer
com.microstrategy.web.objects.WebTemplateMetric

Class Overview

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.

Summary

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
From interface com.microstrategy.web.objects.WebHyperLinkContainer
From interface com.microstrategy.web.objects.WebThresholdsContainer

Public Methods

public abstract WebThresholds getAlerts ()

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.

public abstract String getAlias ()

Returns the alias of the template metric. This may or may not be the same as the metric's name.

Returns
  • The alias of the current metric.
See Also

public abstract WebFormatContainer getFormatContainer ()

Returns the format container on this metric, which contains the two WebFormat objects.

Returns
Throws
UnsupportedOperationException Thrown if this object refers to a metric prompt.

public abstract String getFormula ()

For derived metrics, this specifies the string representation of the metric formula.

Returns
  • The formula of the metric.
Throws
UnsupportedOperationException Thrown if the metric is not derived, and thus the formula is not available, or this object refers to a metric prompt.

public abstract int getKey ()

Returns the key of the metric on the template.

Returns
  • The key of the metric.

public abstract WebMetric getMetric ()

Returns the WebMetric object which this WebTemplateMetric object refers to.

Returns

public abstract WebObjectInfo getMetricPrompt ()

This method is deprecated.
Never implemented on the Intelligence Server.

Returns the metric prompt associated with the WebTemplateMetric object.

Returns
  • A WebObjectInfo object, which describes the metric prompt associated with the WebTemplateMetric.
Throws
UnsupportedOperationException Thrown if this object does not refer to a metric prompt.

public abstract WebExpression getOrCreateUnitLimit ()

public abstract int getPosition ()

Returns the position of the metric within the metrics collection. This position is 1-based.

Returns
  • The position of the metric within the collection.

public abstract WebPrompt getPrompt ()

Returns the WebPrompt object which this WebTemplateMetric object refers to. This will @return A WebPrompt object if the metric contains unresolved metric object prompt.

public 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()

Returns the subtotals collection, which describes the subtotals set on this metric.

Returns
Throws
UnsupportedOperationException Thrown if this object refers to a metric prompt.

public abstract Enumeration getTemplateSubtotals ()

Returns a collection of WebTemplateSubtotal objects that are applicable to this metric.

Returns

public abstract String getTemplateUnitPropertyValue (String propertySetName, String propertyName)

Gets the value of a specific property.

Parameters
propertySetName the property set name
propertyName the property name
Returns
  • Property string value
Throws
WebObjectsException
IllegalArgumentException
WebObjectsException

public abstract WebTransactableUnit getTransactableUnit ()

public abstract WebExpression getUnitLimit ()

public abstract boolean hasDynamicAlias ()

public abstract boolean hasThreshold ()

public abstract boolean hasUnitLimit ()

public abstract Boolean isAggFromBase ()

public abstract boolean isCurrentElement ()

Returns true if this WebTemplateMetric object is designated as the current element.

Returns
  • Whether the current metric is the current element of the metrics collection.

public abstract boolean isDerived ()

Specifies if this represents a derived metric.

Returns
  • True if this is a derived metric, false otherwise.

public abstract boolean isFormulaTokenStream ()

Check whether the formula is a token stream

Returns
  • whether the formula is a token stream

public abstract boolean isLocked ()

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.

Returns
  • True if the template unit is locked, false otherwise.

public abstract boolean isSmartMetric ()

Indicate if a metric itself is the smart metric

Returns
  • true if this metric is a smart metric.

public abstract boolean isSmartMetricCalculatedInBase ()

Indicate if it is smart on template metric level

Returns
  • true if it is smart

public 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.

Parameters
elementStatus A value in EnumDSSXMLCurrentElementStatus.
Throws
UnsupportedOperationException Thowwn if this object refers to a metric prompt.

public abstract void makeCurrentElement ()

Sets the current metric to be designated as the current element of the metrics axis.

Throws
UnsupportedOperationException Thowwn if this object refers to a metric prompt.

public abstract void removeUnitLimit ()

public abstract void setAggFromBase (Boolean afb)

public abstract void setAlias (String alias, boolean isDynamic)

Sets the alias of the template metric.

Parameters
alias The alias to use for the metric, isDynamic The boolean to identify dynamic alias
Throws
UnsupportedOperationException Thrown if this object refers to a metric prompt.
See Also

public abstract void setAlias (String alias)

Sets the alias of the template metric.

Parameters
alias The alias to use for the metric.
Throws
UnsupportedOperationException Thrown if this object refers to a metric prompt.
See Also

public abstract void setDefaultForTemplateUnitProperty (String propertySetName, String propertyName)

Sets the value for the given property to be the default value for the property.

Parameters
propertySetName the name of the property set which contains the property to change
propertyName the name of the property to change
Throws
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

public abstract void setFormula (String formula, int aggFromBase, int stFromBase, Boolean isTokenStream, boolean isPassThrough)

Throws
UnsupportedOperationException

public abstract void setFormula (String formula, Boolean aggFromBase, boolean isPassThrough)

Throws
UnsupportedOperationException

public abstract void setFormula (String formula)

Allows the user to set the formula of a derived metric.

Parameters
formula The formula to use for the metric.
Throws
UnsupportedOperationException Thrown if the metric is not derived, and thus the formula cannot be changed, or if this object refers to a metric prompt.
See Also

public abstract void setFormula (String formula, int aggFromBase, int stFromBase, Boolean isTokenStream)

Allows the user to set the formula of a derived metric.

Parameters
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.
Throws
UnsupportedOperationException Thrown if the metric is not derived, and thus the formula cannot be changed, or if this object refers to a metric prompt.
See Also

public abstract void setFormula (String formula, Boolean aggFromBase)

Allows the user to set the formula of a derived metric.

Parameters
formula The formula to use for the metric.
aggFromBase whether the formula aggregate from base
Throws
UnsupportedOperationException Thrown if the metric is not derived, and thus the formula cannot be changed, or if this object refers to a metric prompt.
See Also

public abstract void setShowThresholds (boolean show)

Parameters
show whether to thresholds associated with this template metric

public abstract void setTemplateUnitProperty (String propertySetName, String propertyName, String propertyValue)

Sets the value of a specific property.

Parameters
propertySetName the property set name
propertyName the property name
propertyValue the property value
Throws
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

public abstract void setUnitLimit (WebExpression expr)