public interface

WebDisplayUnits

com.microstrategy.web.objects.WebDisplayUnits
Known Indirect Subclasses

Class Overview

The WebDisplayUnits interface represents a group of WebDisplayUnit objects. This interface contains methods for iterating through the collection of objects it represents, along with shortcut methods to allow the user to change the state of all objects in the collection at once.

Summary

Public Methods
abstract int add(WebDisplayUnit unit, WebDisplayUnit beforeObject)
Adds the given WebObjectInfo object to the folder collection.
abstract int add(WebDisplayUnit unit, int beforeKey)
Adds the given WebDisplayUnit object to the collection.
abstract void add(WebDisplayUnit unit)
Adds the given WebDisplayUnit object to the collection.
abstract void addDetails(boolean details)
Sets whether details should be added to all objects within the collection.
abstract int addX(WebDisplayUnit unit)
Adds the given WebDisplayUnit object to the available display units collection.
abstract void applyVisitor(DisplayUnitsVisitor visitor, boolean deep)
abstract void clear()
Clears all objects from the collection.
abstract boolean containsKey(int key)
Returns true if the folder contains an item by the given key, false if not.
abstract boolean containsObject(WebDisplayUnit object)
Returns true if the folder contains the given object, false if it does not.
abstract Enumeration elements()
Returns a java.util.Enumeration containing the objects in this collection.
abstract Enumeration entries()
Returns a java.util.Enumeration containing the WebDisplayUnitEntry objects in this collection.
abstract WebDisplayUnits findAllItems(Object object)
Tries to find the given item within the objects which are in the collection.
abstract WebDisplayUnit findItem(Object object)
Tries to find the given item within the objects which are in the collection.
abstract WebDisplayUnit get(int index)
Returns the display unit in the collection with the given index.
abstract int getBlockBegin()
Returns the index of the first retrieved object in the collection relative to the entire set.
abstract int getBlockCount()
Returns the current blockCount setting, which is used for incremental fetch of contents.
abstract int getChildCount()
Returns the child count, which is the total number of items in the collection.
abstract int getFolderCount()
Returns the folder count, which is the total number of folder objects in the underlying I-Server collection.
abstract Enumeration getHighlightedItems(boolean deep)
abstract Enumeration getHighlightedItems()
abstract WebDisplayUnit getItemByKey(int key)
Returns the display unit in the collection with the given key.
abstract int getObjectCount(int objectType)
Returns the number of objects of the specified object type in the collection.
abstract int getPartialFolderCount()
Returns the number of folders in the collection.
abstract int getSelectedCount()
Returns the number of selected child display units.
abstract Enumeration getSelectedItems()
abstract Enumeration getSelectedItems(boolean deep)
abstract void highlightUnits()
Highlights all units in the collection (without details).
abstract void highlightUnits(boolean details)
Highlights all units in the collection.
abstract boolean isEmpty()
Returns whether the collection is empty.
abstract int keyOf(int index)
Returns the key of the object with specified index.
abstract int keyOf(WebDisplayUnit object)
Returns the key of the given object, if it exists in the collection.
abstract void move(int key, int beforeKey)
Moves the object with the given key to position before specified object.
abstract void remove(int index)
Removes the display unit with the given index from the collection.
abstract void remove(WebDisplayUnit unit)
Removes the display unit from the collection.
abstract void removeItemByKey(int key)
Removes the object in the collection with the given key.
abstract void setBlockBegin(int blockBegin)
Sets the index of the first retrieved object in the collection relative to the entire set.
abstract void setBlockCount(int blockCount)
Sets the blockCount setting, which is used for incremental fetch of folder contents.
abstract void setChildCount(int val)
Sets the child count.
abstract void setFolderCount(int val)
Sets the folder count'
abstract void setSelected(boolean selected)
Sets the selected status of all units in the collection.
abstract int size()
Returns the number of items in the collection.
abstract void sort(Comparator comp)

Public Methods

public abstract int add (WebDisplayUnit unit, WebDisplayUnit beforeObject)

Adds the given WebObjectInfo object to the folder collection.

Parameters
unit The WebDisplayUnit object to add to the collection.
beforeObject The object already in the folder to place the new object before.
Returns
  • the key assigned to this object in the collection
Throws
UnsupportedOperationException Thrown if the folder object is marked as read-only
IllegalArgumentException Thrown if there is an error when adding the object to the collection, for example, if the beforeObject given does not exist..

public abstract int add (WebDisplayUnit unit, int beforeKey)

Adds the given WebDisplayUnit object to the collection.

Parameters
unit The WebDisplayUnit object to add to the collection.
beforeKey The key of an object which this object should be inserted before in the list. If the kye is less then 0 the object will be inserted after the last object in the collection.
Returns
  • the key assigned to this object in the collection
Throws
UnsupportedOperationException Thrown if the folder object is marked as read-only
IllegalArgumentException Thrown if there is an error when adding the object to the collection, for example, if the key given does not exist..

public abstract void add (WebDisplayUnit unit)

Adds the given WebDisplayUnit object to the collection.

Parameters
unit The WebDisplayUnit object to add to the collection.
Throws
UnsupportedOperationException Thrown if the collection is read-only.

public abstract void addDetails (boolean details)

Sets whether details should be added to all objects within the collection.

Parameters
details True if details should be included, false otherwise.
Throws
WebObjectsException Thrown if details could not be retrieved for one or more objects in the collection.

public abstract int addX (WebDisplayUnit unit)

Adds the given WebDisplayUnit object to the available display units collection. This will cause the object to be placed into the <available> section of the display XML.

Parameters
unit The WebDisplayUnit object to add to the collection.
Returns
  • the key assigned to this object in the collection
Throws
UnsupportedOperationException Thrown if the collection is read-only.

public abstract void applyVisitor (DisplayUnitsVisitor visitor, boolean deep)

public abstract void clear ()

Clears all objects from the collection.

Throws
UnsupportedOperationException Thrown in the case of a read-only collection.

public abstract boolean containsKey (int key)

Returns true if the folder contains an item by the given key, false if not.

Parameters
key The key to search for in the folder collection.
Returns
  • True if the collection contains the key, false if it does not.

public abstract boolean containsObject (WebDisplayUnit object)

Returns true if the folder contains the given object, false if it does not.

Parameters
object The WebObjectInfo object to search for in the folder.
Returns
  • True if the collection contains the value, false if it does not.

public abstract Enumeration elements ()

Returns a java.util.Enumeration containing the objects in this collection.

Returns
  • An Enumeration containing the objects in this collection.

public abstract Enumeration entries ()

Returns a java.util.Enumeration containing the WebDisplayUnitEntry objects in this collection. Entries are ordered in the index sequence.

Returns

public abstract WebDisplayUnits findAllItems (Object object)

Tries to find the given item within the objects which are in the collection. If one or more objects are found which match the given object, they are returned in the form of a WebDisplayUnits collection. This method is generally used to highlight objects within the available units collection. Note that for the current version, the given object must be of type WebObjectInfo, though this restriction may be lifted in future versions.

Parameters
object The object to search for in the available units collection.
Returns
  • A WebDisplayUnits collection containing the items found, or null if no items were found.

public abstract WebDisplayUnit findItem (Object object)

Tries to find the given item within the objects which are in the collection. If one or more objects are found which match the given object, the first one is returned. Note that for the current version, the given object must be of type WebObjectInfo, though this restriction may be lifted in future versions.

This method is generally used to highlight objects within the available units collection.

Parameters
object The object to search for in the available units collection.
Returns
  • The WebDisplayUnit object corresponding to the given object, or null if the object is not found.

public abstract WebDisplayUnit get (int index)

Returns the display unit in the collection with the given index.

Parameters
index The index of the object within the available display unit collection to return.
Returns
  • The WebDisplayUnit object corresponding to the given index in the collection.
Throws
IndexOutOfBoundsException Thrown if the given index is invalid.

public abstract int getBlockBegin ()

Returns the index of the first retrieved object in the collection relative to the entire set.

Returns
  • The current blockBegin setting.

public abstract int getBlockCount ()

Returns the current blockCount setting, which is used for incremental fetch of contents. This value tells the number of objects in the collection to be retrieved. This value is usually used in conjunction with blockBegin.

Returns
  • The current blockCount setting.

public abstract int getChildCount ()

Returns the child count, which is the total number of items in the collection. This value can be grater then size as the number of items returned from the I-Server can be restricted by the blockBegin and blockCount properties.

Returns
  • The child count.

public abstract int getFolderCount ()

Returns the folder count, which is the total number of folder objects in the underlying I-Server collection. This value can be grater then partial folder count due to the block count restriction.

Returns
  • The folder count.

public abstract Enumeration getHighlightedItems (boolean deep)

public abstract Enumeration getHighlightedItems ()

public abstract WebDisplayUnit getItemByKey (int key)

Returns the display unit in the collection with the given key.

Parameters
key The key into the collection of the desired item.
Returns
Throws
IllegalArgumentException Thrown if the given key is not found in the collection.

public abstract int getObjectCount (int objectType)

Returns the number of objects of the specified object type in the collection.

Parameters
objectType The type of object, from EnumDSSXMLObjectTypes, to be counted.
Returns
  • the number of objects of the specified object type in the collection. This value should come from EnumDSSXMLObjectTypes.

public abstract int getPartialFolderCount ()

Returns the number of folders in the collection.

Returns
  • The number of folders in the collection.

public abstract int getSelectedCount ()

Returns the number of selected child display units.

Returns
  • The number of units has been selected.

public abstract Enumeration getSelectedItems ()

public abstract Enumeration getSelectedItems (boolean deep)

public abstract void highlightUnits ()

Highlights all units in the collection (without details).

Throws
WebObjectsException Thrown if the objects cannot be highlighted.

public abstract void highlightUnits (boolean details)

Highlights all units in the collection. The given detail setting will determine whether the highlighting will be detailed or not.

Parameters
details Whether to have the highlighting include details.
Throws
WebObjectsException Thrown if the objects cannot be highlighted.

public abstract boolean isEmpty ()

Returns whether the collection is empty.

Returns
  • True if the collection is empty, false otherwise.

public abstract int keyOf (int index)

Returns the key of the object with specified index.

Parameters
index an index of object in the collection.
Returns
  • The key of the object.
Throws
IndexOutOfBoundsException Thrown if the index is out boundaries.

public abstract int keyOf (WebDisplayUnit object)

Returns the key of the given object, if it exists in the collection.

Parameters
object The WebDisplayUnit object to search for in the folder.
Returns
  • The key of the object.
Throws
IllegalArgumentException Thrown if the object does not exist in the collection.

public abstract void move (int key, int beforeKey)

Moves the object with the given key to position before specified object.

Parameters
key The key into the collection of the item to be removed.
beforeKey The key of an object which this object should be inserted before in the list. If the kye is less then 0 the object will be inserted after the last object in the collection.
Throws
IllegalArgumentException Thrown if the given key is not found in the collection.
UnsupportedOperationException Thrown if the folder object is read-only.

public abstract void remove (int index)

Removes the display unit with the given index from the collection.

Parameters
index The index of the object to remove from the collection.
Throws
UnsupportedOperationException Thrown if the collection is marked as read-only.
IndexOutOfBoundsException Thrown if the given index is invalid.

public abstract void remove (WebDisplayUnit unit)

Removes the display unit from the collection.

Parameters
unit The WebDisplayUnit object to be removed from the collection.
Throws
UnsupportedOperationException Thrown if the collection is marked as read-only.
IndexOutOfBoundsException Thrown if the given index is invalid.

public abstract void removeItemByKey (int key)

Removes the object in the collection with the given key.

Parameters
key The key into the collection of the item to be removed.
Throws
IllegalArgumentException Thrown if the given key is not found in the collection.
UnsupportedOperationException Thrown if the folder object is read-only.

public abstract void setBlockBegin (int blockBegin)

Sets the index of the first retrieved object in the collection relative to the entire set.

Parameters
blockBegin The blockBegin setting.
See Also

public abstract void setBlockCount (int blockCount)

Sets the blockCount setting, which is used for incremental fetch of folder contents. This value tells the number of objects in the folder to be retrieved. This value is usually used in conjunction with blockBegin.

Parameters
blockCount The blockCount setting to be used upon populating the folder from the Intelligence Server.
See Also

public abstract void setChildCount (int val)

Sets the child count.

Parameters
val The child count to be set.
See Also

public abstract void setFolderCount (int val)

Sets the folder count'

Parameters
val the folder count value.

public abstract void setSelected (boolean selected)

Sets the selected status of all units in the collection.

Parameters
selected True if the objects should be marked selected, false otherwise.

public abstract int size ()

Returns the number of items in the collection.

Returns
  • The size of the collection.

public abstract void sort (Comparator comp)