Package com.microstrategy.web.objects
Interface WebTemplateAttributes
-
public interface WebTemplateAttributes
The WebTemplateAttributes object represents the attributes collection which exists on a template. This object contains a collection of attributes, ordered by position. The WebTemplateAttributes object can be used to add, remove, and examine attributes on the template.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canToggleThresholds()
Indicates whether thresholds display can be turned on/offboolean
containsKey(int key)
Returns whether the given key exists in the attributes collection.java.util.Enumeration
elements()
Returns a java.util.Enumeration, which can be used to iterate through theWebTemplateAttribute
objects in the collection in position ordering.WebTemplateAttribute
get(int index)
Returns theWebTemplateAttribute
object with the given index.WebTemplateAttribute
getItemById(java.lang.String id)
Finds a template attribute based on attribute DSS ID.WebTemplateAttribute
getItemByKey(int key)
Returns theWebTemplateAttribute
object with the given key.boolean
hasThresholds()
Indicates whether there are any thresholds defined on the underlying attributesint
indexOf(java.lang.String id)
Returns an index of the template attribute for specified attribute DSS ID or -1 if it is not found.boolean
isEmpty()
Returns true if the collection has no attributes in it.boolean
isThresholdsDisplayEnabled()
Indicates whether at least one of the thresholds defined on the underlying attributes is enabledvoid
setShowThresholds(boolean show)
Set or clear all thresholds of all attributes.int
size()
Returns the number ofWebTemplateAttribute
objects in the attributes collection.
-
-
-
Method Detail
-
get
WebTemplateAttribute get(int index) throws java.lang.IndexOutOfBoundsException
Returns theWebTemplateAttribute
object with the given index.- Parameters:
index
- The index of the object to return from the collection.- Returns:
- The
WebTemplateAttribute
object which the given key refers to. - Throws:
java.lang.IndexOutOfBoundsException
- Thrown if the index is outside the bounds of the collection.
-
getItemByKey
WebTemplateAttribute getItemByKey(int key) throws java.lang.IllegalArgumentException
Returns theWebTemplateAttribute
object with the given key.- Parameters:
key
- The key of the object to search for in the collection.- Returns:
- The
WebTemplateAttribute
object which the given key refers to. - Throws:
java.lang.IllegalArgumentException
- Thrown if the key is not found in the attributes collection.
-
size
int size()
Returns the number ofWebTemplateAttribute
objects in the attributes collection.- Returns:
- The size of the attributes collection.
-
isEmpty
boolean isEmpty()
Returns true if the collection has no attributes in it.- Returns:
- Whether the attributes collection is empty.
-
containsKey
boolean containsKey(int key)
Returns whether the given key exists in the attributes collection.- Parameters:
key
- The key whose existence we're verifying.- Returns:
- True if the given key exists in the collection; false otherwise
-
elements
java.util.Enumeration elements()
Returns a java.util.Enumeration, which can be used to iterate through theWebTemplateAttribute
objects in the collection in position ordering.- Returns:
- A java.util.Enumeration which will iterate through the attributes collection and
return
WebTemplateAttribute
objects.
-
hasThresholds
boolean hasThresholds()
Indicates whether there are any thresholds defined on the underlying attributes- Returns:
- boolean
- Since:
- MicroStrategy Web 8.0.0
-
setShowThresholds
void setShowThresholds(boolean show)
Set or clear all thresholds of all attributes. To see the changes in data,WebReportManipulation.applyChanges()
need to be called to retrieve another instance, which will have the changed data.- Parameters:
show
- boolean to indicate whether to show or to hide all thresholds.- Since:
- MicroStrategy Web 8.0.0
-
isThresholdsDisplayEnabled
boolean isThresholdsDisplayEnabled()
Indicates whether at least one of the thresholds defined on the underlying attributes is enabled- Returns:
- boolean
- Since:
- MicroStrategy Web 8.0.0
-
canToggleThresholds
boolean canToggleThresholds() throws WebObjectsException
Indicates whether thresholds display can be turned on/off- Returns:
- whether thresholds display can be turned on/off
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 8.0.0
-
getItemById
WebTemplateAttribute getItemById(java.lang.String id)
Finds a template attribute based on attribute DSS ID. Returns null if attribute not found.- Parameters:
id
- attribute DSS ID- Returns:
- template attribute.
- Since:
- MicroStrategy Web 8.1.2
-
indexOf
int indexOf(java.lang.String id)
Returns an index of the template attribute for specified attribute DSS ID or -1 if it is not found.- Parameters:
id
- attribute DSS ID- Returns:
- an index of the template attribute
- Since:
- MicroStrategy Web 8.1.2
-
-