Interface WebTemplateUnit

  • All Superinterfaces:
    WebHyperLinkContainer

    public interface WebTemplateUnit
    extends WebHyperLinkContainer
    The WebTemplateUnit interface represents a template unit on a report. This object can generally be obtained from either a WebTemplate or WebAxis object. This object contains many methods used to get information about or change the configuration of a template unit. In addition, this object is the argument to many of the methods on WebTemplate and WebAxis which modify the template.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Method Detail

      • getAlias

        java.lang.String getAlias()
        Returns the alias of the template unit. This may or may not be the same as the unit name.
        Returns:
        The alias of the current template unit.
        See Also:
        setAlias(java.lang.String)
      • setAlias

        void setAlias​(java.lang.String alias)
        Sets the alias of the template unit.
        Parameters:
        alias - The alias to use for the template unit.
        See Also:
        getAlias()
      • getAxisIndex

        int getAxisIndex()
        Returns the index of the WebAxis which this template unit is on.
        Returns:
        The owner axis' index, from EnumDSSXMLAxisName.
      • getPosition

        int getPosition()
        Returns the position of the template unit on its axis. This value is 1-based.
        Returns:
        The position of the template unit.
      • getKey

        int getKey()
        Returns the key of the template unit. This can be used to uniquely identify the template unit within this template.
        Returns:
        The key of the template unit.
      • getName

        java.lang.String getName()
        Returns the standard name for the template unit.
        Returns:
        The name of the template unit.
      • setCurrentElement

        void setCurrentElement​(java.lang.String elementID)
                        throws java.lang.UnsupportedOperationException,
                               java.lang.IllegalArgumentException
        Sets the current element of this template unit by element ID.
        Parameters:
        elementID - The unique ID of the element to be made the current element.
        Throws:
        java.lang.UnsupportedOperationException - Thrown if the template is read-only.
        java.lang.IllegalArgumentException - Thrown if the given element ID does not exist.
        See Also:
        getCurrentElement()
      • setCurrentElement

        void setCurrentElement​(java.lang.String elementID,
                               int elementStatus)
                        throws java.lang.UnsupportedOperationException,
                               java.lang.IllegalArgumentException
        Set the current element of this template unit by element ID, using the status as the specified elementStatus.
        Parameters:
        elementID - The unique ID of the element to be made the current element.
        elementStatus - A value from EnumDSSXMLCurrentElementStatus.
        Throws:
        java.lang.UnsupportedOperationException - Thrown if the template is read-only.
        java.lang.IllegalArgumentException - Thrown if the given element ID does not exist, or elementStatus is not a valid status.
      • setCurrentElementStatus

        void setCurrentElementStatus​(int elementStatus)
                              throws java.lang.IllegalArgumentException
        Sets the current element status of this template unit.
        Parameters:
        elementStatus - A value from enumeration EnumDSSXMLCurrentElementStatus
        Throws:
        An - IllegalArgumentException will be throw if the input value is not one in the enumeration.
        java.lang.IllegalArgumentException
      • getCurrentElementStatus

        int getCurrentElementStatus()
        Returns the current element status of this template unit.
        Returns:
        The current element status of this template unit. It is a value in EnumDSSXMLCurrentElementStatus.
      • getFormatContainer

        WebFormatContainer getFormatContainer()
        Returns the Format Container on this Unit, which contains the 4 WebFormat objects.
        Returns:
        WebFormatContainer This object is the container for the 4 WebFormat objects.
      • isLocked

        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.
      • lock

        void lock()
        Locks the template unit.
      • unlock

        void unlock()
        Unlocks the template unit.
      • clear

        void clear()
        Clears the template unit. This causes the unit to act as if it was just added to the template.
      • getControl

        RWControl getControl()
        Returns control associated with this template unit
        Returns:
        control associated with this template unit
        Since:
        MicroStrategy Web 8.1.0
      • hasUnitLimit

        boolean hasUnitLimit()
        Returns whether this template unit has a unit limit on it
        Returns:
        boolean stating whether a unit limit is imposed on this TU