public interface

WebTemplateUnit

implements WebHyperLinkContainer
com.microstrategy.web.objects.WebTemplateUnit

Class Overview

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.

Summary

Public Methods
abstract void clear()
Clears the template unit.
abstract String getAlias()
Returns the alias of the template unit.
abstract int getAxisIndex()
Returns the index of the WebAxis which this template unit is on.
abstract RWControl getControl()
Returns control associated with this template unit
abstract WebElement getCurrentElement()
Returns the current element of the template unit, if specified, or null if it is unspecified.
abstract int getCurrentElementStatus()
Returns the current element status of this template unit.
abstract WebDrillMap getDrillMap()
Returns the collection of WebDrillPath objects for this Template Unit as a WebDrillMap object.
abstract WebFormatContainer getFormatContainer()
Returns the Format Container on this Unit, which contains the 4 WebFormat objects.
abstract int getKey()
Returns the key of the template unit.
abstract String getName()
Returns the standard name for the template unit.
abstract WebObjectInfo getOI()
abstract int getPosition()
Returns the position of the template unit on its axis.
abstract Object getTarget()
Returns the target of this template unit.
abstract int getUnitType()
Returns the type of template unit, from EnumDSSXMLTemplateUnitType.
abstract boolean hasUnitLimit()
Returns whether this template unit has a unit limit on it
abstract boolean isLocked()
Returns whether the template unit is locked.
abstract void lock()
Locks the template unit.
abstract void setAlias(String alias)
Sets the alias of the template unit.
abstract void setCurrentElement(String elementID)
Sets the current element of this template unit by element ID.
abstract void setCurrentElement(String elementID, int elementStatus)
Set the current element of this template unit by element ID, using the status as the specified elementStatus.
abstract void setCurrentElementStatus(int elementStatus)
Sets the current element status of this template unit.
abstract void unlock()
Unlocks the template unit.
[Expand]
Inherited Methods
From interface com.microstrategy.web.objects.WebHyperLinkContainer

Public Methods

public abstract void clear ()

Clears the template unit. This causes the unit to act as if it was just added to the template.

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

public abstract int getAxisIndex ()

Returns the index of the WebAxis which this template unit is on.

Returns

public abstract RWControl getControl ()

Returns control associated with this template unit

Returns
  • control associated with this template unit

public abstract WebElement getCurrentElement ()

Returns the current element of the template unit, if specified, or null if it is unspecified.

Returns
  • A WebElement which describes the current element of the template unit.

public abstract int getCurrentElementStatus ()

Returns the current element status of this template unit.

Returns

public abstract WebDrillMap getDrillMap ()

Returns the collection of WebDrillPath objects for this Template Unit as a WebDrillMap object.

Returns
Throws
WebObjectsException if the Server encountered an error in generating the default drill paths.

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

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

public abstract String getName ()

Returns the standard name for the template unit.

Returns
  • The name of the template unit.

public abstract WebObjectInfo getOI ()

public abstract int getPosition ()

Returns the position of the template unit on its axis. This value is 1-based.

Returns
  • The position of the template unit.

public abstract Object getTarget ()

Returns the target of this template unit. This will be either a WebTemplateAttribute, WebTemplateCustomGroup, WebTemplateConsolidation, WebTemplateDimension, or WebTemplateMetrics object. It is the responsibility of the user to determine which type of object is returned.

Returns

public abstract int getUnitType ()

Returns the type of template unit, from EnumDSSXMLTemplateUnitType.

Returns

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

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 void lock ()

Locks the template unit.

public abstract void setAlias (String alias)

Sets the alias of the template unit.

Parameters
alias The alias to use for the template unit.
See Also

public abstract void setCurrentElement (String elementID)

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
UnsupportedOperationException Thrown if the template is read-only.
IllegalArgumentException Thrown if the given element ID does not exist.

public abstract void setCurrentElement (String elementID, int elementStatus)

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
UnsupportedOperationException Thrown if the template is read-only.
IllegalArgumentException Thrown if the given element ID does not exist, or elementStatus is not a valid status.

public abstract void setCurrentElementStatus (int elementStatus)

Sets the current element status of this template unit.

Parameters
elementStatus A value from enumeration EnumDSSXMLCurrentElementStatus
Throws
IllegalArgumentException will be throw if the input value is not one in the enumeration.
IllegalArgumentException

public abstract void unlock ()

Unlocks the template unit.