public interface

WebTemplateSubtotal

com.microstrategy.web.objects.WebTemplateSubtotal

Class Overview

The WebTemplateSubtotal interface represents a subtotal of a single type within the WebTemplateSubtotals collection. This interface allows the user to gather information about and turn on/off the subtotal.

Summary

Public Methods
abstract WebSubtotalInstance createInstance(int type)
Creates a WebSubtotalInstance of the appropriate type and associates it to the subtotal.
abstract void deActivate()
Inactivates the WebTemplateSubtotal object.
abstract WebMetric getDefinition()
Returns the definition of a custom subtotal.
abstract int getIndex()
Returns the index of the subtotal within the WebTemplateSubtotals collection.
abstract WebSubtotalInstance getInstance()
Returns the WebSubtotalInstance associated with the subtotal.
abstract String getName()
Returns the name of the subtotal.
abstract WebTemplateSubtotal getSubtotalForMetric(WebMetric metric)
Returns the subtotal set for a given metric.
abstract int getTemplateSubtotalType()
Returns the subtotal type of the subtotal.
abstract int getType()
Returns the type of subtotal.
abstract boolean isActive()
Returns whether the subtotal is active.

Public Methods

public abstract WebSubtotalInstance createInstance (int type)

Creates a WebSubtotalInstance of the appropriate type and associates it to the subtotal. If the subtotal already has a subtotal instance of different type associated with it, this call will clear the original subtotal instance, create a new WebSubtotalInstance and return it. Otherwise it will just return the current subtotal instance.

Parameters
type type of subtotal instance from EnumSubtotalInstanceType

public abstract void deActivate ()

Inactivates the WebTemplateSubtotal object. This will clear the WebSubtotalInstance associated with the subtotal and generate the appropriate delta

public abstract WebMetric getDefinition ()

Returns the definition of a custom subtotal. A custom subtotal is a subtotal whose type is EnumDSSXMLMetricType.DssXmlMetricSubtotal.

Returns
  • The metric which the custom subtotal refers to. This will be an object of type WebMetric.
Throws
UnsupportedOperationException Thrown if the subtotal is not a custom subtotal, that is, its subtotal type is not EnumDSSXMLMetricType.DssXmlMetricSubtotal.

public abstract int getIndex ()

Returns the index of the subtotal within the WebTemplateSubtotals collection.

Returns
  • The key of the subtotal object.

public abstract WebSubtotalInstance getInstance ()

Returns the WebSubtotalInstance associated with the subtotal. The WebSubtotalInstance can then be used to get more information about how the subtotal has been defined, like whether the subtotal is set by position or by level (units) or by group by etc. If the subtotal has not been turned on, then it will return null

Returns

public abstract String getName ()

Returns the name of the subtotal. Example, Average, Total etc.

Returns
  • String that represents the name of the subtotal object

public abstract WebTemplateSubtotal getSubtotalForMetric (WebMetric metric)

Returns the subtotal set for a given metric. Mainly used for 'List Subtotals' or 'Custom subtotals' where you can define the subtotal function (average, sum, minimum etc) to be used for each metric on the template. For a 'definition' subtotal, this method will return itself.

Parameters
metric Metric whose subtotal is required.
Returns
  • WebTemplateSubtotal used to define the subtotal for the given metric

public abstract int getTemplateSubtotalType ()

Returns the subtotal type of the subtotal. This value indicates whether a subtotal is a definition subtotal or a list subtotal. A list subtotal is a Desktop created 'Custom' subtotal. This value is from EnumDSSXMLTemplateSubtotalType

public abstract int getType ()

Returns the type of subtotal.

Returns

public abstract boolean isActive ()

Returns whether the subtotal is active. A subtotal is active if it is turned on for the report. The subtotal may be turned on by position, across level or grouped by template units for the report.

Returns
  • Whether the subtotal is active.