Package com.microstrategy.web.objects
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 aWebTemplateorWebAxisobject. 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 onWebTemplateandWebAxiswhich modify the template.- Since:
- MicroStrategy Web 7.3.1 or earlier
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Clears the template unit.java.lang.StringgetAlias()Returns the alias of the template unit.intgetAxisIndex()Returns the index of theWebAxiswhich this template unit is on.RWControlgetControl()Returns control associated with this template unitWebElementgetCurrentElement()Returns the current element of the template unit, if specified, or null if it is unspecified.intgetCurrentElementStatus()Returns the current element status of this template unit.WebDrillMapgetDrillMap()Returns the collection ofWebDrillPathobjects for this Template Unit as aWebDrillMapobject.WebFormatContainergetFormatContainer()Returns the Format Container on this Unit, which contains the 4WebFormatobjects.intgetKey()Returns the key of the template unit.java.lang.StringgetName()Returns the standard name for the template unit.WebObjectInfogetOI()intgetPosition()Returns the position of the template unit on its axis.java.lang.ObjectgetTarget()Returns the target of this template unit.intgetUnitType()Returns the type of template unit, fromEnumDSSXMLTemplateUnitType.booleanhasUnitLimit()Returns whether this template unit has a unit limit on itbooleanisLocked()Returns whether the template unit is locked.voidlock()Locks the template unit.voidsetAlias(java.lang.String alias)Sets the alias of the template unit.voidsetCurrentElement(java.lang.String elementID)Sets the current element of this template unit by element ID.voidsetCurrentElement(java.lang.String elementID, int elementStatus)Set the current element of this template unit by element ID, using the status as the specified elementStatus.voidsetCurrentElementStatus(int elementStatus)Sets the current element status of this template unit.voidunlock()Unlocks the template unit.- 
Methods inherited from interface com.microstrategy.web.objects.WebHyperLinkContainergetHyperLinks, newHyperLink
 
- 
 
- 
- 
- 
Method Detail- 
getAliasjava.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)
 
 - 
setAliasvoid 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()
 
 - 
getAxisIndexint getAxisIndex() Returns the index of theWebAxiswhich this template unit is on.- Returns:
- The owner axis' index, from EnumDSSXMLAxisName.
 
 - 
getPositionint getPosition() Returns the position of the template unit on its axis. This value is 1-based.- Returns:
- The position of the template unit.
 
 - 
getKeyint 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.
 
 - 
getUnitTypeint getUnitType() Returns the type of template unit, fromEnumDSSXMLTemplateUnitType.- Returns:
- The type of the current template unit, from EnumDSSXMLTemplateUnitType.
 
 - 
getNamejava.lang.String getName() Returns the standard name for the template unit.- Returns:
- The name of the template unit.
 
 - 
setCurrentElementvoid setCurrentElement(java.lang.String elementID) throws java.lang.UnsupportedOperationException, java.lang.IllegalArgumentExceptionSets 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()
 
 - 
setCurrentElementvoid setCurrentElement(java.lang.String elementID, int elementStatus) throws java.lang.UnsupportedOperationException, java.lang.IllegalArgumentExceptionSet 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.
 
 - 
setCurrentElementStatusvoid setCurrentElementStatus(int elementStatus) throws java.lang.IllegalArgumentExceptionSets 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
 
 - 
getCurrentElementStatusint 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.
 
 - 
getCurrentElementWebElement getCurrentElement() Returns the current element of the template unit, if specified, or null if it is unspecified.- Returns:
- A WebElementwhich describes the current element of the template unit.
- See Also:
- setCurrentElement(java.lang.String)
 
 - 
getTargetjava.lang.Object getTarget() Returns the target of this template unit. This will be either aWebTemplateAttribute,WebTemplateCustomGroup,WebTemplateConsolidation,WebTemplateDimension, orWebTemplateMetricsobject. It is the responsibility of the user to determine which type of object is returned.- Returns:
- An object which implements either the WebObjectInfointerface or theWebTemplateMetricsobject.
 
 - 
getFormatContainerWebFormatContainer getFormatContainer() Returns the Format Container on this Unit, which contains the 4WebFormatobjects.- Returns:
- WebFormatContainer This object is the container for the 4 WebFormatobjects.
 
 - 
isLockedboolean 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.
 
 - 
lockvoid lock() Locks the template unit.
 - 
unlockvoid unlock() Unlocks the template unit.
 - 
clearvoid clear() Clears the template unit. This causes the unit to act as if it was just added to the template.
 - 
getDrillMapWebDrillMap getDrillMap() throws WebObjectsException Returns the collection ofWebDrillPathobjects for this Template Unit as aWebDrillMapobject.- Returns:
- The collection of WebDrillPathobjects as aWebDrillMapobject.
- Throws:
- WebObjectsException- if the Server encountered an error in generating the default drill paths.
 
 - 
getControlRWControl getControl() Returns control associated with this template unit- Returns:
- control associated with this template unit
- Since:
- MicroStrategy Web 8.1.0
 
 - 
hasUnitLimitboolean hasUnitLimit() Returns whether this template unit has a unit limit on it- Returns:
- boolean stating whether a unit limit is imposed on this TU
 
 - 
getOIWebObjectInfo getOI() 
 
- 
 
-