com.microstrategy.web.objects.WebAxis |
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.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract WebTemplateUnit |
add(Object object)
Adds the given object to the end of the current axis.
| ||||||||||
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 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.
|
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).
object | An object of type WebObjectInfo or WebTemplateMetrics , which will be added to this axis. |
---|
WebTemplateUnit
object corresponding to the given object.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. |
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).
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. |
WebTemplateUnit
object corresponding to the given object.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. |
Clears all WebTemplateUnit
objects from this axis.
isDisableOnly | Indicate if it is a 'disable from grid' or 'remove from grid' for RWD |
---|
UnsupportedOperationException | Thrown if the axis is designated as read-only. |
---|
Clears all WebTemplateUnit
objects from this axis.
UnsupportedOperationException | Thrown if the axis is designated as read-only. |
---|
Returns true if there exists a WebTemplateUnit
object in this axis which represents
the given WebObjectInfo
object.
object | The WebObjectInfo object to find in the collection. |
---|
WebTemplateUnit
object in this axis which represents
the given WebObjectInfo
object, else return false.
Returns true if an object with the given key can be found on the axis.
key | The key of the object to search for. |
---|
Returns true if the metrics collection is on the current axis, false if it is not.
Returns a java.util.Enumeration which can be used to iterate through the objects on the axis, in left-to-right order.
WebTemplateUnit
objects
in the collection.
Returns the WebTemplateUnit
object within this axis with the given (0-based) index.
index | The index of the object to return. |
---|
WebTemplateUnit
object corresponding to the given index.IndexOutOfBoundsException | Thrown if the requested index is not within the bounds of the collection. |
---|
Get the format container on this axis, which contains the 4 format objects.
WebFormatContainer
object, which is the container for the 4 format objects.
Returns the (1-based) index of this axis.
EnumDSSXMLAxisName
.
Returns the WebTemplateUnit
object within this axis with the given key.
key | The key of the object to return. |
---|
WebTemplateUnit
object corresponding to the given key.IllegalArgumentException | Thrown if the object with the given key is not found in this axis. |
---|
Returns whether the axis is empty.
Returns the key of the WebTemplateUnit
object on the current axis corresponding to the
given WebObjectInfo
object.
object | The WebObjectInfo object whose key we are seeking. |
---|
IllegalArgumentException | Thrown if the given object is of the incorrect type, or is not already on the axis. |
---|
Returns the key of the WebTemplateMetrics
object in the axis.
IllegalArgumentException | Thrown if a metrics collection does not exist on the current axis on the axis. |
---|
Removes the WebTemplateUnit
object at the given index from the collection.
index | The index of the object to be removed. |
---|
UnsupportedOperationException | Thrown if the axis is designated as read-only. |
---|---|
IndexOutOfBoundsException | Thrown if the requested index is not within the bounds of the collection. |
Removes the WebTemplateUnit
object at the given index from the collection.
index | The index of the object to be removed. |
---|---|
isDisableOnly | Indicate if it is a 'disable from grid' or 'remove from grid' for RWD |
UnsupportedOperationException | Thrown if the axis is designated as read-only. |
---|---|
IndexOutOfBoundsException | Thrown if the requested index is not within the bounds of the collection. |
Removes the WebTemplateUnit
object with the given key from the collection.
key | The key of the object to be removed. |
---|---|
isDisableOnly | Indicate if it is a 'disable from grid' or 'remove from grid' for RWD |
UnsupportedOperationException | Thrown if the axis is designated as read-only. |
---|---|
IllegalArgumentException | Thrown if no object with the given key is found. |
Removes the WebTemplateUnit
object with the given key from the collection.
key | The key of the object to be removed. |
---|
UnsupportedOperationException | Thrown if the axis is designated as read-only. |
---|---|
IllegalArgumentException | Thrown if no object with the given key is found. |
Returns the number of template units on the current axis.
WebTemplateUnit
objects on this axis.