com.microstrategy.web.objects.WebFolder |
![]() |
The WebFolder interface represents a folder object, either in metadata or a volatile one.
This interface is also used in answering an object prompt, and has methods for adding and
removing objects from a folder collection. The WebFolder
normally is read-only, except the WebFolder used as answer for WebObjectsPrompt
.
This object cannot be directly instantiated, and must instead be obtained from interfaces
such as WebObjectSource
or WebObjectsPrompt
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract int |
add(WebObjectInfo newObject)
Adds the given
WebObjectInfo object to the folder collection. | ||||||||||
abstract int |
add(WebObjectInfo newObject, int beforeKey)
Adds the given
WebObjectInfo object to the folder collection. | ||||||||||
abstract int |
add(WebObjectInfo newObject, WebObjectInfo beforeObject)
Adds the given
WebObjectInfo object to the folder collection. | ||||||||||
abstract void |
checkObjectVisibility(FolderBean fb, boolean isSearch)
Removes from the folder shortcuts whose target is not in the list of requested types.Some extra filtering for search
| ||||||||||
abstract void |
checkObjectVisibility(FolderBean fb)
Removes from the folder shortcuts whose target is not in the list of requested types.
| ||||||||||
abstract void |
clear()
Clears all objects from the folder collection.
| ||||||||||
abstract boolean |
contains(WebObjectInfo object)
Returns true if the folder contains the given object, false if it does not.
| ||||||||||
abstract boolean |
containsKey(int key)
Returns true if the folder contains an item by the given key, false if not.
| ||||||||||
abstract Enumeration |
elements()
Returns a java.util.Enumeration object, which can be used to iterate through the
folder.
| ||||||||||
abstract void |
filterShortcuts(int[] types)
Removes from the folder shortcuts whose target is not in the list of requested types.
| ||||||||||
abstract WebFolder |
findTypedObjects(int[] types)
Finds all objects in the folder which are of one of the given types or subtypes, and returns
a folder containing those objects.
| ||||||||||
abstract WebObjectInfo |
get(int index)
Returns the object in the collection with the given index.
| ||||||||||
abstract int |
getBlockBegin()
Returns the current blockBegin setting, which is used for incremental fetch of
folder contents.
| ||||||||||
abstract int |
getBlockCount()
Returns the current blockCount setting, which is used for incremental fetch of
folder contents.
| ||||||||||
abstract int |
getChildCount()
Returns the child count, which is the total number of items in the collection.
| ||||||||||
abstract Tree<WebObjectInfo> |
getChildrenInTree()
Returns child units in a tree structure.
| ||||||||||
abstract boolean |
getDereferenceShorcuts()
Returns whether Shortcut objects are "dereferenced" in folder browsing requests.
| ||||||||||
abstract WebObjectFilter | getFilter() | ||||||||||
abstract int |
getFolderType()
Returns the type of this folder, a value from
EnumDSSXMLFolderType . | ||||||||||
abstract boolean |
getIsBrowsing()
read a flag to indicate whether we're browsing a folder
Set only to get 'non-schedulable' flag on objects
| ||||||||||
abstract WebObjectInfo |
getItemByKey(int key)
Returns the object in the collection with the given key.
| ||||||||||
abstract int |
getLevel()
Returns the current value of the level parameter.
| ||||||||||
abstract int |
getOriginalChildCount()
In case some types of shortcuts objects will be filtered out from the objectCollection.
| ||||||||||
abstract int | getQuickSearchFlag() | ||||||||||
abstract WebFolder |
getRoot()
Returns a folder object representing the root folder of the project.
| ||||||||||
abstract int |
getStyle()
Returns the style in which the display XML of the folder will be output.
| ||||||||||
abstract SimpleList |
getTypeRestrictions()
Returns a collection of Integers which represent the set of object types
that can be contained in the folder.
| ||||||||||
abstract boolean |
isEmpty()
Returns true if the folder object contains nothing, false if it is not empty.
| ||||||||||
abstract boolean |
isNamedFolder(int folderName)
Returns whether this folder is the named folder.
| ||||||||||
abstract boolean | isNonSchedulable() | ||||||||||
abstract boolean |
isReadOnly()
Returns true if this folder is a read-only object, false if it is read/write.
| ||||||||||
abstract boolean |
isRoot()
Returns whether this object is the root folder.
| ||||||||||
abstract int |
keyOf(WebObjectInfo object)
Returns the key of the given object, if it exists in the collection.
| ||||||||||
abstract SimpleList |
objectTypes()
Returns a collection of Integers, which contains a non-repeating list of the types of
objects which are contained in this folder.
| ||||||||||
abstract int |
partialSubFolderCount()
Returns the number of sub-folders in the current folder, within the blockBegin and
blockCount constraints.
| ||||||||||
abstract void |
remove(WebObjectInfo object)
Removes the given object from the folder collection.
| ||||||||||
abstract void |
remove(int index)
Removes the object in the collection with the given index.
| ||||||||||
abstract void |
removeItemByKey(int key)
Removes the object in the collection with the given key.
| ||||||||||
abstract void |
setBlockBegin(int blockBegin)
Sets the blockBegin setting, which is used for incremental fetch of
folder contents.
| ||||||||||
abstract void |
setBlockCount(int blockCount)
Sets the blockCount setting, which is used for incremental fetch of
folder contents.
| ||||||||||
abstract void |
setDereferenceShortcuts(boolean dereferenceShorcuts)
Sets whether Shorcuts objects are "dereferenced" in folder browsing requests.
| ||||||||||
abstract void | setFilter(WebObjectFilter value) | ||||||||||
abstract void |
setIsBrowsing(boolean bf)
set a flag to indicate whether we're browsing a folder
Set only to get 'non-schedulable' flag on objects
| ||||||||||
abstract void |
setLevel(int level)
Sets the value of the level parameter.
| ||||||||||
abstract void |
setQuickSearchFlag(int qsr)
Read a QuickSearch flag returned in MetaDataSearch result xml node attribute and set to WebFolder object
| ||||||||||
abstract void |
setStyle(int style)
Sets the style in which the display XML of the folder will be output.
| ||||||||||
abstract int |
size()
Returns the number of objects in the folder.
| ||||||||||
abstract int |
subFolderCount()
Returns the number of sub-folders which exist in the current folder, regardless of blockCount.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Adds the given WebObjectInfo
object to the folder collection.
newObject | An object which implements the WebObjectInfo interface. |
---|
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. |
Adds the given WebObjectInfo
object to the folder collection.
newObject | An object which implements the WebObjectInfo interface. |
---|---|
beforeKey | The key of an object which this object should be inserted before in the list. |
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.. |
Adds the given WebObjectInfo
object to the folder collection.
newObject | An object which implements the WebObjectInfo interface. |
---|---|
beforeObject | The object already in the folder to place the new object before. |
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.. |
Removes from the folder shortcuts whose target is not in the list of requested types.Some extra filtering for search
Removes from the folder shortcuts whose target is not in the list of requested types.
Clears all objects from the folder collection.
UnsupportedOperationException | Thrown if the folder object is marked as read-only. |
---|
Returns true if the folder contains the given object, false if it does not.
object | The WebObjectInfo object to search for in the folder. |
---|
Returns true if the folder contains an item by the given key, false if not.
key | The key to search for in the folder collection. |
---|
Returns a java.util.Enumeration object, which can be used to iterate through the
folder. This Enumeration contains WebObjectInfo
objects.
Removes from the folder shortcuts whose target is not in the list of requested types.
types | a list of desirable types. |
---|
Finds all objects in the folder which are of one of the given types or subtypes, and returns
a folder containing those objects.
NOTE: If the intent is to populate the folder with only a certain set of object types, consider
using getTypeRestrictions()
before populating.
types | An array of integers which describe the types or subtypes of objects to return
from the folder. The values in the array must be values one of EnumDSSXMLObjectTypes or
EnumDSSXMLObjectSubTypes . |
---|
WebFolder
that contains all of the objects in the folder which
are of one of the types passed in.
Returns the object in the collection with the given index.
index | The index into the collection of the desired item. |
---|
WebObjectInfo
object with the given index in the collection.IndexOutOfBoundsException | Thrown if the given index is out of the bounds of the collection. |
---|
Returns the current blockBegin setting, which is used for incremental fetch of folder contents. This value tells the index of the first object in the folder to be retrieved. This value is usually used in conjunction with blockCount.
Returns the current 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.
Returns the child count, which is the total number of items in the collection.
Returns child units in a tree structure.
Currently, when perform a search, and set its setting setGettingTreeInfo(boolean)
to true, then the results
would bring back data with its browsing tree structure. Only in this case, this method would return the tree. In all other cases,
it would return null
.
Tree
to represent the search results with its browsing tree structure, or null
.
Returns whether Shortcut objects are "dereferenced" in folder browsing requests. If 'true' then the Shortcut object is replaced with the object it refers to in the folder contents. By default, Shortcut objects are NOT dereferenced.
Returns the type of this folder, a value from EnumDSSXMLFolderType
.
read a flag to indicate whether we're browsing a folder Set only to get 'non-schedulable' flag on objects
Returns the object in the collection with the given key.
key | The key into the collection of the desired item. |
---|
WebObjectInfo
object with the given key in the collection.IllegalArgumentException | Thrown if the given key is not found in the collection. |
---|
Returns the current value of the level parameter. It is used upon populating the folder's contents. As of MicroStrategy 7.2, this has no effect.
In case some types of shortcuts objects will be filtered out from the objectCollection. This function will return the total count received before filtering.
Returns a folder object representing the root folder of the project.
WebObjectsException | Signals an error while trying to obtain the root folder. |
---|
Returns the style in which the display XML of the folder will be output.
EnumWebFolderDisplayStyle
.Returns a collection of Integers which represent the set of object types that can be contained in the folder. This collection is modified by the caller to specify a set of "type restrictions". If no types are added, then there are no restrictions.
SimpleList
containing the types of objects that can be
included in the contents of the folder when it is populated by
the Intelligence Server.Returns true if the folder object contains nothing, false if it is not empty.
Returns whether this folder is the named folder. Note that if the named folder ID cannot be determined(because of an error from the Intelligence Server), this method will return false and log a warning.
folderName | An Enumeration in EnumDSSXMLFolderNames |
---|
WebObjectsException | This will not be thrown - this declaration is kept for backward compatibility. |
---|
Returns true if this folder is a read-only object, false if it is read/write.
Returns whether this object is the root folder. Note that if the ancestor information is not available for this object, or if this object is the root folder, a call to the Intelligence Server will be necessary.
WebObjectsException | Signals an inability to contact the Intelligence Server or to retrieve whether this is the root folder. |
---|
Returns the key of the given object, if it exists in the collection.
object | The WebObjectInfo object to search for in the folder. |
---|
IllegalArgumentException | Thrown if the object does not exist in the collection. |
---|
Returns a collection of Integers, which contains a non-repeating list of the types of
objects which are contained in this folder. The object types come from EnumDSSXMLObjectTypes
.
SimpleList
, containing the types of objects contained in the folder.
Returns the number of sub-folders in the current folder, within the blockBegin and blockCount constraints.
Removes the given object from the folder collection. Returns true if the operation succeeded.
object | The object to be removed from the collection. |
---|
IllegalArgumentException | Thrown if the given object is not found in the collection. |
---|---|
UnsupportedOperationException | Thrown if the folder object is read-only. |
Removes the object in the collection with the given index.
index | The index of the item to be removed. |
---|
IndexOutOfBoundsException | Thrown if the given index is out of the bounds of the collection. |
---|---|
UnsupportedOperationException | Thrown if the folder object is read-only. |
Removes the object in the collection with the given key.
key | The key into the collection of the item to be removed. |
---|
IllegalArgumentException | Thrown if the given key is not found in the collection. |
---|---|
UnsupportedOperationException | Thrown if the folder object is read-only. |
Sets the blockBegin setting, which is used for incremental fetch of folder contents. This value tells the index of the first object in the folder to be retrieved. This value is usually used in conjunction with blockCount.
blockBegin | The blockBegin setting to be used upon populating the folder from the Intelligence Server. |
---|
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.
blockCount | The blockCount setting to be used upon populating the folder from the Intelligence Server. |
---|
Sets whether Shorcuts objects are "dereferenced" in folder browsing requests. If 'true' then the Shorcut object is replaced with the object it refers to in the folder contents.
dereferenceShorcuts | Whether to dereference shortcut objects or not. |
---|
set a flag to indicate whether we're browsing a folder Set only to get 'non-schedulable' flag on objects
Sets the value of the level parameter. It is used upon populating the folder's contents. As of MicroStrategy 7.2, this has no effect.
level | The new level setting. |
---|
Read a QuickSearch flag returned in MetaDataSearch result xml node attribute and set to WebFolder object
Sets the style in which the display XML of the folder will be output.
style | The display style to use for the folder, which should be
a value from EnumWebFolderDisplayStyle . |
---|
Returns the number of objects in the folder.
Returns the number of sub-folders which exist in the current folder, regardless of blockCount.