public interface

WebFolder

implements WebObjectInfo
com.microstrategy.web.objects.WebFolder
Known Indirect Subclasses

Class Overview

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.

Summary

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
From interface com.microstrategy.utils.KeyedObject
From interface com.microstrategy.web.objects.WebDisplayUnit
From interface com.microstrategy.web.objects.WebFeatures
From interface com.microstrategy.web.objects.WebObjectInfo
From interface com.microstrategy.web.objects.WebPromptSite

Public Methods

public abstract int add (WebObjectInfo newObject)

Adds the given WebObjectInfo object to the folder collection.

Parameters
newObject An object which implements the WebObjectInfo interface.
Returns
  • The key into the folder of the added object.
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.

public abstract int add (WebObjectInfo newObject, int beforeKey)

Adds the given WebObjectInfo object to the folder collection.

Parameters
newObject An object which implements the WebObjectInfo interface.
beforeKey The key of an object which this object should be inserted before in the list.
Returns
  • The key into the folder of the added object.
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 int add (WebObjectInfo newObject, WebObjectInfo beforeObject)

Adds the given WebObjectInfo object to the folder collection.

Parameters
newObject An object which implements the WebObjectInfo interface.
beforeObject The object already in the folder to place the new object before.
Returns
  • The key into the folder of the added object.
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 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

public abstract void checkObjectVisibility (FolderBean fb)

Removes from the folder shortcuts whose target is not in the list of requested types.

public abstract void clear ()

Clears all objects from the folder collection.

Throws
UnsupportedOperationException Thrown if the folder object is marked as read-only.

public abstract boolean contains (WebObjectInfo 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 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 Enumeration elements ()

Returns a java.util.Enumeration object, which can be used to iterate through the folder. This Enumeration contains WebObjectInfo objects.

Returns
  • An Enumeration containing all the objects in the folder.

public abstract void filterShortcuts (int[] types)

Removes from the folder shortcuts whose target is not in the list of requested types.

Parameters
types a list of desirable types.

public 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. NOTE: If the intent is to populate the folder with only a certain set of object types, consider using getTypeRestrictions() before populating.

Parameters
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.
Returns
  • A WebFolder that contains all of the objects in the folder which are of one of the types passed in.

public abstract WebObjectInfo get (int index)

Returns the object in the collection with the given index.

Parameters
index The index into the collection of the desired item.
Returns
Throws
IndexOutOfBoundsException Thrown if the given index is out of the bounds of the collection.

public abstract int getBlockBegin ()

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 blockBegin setting.

public abstract int getBlockCount ()

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 current blockCount setting.

public abstract int getChildCount ()

Returns the child count, which is the total number of items in the collection.

Returns
  • The child count of the folder.

public abstract Tree<WebObjectInfo> getChildrenInTree ()

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.

Returns
  • A Tree to represent the search results with its browsing tree structure, or null.

public abstract boolean getDereferenceShorcuts ()

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
  • Whether a Shorcut object is replaced with its target object.

public abstract WebObjectFilter getFilter ()

public abstract int getFolderType ()

Returns the type of this folder, a value from EnumDSSXMLFolderType.

Returns
  • The type of the current folder, if available.

public abstract boolean getIsBrowsing ()

read a flag to indicate whether we're browsing a folder Set only to get 'non-schedulable' flag on objects

public abstract WebObjectInfo getItemByKey (int key)

Returns the object 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 getLevel ()

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.

Returns
  • The current level setting.
See Also

public abstract int getOriginalChildCount ()

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
  • The original child count of the folder.

public abstract int getQuickSearchFlag ()

Returns
  • Integer flag value either 0 or 1

public abstract WebFolder getRoot ()

Returns a folder object representing the root folder of the project.

Returns
  • A populated WebFolder object, representing the root folder of the hierarchy.
Throws
WebObjectsException Signals an error while trying to obtain the root folder.

public abstract int getStyle ()

Returns the style in which the display XML of the folder will be output.

Returns
See Also

public abstract SimpleList getTypeRestrictions ()

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.

Returns
  • A SimpleList containing the types of objects that can be included in the contents of the folder when it is populated by the Intelligence Server.

public abstract boolean isEmpty ()

Returns true if the folder object contains nothing, false if it is not empty.

Returns
  • Whether the folder is empty.

public abstract boolean isNamedFolder (int folderName)

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.

Parameters
folderName An Enumeration in EnumDSSXMLFolderNames
Returns
  • true if this folder the named folder, false otherwise.
Throws
WebObjectsException This will not be thrown - this declaration is kept for backward compatibility.

public abstract boolean isNonSchedulable ()

Returns
  • boolean flag indicates the trigger folder is Non-Schedulable.

public abstract boolean isReadOnly ()

Returns true if this folder is a read-only object, false if it is read/write.

Returns
  • The read-only status of this folder.

public abstract boolean isRoot ()

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.

Returns
  • True if this object is the root folder, false otherwise.
Throws
WebObjectsException Signals an inability to contact the Intelligence Server or to retrieve whether this is the root folder.

public abstract int keyOf (WebObjectInfo object)

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

Parameters
object The WebObjectInfo 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 SimpleList objectTypes ()

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.

Returns
  • A SimpleList, containing the types of objects contained in the folder.

public abstract int partialSubFolderCount ()

Returns the number of sub-folders in the current folder, within the blockBegin and blockCount constraints.

Returns
  • A count of the sub-folders of the current folder.

public abstract void remove (WebObjectInfo object)

Removes the given object from the folder collection. Returns true if the operation succeeded.

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

public abstract void remove (int index)

Removes the object in the collection with the given index.

Parameters
index The index of the item to be removed.
Throws
IndexOutOfBoundsException Thrown if the given index is out of the bounds of the collection.
UnsupportedOperationException Thrown if the folder object is read-only.

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 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.

Parameters
blockBegin The blockBegin setting to be used upon populating the folder from the Intelligence Server.
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 setDereferenceShortcuts (boolean dereferenceShorcuts)

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.

Parameters
dereferenceShorcuts Whether to dereference shortcut objects or not.

public abstract void setFilter (WebObjectFilter value)

public 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

public abstract void setLevel (int level)

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.

Parameters
level The new level setting.
See Also

public abstract void setQuickSearchFlag (int qsr)

Read a QuickSearch flag returned in MetaDataSearch result xml node attribute and set to WebFolder object

public abstract void setStyle (int style)

Sets the style in which the display XML of the folder will be output.

Parameters
style The display style to use for the folder, which should be a value from EnumWebFolderDisplayStyle.
See Also

public abstract int size ()

Returns the number of objects in the folder.

Returns
  • The number of objects in the folder collection.

public abstract int subFolderCount ()

Returns the number of sub-folders which exist in the current folder, regardless of blockCount.

Returns
  • A count of the sub-folders of the current folder.