public interface

WebAxis

com.microstrategy.web.objects.WebAxis

Class Overview

The WebAxis interface represents the current state of a single axis on a template. The WebAxis object has many methods to add, remove, or move WebTemplateUnit objects to/from the collection, or gather information about the contents of the collection.

Summary

Public Methods
abstract WebTemplateUnit add(Object object, int beforeKey)
Adds the given object to the end of the current axis, before the object with the given key.
abstract WebTemplateUnit add(Object object)
Adds the given object to the end of the current axis.
abstract void clear(boolean isDisableOnly)
Clears all WebTemplateUnit objects from this axis.
abstract void clear()
Clears all WebTemplateUnit objects from this axis.
abstract boolean contains(WebObjectInfo object)
Returns true if there exists a WebTemplateUnit object in this axis which represents the given WebObjectInfo object.
abstract boolean containsKey(int key)
Returns true if an object with the given key can be found on the axis.
abstract boolean containsMetrics()
Returns true if the metrics collection is on the current axis, false if it is not.
abstract Enumeration elements()
Returns a java.util.Enumeration which can be used to iterate through the objects on the axis, in left-to-right order.
abstract WebTemplateUnit get(int index)
Returns the WebTemplateUnit object within this axis with the given (0-based) index.
abstract WebFormatContainer getFormatContainer()
Get the format container on this axis, which contains the 4 format objects.
abstract int getIndex()
Returns the (1-based) index of this axis.
abstract WebTemplateUnit getItemByKey(int key)
Returns the WebTemplateUnit object within this axis with the given key.
abstract WebSorts getSorts()
Returns the WebSorts collection, which allows the user to examine and change the sorting settings on the axis.
abstract boolean isEmpty()
Returns whether the axis is empty.
abstract int keyOf(WebObjectInfo object)
Returns the key of the WebTemplateUnit object on the current axis corresponding to the given WebObjectInfo object.
abstract int keyOfMetrics()
Returns the key of the WebTemplateMetrics object in the axis.
abstract void remove(int index)
Removes the WebTemplateUnit object at the given index from the collection.
abstract void remove(int index, boolean isDisableOnly)
Removes the WebTemplateUnit object at the given index from the collection.
abstract void removeItemByKey(int key, boolean isDisableOnly)
Removes the WebTemplateUnit object with the given key from the collection.
abstract void removeItemByKey(int key)
Removes the WebTemplateUnit object with the given key from the collection.
abstract int size()
Returns the number of template units on the current axis.

Public Methods

public abstract WebTemplateUnit add (Object object, int beforeKey)

Adds the given object to the end of the current axis, before the object with the given key. The given object should be of type WebObjectInfo or WebTemplateMetrics. In addition, if the object is of type WebObjectInfo, then only objects which are valid to place on a template may be given. If the specified object exists on *any* axis (including this one), it is first removed from that axis and then added to this axis. For an object of type WebObjectInfo, the given object is considered to exist on an axis if the DSSID and TYPE match (does not need to be the the same instance). For an object of type WebTemplateMetrics, the given object is considered to exist on an axis if containsMetrics() returns true (does not need to the the same instance).

Parameters
object An object of type WebObjectInfo or WebTemplateMetrics, which will be added to this axis.
beforeKey The key of the object in the axis collection which this object should be placed before.
Returns
Throws
UnsupportedOperationException Thrown if the axis is designated as read-only.
IllegalArgumentException Thrown if the given argument is not one of the above stated valid types of object, or if an object with the given key cannot be found on the axis.

public abstract WebTemplateUnit add (Object object)

Adds the given object to the end of the current axis. The given object should be of type WebObjectInfo or WebTemplateMetrics. In addition, if the object is of type WebObjectInfo, then only objects which are valid to place on a template may be given. If the specified object exists on *any* axis on the template(including this one), it is first removed from that axis and then added to this axis. For an object of type WebObjectInfo, the given object is considered to exist on an axis if the DSSID and TYPE match (does not need to be the the same instance). For an object of type WebTemplateMetrics, the given object is considered to exist on an axis if containsMetrics() returns true (does not need to the the same instance).

Parameters
object An object of type WebObjectInfo or WebTemplateMetrics, which will be added to this axis.
Returns
Throws
UnsupportedOperationException Thrown if the template is designated as read-only.
IllegalArgumentException Thrown if the given argument is not one of the above stated valid types of object.

public abstract void clear (boolean isDisableOnly)

Clears all WebTemplateUnit objects from this axis.

Parameters
isDisableOnly Indicate if it is a 'disable from grid' or 'remove from grid' for RWD
Throws
UnsupportedOperationException Thrown if the axis is designated as read-only.

public abstract void clear ()

Clears all WebTemplateUnit objects from this axis.

Throws
UnsupportedOperationException Thrown if the axis is designated as read-only.

public abstract boolean contains (WebObjectInfo object)

Returns true if there exists a WebTemplateUnit object in this axis which represents the given WebObjectInfo object.

Parameters
object The WebObjectInfo object to find in the collection.
Returns

public abstract boolean containsKey (int key)

Returns true if an object with the given key can be found on the axis.

Parameters
key The key of the object to search for.
Returns
  • True if the key can be found in the collection, false otherwise.

public abstract boolean containsMetrics ()

Returns true if the metrics collection is on the current axis, false if it is not.

Returns
  • True if the metrics collection is found on this axis, false if it is not.

public abstract Enumeration elements ()

Returns a java.util.Enumeration which can be used to iterate through the objects on the axis, in left-to-right order.

Returns
  • A java.util.Enumeration object, used to iterate through the WebTemplateUnit objects in the collection.

public abstract WebTemplateUnit get (int index)

Returns the WebTemplateUnit object within this axis with the given (0-based) index.

Parameters
index The index of the object to return.
Returns
Throws
IndexOutOfBoundsException Thrown if the requested index is not within the bounds of the collection.

public abstract WebFormatContainer getFormatContainer ()

Get the format container on this axis, which contains the 4 format objects.

Returns

public abstract int getIndex ()

Returns the (1-based) index of this axis.

Returns

public abstract WebTemplateUnit getItemByKey (int key)

Returns the WebTemplateUnit object within this axis with the given key.

Parameters
key The key of the object to return.
Returns
Throws
IllegalArgumentException Thrown if the object with the given key is not found in this axis.

public abstract WebSorts getSorts ()

Returns the WebSorts collection, which allows the user to examine and change the sorting settings on the axis.

Returns
  • A WebSorts object which can be used to gather information about and change the settings of the sorts on the axis.

public abstract boolean isEmpty ()

Returns whether the axis is empty.

Returns
  • True if the axis has no units on it, false if it has one or more.

public abstract int keyOf (WebObjectInfo object)

Returns the key of the WebTemplateUnit object on the current axis corresponding to the given WebObjectInfo object.

Parameters
object The WebObjectInfo object whose key we are seeking.
Returns
  • The key of the given object on the current axis.
Throws
IllegalArgumentException Thrown if the given object is of the incorrect type, or is not already on the axis.

public abstract int keyOfMetrics ()

Returns the key of the WebTemplateMetrics object in the axis.

Returns
  • The key of the metrics collection on this axis.
Throws
IllegalArgumentException Thrown if a metrics collection does not exist on the current axis on the axis.

public abstract void remove (int index)

Removes the WebTemplateUnit object at the given index from the collection.

Parameters
index The index of the object to be removed.
Throws
UnsupportedOperationException Thrown if the axis is designated as read-only.
IndexOutOfBoundsException Thrown if the requested index is not within the bounds of the collection.

public abstract void remove (int index, boolean isDisableOnly)

Removes the WebTemplateUnit object at the given index from the collection.

Parameters
index The index of the object to be removed.
isDisableOnly Indicate if it is a 'disable from grid' or 'remove from grid' for RWD
Throws
UnsupportedOperationException Thrown if the axis is designated as read-only.
IndexOutOfBoundsException Thrown if the requested index is not within the bounds of the collection.

public abstract void removeItemByKey (int key, boolean isDisableOnly)

Removes the WebTemplateUnit object with the given key from the collection.

Parameters
key The key of the object to be removed.
isDisableOnly Indicate if it is a 'disable from grid' or 'remove from grid' for RWD
Throws
UnsupportedOperationException Thrown if the axis is designated as read-only.
IllegalArgumentException Thrown if no object with the given key is found.

public abstract void removeItemByKey (int key)

Removes the WebTemplateUnit object with the given key from the collection.

Parameters
key The key of the object to be removed.
Throws
UnsupportedOperationException Thrown if the axis is designated as read-only.
IllegalArgumentException Thrown if no object with the given key is found.

public abstract int size ()

Returns the number of template units on the current axis.

Returns