com.microstrategy.web.objects.WebElements |
The WebElements interface represents a collection of WebElement
objects. This
collection is both indexed and keyed. All elements in
the collection must have the same parent attribute in the current product release.
This object cannot be directly instantiated, and must instead be obtained from interfaces
such as WebElementsObjectNode
, WebElementsPrompt
or WebElementSource
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract WebElement |
add(String elementID, String displayName)
Creates a new
WebElement object using the given parameters, adds it to the
elements collection, and returns the newly created object. | ||||||||||
abstract WebElement |
add(String elementID)
Creates a new
WebElement object using the given parameters, adds it to the
elements collection, and returns the newly created object. | ||||||||||
abstract void | buildShortXML(WebXMLBuilder builder) | ||||||||||
abstract void |
clear()
Removes all elements from the collection.
| ||||||||||
abstract boolean |
containsKey(int key)
Returns true if the given key exists in the collection, false if it does not.
| ||||||||||
abstract WebElements |
createClone()
Creates a clone of this collection.
| ||||||||||
abstract Enumeration |
elements()
Returns a java.util.Enumeration which can be used to iterate through the list
of elements in the collection.
| ||||||||||
abstract WebElement |
get(int index)
Returns the
WebElement object with the given index. | ||||||||||
abstract WebDisplayUnits |
getChildUnits()
Returns the collection of child display units, or null if the object is
not a collection.
| ||||||||||
abstract WebElement |
getItemByKey(int key)
Returns a
WebElement object with the given key, if it exists. | ||||||||||
abstract WebObjectInfo | getSource() | ||||||||||
abstract boolean |
isEmpty()
Returns true if there are no elements in this collection, false if there are one or more
elements in the collection.
| ||||||||||
abstract int |
keyOf(WebElement element)
Returns the key of the given element within the collection.
| ||||||||||
abstract void |
remove(WebElement element)
Removes the given
WebElement object from the collection. | ||||||||||
abstract void |
remove(int index)
Removes the
WebElement object with the given index from the collection,
and returns the removed element. | ||||||||||
abstract void | removeItemByID(String elementID) | ||||||||||
abstract void |
removeItemByKey(int key)
Removes the
WebElement object with the given key from the collection,
and returns the removed element. | ||||||||||
abstract void |
setSource(WebObjectInfo _source)
aggregation
| ||||||||||
abstract int |
size()
Returns the number of elements currently in the collection.
|
Creates a new WebElement
object using the given parameters, adds it to the
elements collection, and returns the newly created object.
elementID | The ID of the element to add. |
---|---|
displayName | The display name to assign to the element. |
WebElement
object.IllegalArgumentException | Thrown if the element ID does not come from the source object of the collection (if the source object is set). |
---|---|
UnsupportedOperationException | Thrown if the collection is read-only. |
Creates a new WebElement
object using the given parameters, adds it to the
elements collection, and returns the newly created object.
elementID | The ID of the element to add. |
---|
WebElement
object.IllegalArgumentException | Thrown if the element ID does not come from the source object of the collection (if the source object is set). |
---|---|
UnsupportedOperationException | Thrown if the collection is read-only. |
Removes all elements from the collection.
UnsupportedOperationException | Thrown if the collection is read-only. |
---|
Returns true if the given key exists in the collection, false if it does not.
key | The key whose existence we need to verify. |
---|
Creates a clone of this collection. Unlike the standard Java clone method, the clone is a deep clone, in that the list of elements will be separate between the two instances of the WebElements collections. This method is normally used by code that has a need to rollback the state of elements collections.
Returns a java.util.Enumeration which can be used to iterate through the list of elements in the collection.
Returns the WebElement
object with the given index.
index | The index of the element in the collection. |
---|
WebElement
object corresponding to the given index in the collection.IndexOutOfBoundsException | Thrown if the given index is out of the bounds of the collection. |
---|
Returns the collection of child display units, or null if the object is not a collection. Note that several display units are actually collections of display units as well.
WebObjectsException |
---|
Returns a WebElement
object with the given key, if it exists.
key | The key of the element to search for in the collection. |
---|
WebElement
object in the collection corresponding to the given key.IllegalArgumentException | Thrown if the key does not exist in the collection. |
---|
Returns true if there are no elements in this collection, false if there are one or more elements in the collection.
Returns the key of the given element within the collection.
element | The WebElement object to return the key of. |
---|
IllegalArgumentException | Thrown if the element's key cannot be determined, or the element is null. |
---|
Removes the given WebElement
object from the collection. Returns true if the operation succeeds.
element | The WebElement object to remove from the collection. |
---|
IllegalArgumentException | Thrown if the element does not exist in the collection. |
---|---|
UnsupportedOperationException | Thrown if the collection is read-only. |
Removes the WebElement
object with the given index from the collection,
and returns the removed element.
index | The index of the element in the collection to remove. |
---|
IndexOutOfBoundsException | Thrown if the given index is out of the bounds of the collection. |
---|---|
UnsupportedOperationException | Thrown if the collection is read-only. |
IllegalArgumentException | |
---|---|
UnsupportedOperationException |
Removes the WebElement
object with the given key from the collection,
and returns the removed element.
key | The key of the element to search for in the collection. |
---|
IllegalArgumentException | Thrown if the key does not exist in the collection. |
---|---|
UnsupportedOperationException | Thrown if the collection is read-only. |
Returns the number of elements currently in the collection.