public interface

WebTemplateAttributes

com.microstrategy.web.objects.WebTemplateAttributes

Class Overview

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.

Summary

Public Methods
abstract boolean canToggleThresholds()
Indicates whether thresholds display can be turned on/off
abstract boolean containsKey(int key)
Returns whether the given key exists in the attributes collection.
abstract Enumeration elements()
Returns a java.util.Enumeration, which can be used to iterate through the WebTemplateAttribute objects in the collection in position ordering.
abstract WebTemplateAttribute get(int index)
Returns the WebTemplateAttribute object with the given index.
abstract WebTemplateAttribute getItemById(String id)
Finds a template attribute based on attribute DSS ID.
abstract WebTemplateAttribute getItemByKey(int key)
Returns the WebTemplateAttribute object with the given key.
abstract boolean hasThresholds()
Indicates whether there are any thresholds defined on the underlying attributes
abstract int indexOf(String id)
Returns an index of the template attribute for specified attribute DSS ID or -1 if it is not found.
abstract boolean isEmpty()
Returns true if the collection has no attributes in it.
abstract boolean isThresholdsDisplayEnabled()
Indicates whether at least one of the thresholds defined on the underlying attributes is enabled
abstract void setShowThresholds(boolean show)
Set or clear all thresholds of all attributes.
abstract int size()
Returns the number of WebTemplateAttribute objects in the attributes collection.

Public Methods

public abstract boolean canToggleThresholds ()

Indicates whether thresholds display can be turned on/off

Returns
  • whether thresholds display can be turned on/off
Throws
WebObjectsException
WebObjectsException

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

public abstract Enumeration elements ()

Returns a java.util.Enumeration, which can be used to iterate through the WebTemplateAttribute objects in the collection in position ordering.

Returns
  • A java.util.Enumeration which will iterate through the attributes collection and return WebTemplateAttribute objects.

public abstract WebTemplateAttribute get (int index)

Returns the WebTemplateAttribute object with the given index.

Parameters
index The index of the object to return from the collection.
Returns
Throws
IndexOutOfBoundsException Thrown if the index is outside the bounds of the collection.

public abstract WebTemplateAttribute getItemById (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.

public abstract WebTemplateAttribute getItemByKey (int key)

Returns the WebTemplateAttribute object with the given key.

Parameters
key The key of the object to search for in the collection.
Returns
Throws
IllegalArgumentException Thrown if the key is not found in the attributes collection.

public abstract boolean hasThresholds ()

Indicates whether there are any thresholds defined on the underlying attributes

Returns
  • boolean

public abstract int indexOf (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

public abstract boolean isEmpty ()

Returns true if the collection has no attributes in it.

Returns
  • Whether the attributes collection is empty.

public abstract boolean isThresholdsDisplayEnabled ()

Indicates whether at least one of the thresholds defined on the underlying attributes is enabled

Returns
  • boolean

public abstract void setShowThresholds (boolean show)

Set or clear all thresholds of all attributes. To see the changes in data, 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.

public abstract int size ()

Returns the number of WebTemplateAttribute objects in the attributes collection.

Returns
  • The size of the attributes collection.