Package com.microstrategy.web.objects
Interface WebDisplayUnits
- 
- All Known Subinterfaces:
- WebMDXSources
 
 public interface WebDisplayUnitsThe WebDisplayUnits interface represents a group ofWebDisplayUnitobjects. 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.- Since:
- MicroStrategy Web 7.3.1 or earlier
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(WebDisplayUnit unit)Adds the givenWebDisplayUnitobject to the collection.intadd(WebDisplayUnit unit, int beforeKey)Adds the givenWebDisplayUnitobject to the collection.intadd(WebDisplayUnit unit, WebDisplayUnit beforeObject)Adds the givenWebObjectInfoobject to the folder collection.voidaddDetails(boolean details)Sets whether details should be added to all objects within the collection.intaddX(WebDisplayUnit unit)Adds the givenWebDisplayUnitobject to the available display units collection.voidapplyVisitor(DisplayUnitsVisitor visitor, boolean deep)voidclear()Clears all objects from the collection.booleancontainsKey(int key)Returns true if the folder contains an item by the given key, false if not.booleancontainsObject(WebDisplayUnit object)Returns true if the folder contains the given object, false if it does not.java.util.Enumerationelements()Returns a java.util.Enumeration containing the objects in this collection.java.util.Enumerationentries()Returns a java.util.Enumeration containing theWebDisplayUnitEntryobjects in this collection.WebDisplayUnitsfindAllItems(java.lang.Object object)Tries to find the given item within the objects which are in the collection.WebDisplayUnitfindItem(java.lang.Object object)Tries to find the given item within the objects which are in the collection.WebDisplayUnitget(int index)Returns the display unit in the collection with the given index.intgetBlockBegin()Returns the index of the first retrieved object in the collection relative to the entire set.intgetBlockCount()Returns the current blockCount setting, which is used for incremental fetch of contents.intgetChildCount()Returns the child count, which is the total number of items in the collection.intgetFolderCount()Returns the folder count, which is the total number of folder objects in the underlying I-Server collection.java.util.EnumerationgetHighlightedItems()java.util.EnumerationgetHighlightedItems(boolean deep)WebDisplayUnitgetItemByKey(int key)Returns the display unit in the collection with the given key.intgetObjectCount(int objectType)Returns the number of objects of the specified object type in the collection.intgetPartialFolderCount()Returns the number of folders in the collection.intgetSelectedCount()Returns the number of selected child display units.java.util.EnumerationgetSelectedItems()java.util.EnumerationgetSelectedItems(boolean deep)voidhighlightUnits()Highlights all units in the collection (without details).voidhighlightUnits(boolean details)Highlights all units in the collection.booleanisEmpty()Returns whether the collection is empty.intkeyOf(int index)Returns the key of the object with specified index.intkeyOf(WebDisplayUnit object)Returns the key of the given object, if it exists in the collection.voidmove(int key, int beforeKey)Moves the object with the given key to position before specified object.voidremove(int index)Removes the display unit with the given index from the collection.voidremove(WebDisplayUnit unit)Removes the display unit from the collection.voidremoveItemByKey(int key)Removes the object in the collection with the given key.voidsetBlockBegin(int blockBegin)Sets the index of the first retrieved object in the collection relative to the entire set.voidsetBlockCount(int blockCount)Sets the blockCount setting, which is used for incremental fetch of folder contents.voidsetChildCount(int val)Sets the child count.voidsetFolderCount(int val)Sets the folder count'voidsetSelected(boolean selected)Sets the selected status of all units in the collection.intsize()Returns the number of items in the collection.voidsort(java.util.Comparator comp)
 
- 
- 
- 
Method Detail- 
getWebDisplayUnit get(int index) throws java.lang.IndexOutOfBoundsException 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 WebDisplayUnitobject corresponding to the given index in the collection.
- Throws:
- java.lang.IndexOutOfBoundsException- Thrown if the given index is invalid.
 
 - 
getItemByKeyWebDisplayUnit getItemByKey(int key) throws java.lang.IllegalArgumentException Returns the display unit in the collection with the given key.- Parameters:
- key- The key into the collection of the desired item.
- Returns:
- The WebObjectInfoobject with the given key in the collection.
- Throws:
- java.lang.IllegalArgumentException- Thrown if the given key is not found in the collection.
 
 - 
isEmptyboolean isEmpty() Returns whether the collection is empty.- Returns:
- True if the collection is empty, false otherwise.
 
 - 
sizeint size() Returns the number of items in the collection.- Returns:
- The size of the collection.
 
 - 
elementsjava.util.Enumeration elements() Returns a java.util.Enumeration containing the objects in this collection.- Returns:
- An Enumeration containing the objects in this collection.
 
 - 
entriesjava.util.Enumeration entries() Returns a java.util.Enumeration containing theWebDisplayUnitEntryobjects in this collection. Entries are ordered in the index sequence.- Returns:
- An Enumeration  containing the WebDisplayUnitEntryobjects in this collection.
 
 - 
findItemWebDisplayUnit findItem(java.lang.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 typeWebObjectInfo, 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 WebDisplayUnitobject corresponding to the given object, or null if the object is not found.
 
 - 
findAllItemsWebDisplayUnits findAllItems(java.lang.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 aWebDisplayUnitscollection. 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 typeWebObjectInfo, though this restriction may be lifted in future versions.- Parameters:
- object- The object to search for in the available units collection.
- Returns:
- A WebDisplayUnitscollection containing the items found, or null if no items were found.
 
 - 
getObjectCountint 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.
 
 - 
keyOfint keyOf(WebDisplayUnit object) throws java.lang.IllegalArgumentException Returns the key of the given object, if it exists in the collection.- Parameters:
- object- The- WebDisplayUnitobject to search for in the folder.
- Returns:
- The key of the object.
- Throws:
- java.lang.IllegalArgumentException- Thrown if the object does not exist in the collection.
 
 - 
keyOfint keyOf(int index) throws java.lang.IndexOutOfBoundsException 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:
- java.lang.IndexOutOfBoundsException- Thrown if the index is out boundaries.
 
 - 
containsKeyboolean 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.
 
 - 
containsObjectboolean containsObject(WebDisplayUnit object) Returns true if the folder contains the given object, false if it does not.- Parameters:
- object- The- WebObjectInfoobject to search for in the folder.
- Returns:
- True if the collection contains the value, false if it does not.
 
 - 
addvoid add(WebDisplayUnit unit) throws java.lang.UnsupportedOperationException Adds the givenWebDisplayUnitobject to the collection.- Parameters:
- unit- The- WebDisplayUnitobject to add to the collection.
- Throws:
- java.lang.UnsupportedOperationException- Thrown if the collection is read-only.
 
 - 
addXint addX(WebDisplayUnit unit) throws java.lang.UnsupportedOperationException Adds the givenWebDisplayUnitobject 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- WebDisplayUnitobject to add to the collection.
- Returns:
- the key assigned to this object in the collection
- Throws:
- java.lang.UnsupportedOperationException- Thrown if the collection is read-only.
 
 - 
addint add(WebDisplayUnit unit, int beforeKey) throws java.lang.UnsupportedOperationException, java.lang.IllegalArgumentException Adds the givenWebDisplayUnitobject to the collection.- Parameters:
- unit- The- WebDisplayUnitobject 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:
- java.lang.UnsupportedOperationException- Thrown if the folder object is marked as read-only
- java.lang.IllegalArgumentException- Thrown if there is an error when adding the object to the collection, for example, if the key given does not exist..
 
 - 
addint add(WebDisplayUnit unit, WebDisplayUnit beforeObject) throws java.lang.UnsupportedOperationException, java.lang.IllegalArgumentException Adds the givenWebObjectInfoobject to the folder collection.- Parameters:
- unit- The- WebDisplayUnitobject 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:
- java.lang.UnsupportedOperationException- Thrown if the folder object is marked as read-only
- java.lang.IllegalArgumentException- Thrown if there is an error when adding the object to the collection, for example, if the beforeObject given does not exist..
 
 - 
removevoid remove(int index) throws java.lang.UnsupportedOperationException, java.lang.IndexOutOfBoundsExceptionRemoves the display unit with the given index from the collection.- Parameters:
- index- The index of the object to remove from the collection.
- Throws:
- java.lang.UnsupportedOperationException- Thrown if the collection is marked as read-only.
- java.lang.IndexOutOfBoundsException- Thrown if the given index is invalid.
 
 - 
removevoid remove(WebDisplayUnit unit) throws java.lang.UnsupportedOperationException, java.lang.IndexOutOfBoundsException Removes the display unit from the collection.- Parameters:
- unit- The- WebDisplayUnitobject to be removed from the collection.
- Throws:
- java.lang.UnsupportedOperationException- Thrown if the collection is marked as read-only.
- java.lang.IndexOutOfBoundsException- Thrown if the given index is invalid.
 
 - 
removeItemByKeyvoid removeItemByKey(int key) throws java.lang.UnsupportedOperationException, java.lang.IllegalArgumentExceptionRemoves the object in the collection with the given key.- Parameters:
- key- The key into the collection of the item to be removed.
- Throws:
- java.lang.IllegalArgumentException- Thrown if the given key is not found in the collection.
- java.lang.UnsupportedOperationException- Thrown if the folder object is read-only.
 
 - 
movevoid move(int key, int beforeKey) throws java.lang.UnsupportedOperationException, java.lang.IllegalArgumentExceptionMoves 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:
- java.lang.IllegalArgumentException- Thrown if the given key is not found in the collection.
- java.lang.UnsupportedOperationException- Thrown if the folder object is read-only.
 
 - 
clearvoid clear() throws java.lang.UnsupportedOperationExceptionClears all objects from the collection.- Throws:
- java.lang.UnsupportedOperationException- Thrown in the case of a read-only collection.
 
 - 
highlightUnitsvoid highlightUnits() throws WebObjectsExceptionHighlights all units in the collection (without details).- Throws:
- WebObjectsException- Thrown if the objects cannot be highlighted.
 
 - 
highlightUnitsvoid highlightUnits(boolean details) throws WebObjectsExceptionHighlights 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.
 
 - 
addDetailsvoid addDetails(boolean details) throws WebObjectsExceptionSets 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.
 
 - 
setSelectedvoid 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.
 
 - 
getSelectedCountint getSelectedCount() Returns the number of selected child display units.- Returns:
- The number of units has been selected.
 
 - 
getChildCountint 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.
- See Also:
- setChildCount(int)
 
 - 
setChildCountvoid setChildCount(int val) Sets the child count.- Parameters:
- val- The child count to be set.
- See Also:
- getChildCount()
 
 - 
getFolderCountint 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.
- See Also:
- setChildCount(int)
 
 - 
setFolderCountvoid setFolderCount(int val) Sets the folder count'- Parameters:
- val- the folder count value.
- See Also:
- setChildCount(int)
 
 - 
getPartialFolderCountint getPartialFolderCount() Returns the number of folders in the collection.- Returns:
- The number of folders in the collection.
- See Also:
- setChildCount(int)
 
 - 
getBlockBeginint getBlockBegin() Returns the index of the first retrieved object in the collection relative to the entire set.- Returns:
- The current blockBegin setting.
- See Also:
- setBlockBegin(int)
 
 - 
setBlockBeginvoid 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:
- getBlockBegin()
 
 - 
getBlockCountint 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.
- See Also:
- setBlockCount(int)
 
 - 
setBlockCountvoid 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:
- getBlockCount()
 
 - 
sortvoid sort(java.util.Comparator comp) 
 - 
applyVisitorvoid applyVisitor(DisplayUnitsVisitor visitor, boolean deep) throws WebObjectsException - Throws:
- WebObjectsException
 
 - 
getHighlightedItemsjava.util.Enumeration getHighlightedItems() throws WebObjectsException- Throws:
- WebObjectsException
 
 - 
getHighlightedItemsjava.util.Enumeration getHighlightedItems(boolean deep) throws WebObjectsException- Throws:
- WebObjectsException
 
 - 
getSelectedItemsjava.util.Enumeration getSelectedItems() throws WebObjectsException- Throws:
- WebObjectsException
 
 - 
getSelectedItemsjava.util.Enumeration getSelectedItems(boolean deep) throws WebObjectsException- Throws:
- WebObjectsException
 
 
- 
 
-