Interface WebTemplateMetricSubtotals


  • @Deprecated
    public interface WebTemplateMetricSubtotals
    Deprecated.
    Subtotals are defined at the template level now. Please use WebTemplateSubtotals 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 Detail

      • add

        WebTemplateMetricSubtotal add​(int subTotalType)
                               throws java.lang.IllegalArgumentException,
                                      java.lang.UnsupportedOperationException
        Deprecated.
        Attempts to add a WebTemplateMetricSubtotal 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, from EnumDSSXMLMetricType.
        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 - The WebMetric 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 the WebTemplateMetricSubtotal 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 the WebTemplateMetricSubtotal 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, from EnumDSSXMLMetricType.
        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 the WebTemplateMetricSubtotal 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 the WebTemplateMetricSubtotal 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 given WebTemplateMetricSubtotal object from the collection.
        Parameters:
        object - The WebTemplateMetricSubtotal 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 - The WebTemplateMetricSubtotal 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, from EnumDSSXMLMetricType.
        Returns:
        True if the subtotal type is active, false otherwise.
      • 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.