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 aWebTemplate
orWebAxis
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 onWebTemplate
andWebAxis
which modify the template.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Clears the template unit.java.lang.String
getAlias()
Returns the alias of the template unit.int
getAxisIndex()
Returns the index of theWebAxis
which this template unit is on.RWControl
getControl()
Returns control associated with this template unitWebElement
getCurrentElement()
Returns the current element of the template unit, if specified, or null if it is unspecified.int
getCurrentElementStatus()
Returns the current element status of this template unit.WebDrillMap
getDrillMap()
Returns the collection ofWebDrillPath
objects for this Template Unit as aWebDrillMap
object.WebFormatContainer
getFormatContainer()
Returns the Format Container on this Unit, which contains the 4WebFormat
objects.int
getKey()
Returns the key of the template unit.java.lang.String
getName()
Returns the standard name for the template unit.WebObjectInfo
getOI()
int
getPosition()
Returns the position of the template unit on its axis.java.lang.Object
getTarget()
Returns the target of this template unit.int
getUnitType()
Returns the type of template unit, fromEnumDSSXMLTemplateUnitType
.boolean
hasUnitLimit()
Returns whether this template unit has a unit limit on itboolean
isLocked()
Returns whether the template unit is locked.void
lock()
Locks the template unit.void
setAlias(java.lang.String alias)
Sets the alias of the template unit.void
setCurrentElement(java.lang.String elementID)
Sets the current element of this template unit by element ID.void
setCurrentElement(java.lang.String elementID, int elementStatus)
Set the current element of this template unit by element ID, using the status as the specified elementStatus.void
setCurrentElementStatus(int elementStatus)
Sets the current element status of this template unit.void
unlock()
Unlocks the template unit.-
Methods inherited from interface com.microstrategy.web.objects.WebHyperLinkContainer
getHyperLinks, newHyperLink
-
-
-
-
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 theWebAxis
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.
-
getUnitType
int getUnitType()
Returns the type of template unit, fromEnumDSSXMLTemplateUnitType
.- Returns:
- The type of the current template unit, from
EnumDSSXMLTemplateUnitType
.
-
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 fromEnumDSSXMLCurrentElementStatus
.- 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 enumerationEnumDSSXMLCurrentElementStatus
- 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
.
-
getCurrentElement
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. - See Also:
setCurrentElement(java.lang.String)
-
getTarget
java.lang.Object getTarget()
Returns the target of this template unit. This will be either aWebTemplateAttribute
,WebTemplateCustomGroup
,WebTemplateConsolidation
,WebTemplateDimension
, orWebTemplateMetrics
object. It is the responsibility of the user to determine which type of object is returned.- Returns:
- An object which implements either the
WebObjectInfo
interface or theWebTemplateMetrics
object.
-
getFormatContainer
WebFormatContainer getFormatContainer()
Returns the Format Container on this Unit, which contains the 4WebFormat
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.
-
getDrillMap
WebDrillMap getDrillMap() throws WebObjectsException
Returns the collection ofWebDrillPath
objects for this Template Unit as aWebDrillMap
object.- Returns:
- The collection of
WebDrillPath
objects as aWebDrillMap
object. - Throws:
WebObjectsException
- if the Server encountered an error in generating the default drill paths.
-
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
-
getOI
WebObjectInfo getOI()
-
-