Package com.microstrategy.web.objects
Interface WebFolder
- 
- All Superinterfaces:
- KeyedObject,- WebDisplayUnit,- WebFeatures,- WebObjectInfo,- WebPromptSite
 - All Known Implementing Classes:
- WebSyncRecommendationFolder,- WebSyncSearchFolder
 
 public interface WebFolder extends WebObjectInfo 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 forWebObjectsPrompt. This object cannot be directly instantiated, and must instead be obtained from interfaces such asWebObjectSourceorWebObjectsPrompt.- Since:
- MicroStrategy Web 7.3.1 or earlier
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description intadd(WebObjectInfo newObject)Adds the givenWebObjectInfoobject to the folder collection.intadd(WebObjectInfo newObject, int beforeKey)Adds the givenWebObjectInfoobject to the folder collection.intadd(WebObjectInfo newObject, WebObjectInfo beforeObject)Adds the givenWebObjectInfoobject to the folder collection.voidcheckObjectVisibility(FolderBean fb)Removes from the folder shortcuts whose target is not in the list of requested types.voidcheckObjectVisibility(FolderBean fb, boolean isSearch)Removes from the folder shortcuts whose target is not in the list of requested types.Some extra filtering for searchvoidclear()Clears all objects from the folder collection.booleancontains(WebObjectInfo object)Returns true if the folder contains the given object, false if it does not.booleancontainsKey(int key)Returns true if the folder contains an item by the given key, false if not.java.util.Enumerationelements()Returns a java.util.Enumeration object, which can be used to iterate through the folder.voidfilterShortcuts(int[] types)Removes from the folder shortcuts whose target is not in the list of requested types.WebFolderfindTypedObjects(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.WebObjectInfoget(int index)Returns the object in the collection with the given index.intgetBlockBegin()Returns the current blockBegin setting, which is used for incremental fetch of folder contents.intgetBlockCount()Returns the current blockCount setting, which is used for incremental fetch of folder contents.intgetChildCount()Returns the child count, which is the total number of items in the collection.Tree<WebObjectInfo>getChildrenInTree()Returns child units in a tree structure.booleangetDereferenceShorcuts()Returns whether Shortcut objects are "dereferenced" in folder browsing requests.WebObjectFiltergetFilter()intgetFolderType()Returns the type of this folder, a value fromEnumDSSXMLFolderType.booleangetIsBrowsing()read a flag to indicate whether we're browsing a folder Set only to get 'non-schedulable' flag on objectsWebObjectInfogetItemByKey(int key)Returns the object in the collection with the given key.intgetLevel()Returns the current value of the level parameter.intgetOriginalChildCount()In case some types of shortcuts objects will be filtered out from the objectCollection.intgetQuickSearchFlag()WebFoldergetRoot()Returns a folder object representing the root folder of the project.intgetStyle()Returns the style in which the display XML of the folder will be output.SimpleListgetTypeRestrictions()Returns a collection of Integers which represent the set of object types that can be contained in the folder.booleanisEmpty()Returns true if the folder object contains nothing, false if it is not empty.booleanisNamedFolder(int folderName)Returns whether this folder is the named folder.booleanisNonSchedulable()booleanisReadOnly()Returns true if this folder is a read-only object, false if it is read/write.booleanisRoot()Returns whether this object is the root folder.intkeyOf(WebObjectInfo object)Returns the key of the given object, if it exists in the collection.SimpleListobjectTypes()Returns a collection of Integers, which contains a non-repeating list of the types of objects which are contained in this folder.intpartialSubFolderCount()Returns the number of sub-folders in the current folder, within the blockBegin and blockCount constraints.voidremove(int index)Removes the object in the collection with the given index.voidremove(WebObjectInfo object)Removes the given object from the folder collection.voidremoveItemByKey(int key)Removes the object in the collection with the given key.voidsetBlockBegin(int blockBegin)Sets the blockBegin setting, which is used for incremental fetch of folder contents.voidsetBlockCount(int blockCount)Sets the blockCount setting, which is used for incremental fetch of folder contents.voidsetDereferenceShortcuts(boolean dereferenceShorcuts)Sets whether Shorcuts objects are "dereferenced" in folder browsing requests.voidsetFilter(WebObjectFilter value)voidsetIsBrowsing(boolean bf)set a flag to indicate whether we're browsing a folder Set only to get 'non-schedulable' flag on objectsvoidsetLevel(int level)Sets the value of the level parameter.voidsetQuickSearchFlag(int qsr)Read a QuickSearch flag returned in MetaDataSearch result xml node attribute and set to WebFolder objectvoidsetStyle(int style)Sets the style in which the display XML of the folder will be output.intsize()Returns the number of objects in the folder.intsubFolderCount()Returns the number of sub-folders which exist in the current folder, regardless of blockCount.- 
Methods inherited from interface com.microstrategy.utils.KeyedObject_getObKey
 - 
Methods inherited from interface com.microstrategy.web.objects.WebDisplayUnitaddDetails, applyVisitor, canHighlight, getChildUnits, getDisplayName, getDisplayUnitType, hasDetails, highlightUnit, highlightUnit, isHighlighted, isObjectInfo, isSelected, setDisplayName, setSelected
 - 
Methods inherited from interface com.microstrategy.web.objects.WebFeaturesisFeatureAvailable, isFeatureAvailable
 - 
Methods inherited from interface com.microstrategy.web.objects.WebObjectInfobuildShortObjectAttributes, buildShortXML, getAbbreviation, getAccessGranted, getAncestors, getCardStatus, getCertifiedInfo, getComments, getContainerDid, getContainerType, getCreationTime, getCreationTimeStamp, getDataSources, getDescription, getExtendedType, getFactory, getFlags, getIconPath, getID, getModificationTime, getModificationTimeStamp, getName, getNonSchedulable, getOtherNameTransCount, getOwner, getParent, getPreSaveAsFlags, getProjectId, getProjectName, getPropertyFlags, getPropertySetFilter, getPropertySets, getRecommendationInfo, getSecurity, getState, getSubType, getType, getVersionID, getViewMediaSettings, getVisualizationViewMode, getXML, getXML, hasOwner, isAncestorNamedFolder, isDirty, isEmbedded, isHidden, isNew, isPopulated, populate, populate, setAbbreviation, setComments, setDataSources, setDescription, setExtendedType, setFlags, setHidden, setIconPath, setName, setNonSchedulable, setPreSaveAsFlags, setPropertyFlags
 - 
Methods inherited from interface com.microstrategy.web.objects.WebPromptSitegetPromptInstances
 
- 
 
- 
- 
- 
Method Detail- 
getFolderTypeint getFolderType() Returns the type of this folder, a value fromEnumDSSXMLFolderType.- Returns:
- The type of the current folder, if available.
 
 - 
getRootWebFolder getRoot() throws WebObjectsException 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.
 
 - 
getChildCountint getChildCount() Returns the child count, which is the total number of items in the collection.- Returns:
- The child count of the folder.
 
 - 
getOriginalChildCountint 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.
 
 - 
subFolderCountint 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.
 
 - 
partialSubFolderCountint 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.
 
 - 
findTypedObjectsWebFolder 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 usinggetTypeRestrictions()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- EnumDSSXMLObjectTypesor- EnumDSSXMLObjectSubTypes.
- Returns:
- A WebFolderthat contains all of the objects in the folder which are of one of the types passed in.
 
 - 
objectTypesSimpleList 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 fromEnumDSSXMLObjectTypes.- Returns:
- A SimpleList, containing the types of objects contained in the folder.
 
 - 
getDereferenceShorcutsboolean 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.
- Since:
- MicroStrategy Web 8.0.2
 
 - 
setDereferenceShortcutsvoid 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.
- Since:
- MicroStrategy Web 8.0.2
 
 - 
getTypeRestrictionsSimpleList 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 SimpleListcontaining the types of objects that can be included in the contents of the folder when it is populated by the Intelligence Server.
- Since:
- MicroStrategy Web 8.0.2
- See Also:
- setDereferenceShortcuts(boolean)
 
 - 
getBlockBeginint 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.
- See Also:
- setBlockBegin(int)
 
 - 
setBlockBeginvoid 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:
- getBlockBegin()
 
 - 
getBlockCountint 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.
- 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()
 
 - 
getLevelint 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:
- setLevel(int)
 
 - 
setLevelvoid 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:
- getLevel()
 
 - 
isReadOnlyboolean 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.
 
 - 
addint add(WebObjectInfo newObject) throws java.lang.UnsupportedOperationException, java.lang.IllegalArgumentException Adds the givenWebObjectInfoobject to the folder collection.- Parameters:
- newObject- An object which implements the- WebObjectInfointerface.
- Returns:
- The key into the folder of the added object.
- 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.
 
 - 
addint add(WebObjectInfo newObject, int beforeKey) throws java.lang.UnsupportedOperationException, java.lang.IllegalArgumentException Adds the givenWebObjectInfoobject to the folder collection.- Parameters:
- newObject- An object which implements the- WebObjectInfointerface.
- 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:
- 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(WebObjectInfo newObject, WebObjectInfo beforeObject) throws java.lang.UnsupportedOperationException, java.lang.IllegalArgumentException Adds the givenWebObjectInfoobject to the folder collection.- Parameters:
- newObject- An object which implements the- WebObjectInfointerface.
- beforeObject- The object already in the folder to place the new object before.
- Returns:
- The key into the folder of the added object.
- 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..
 
 - 
getWebObjectInfo get(int index) throws java.lang.IndexOutOfBoundsException Returns the object in the collection with the given index.- Parameters:
- index- The index into the collection of the desired item.
- Returns:
- The WebObjectInfoobject with the given index in the collection.
- Throws:
- java.lang.IndexOutOfBoundsException- Thrown if the given index is out of the bounds of the collection.
 
 - 
getItemByKeyWebObjectInfo getItemByKey(int key) throws java.lang.IllegalArgumentException Returns the object 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.
 
 - 
removevoid remove(int index) throws java.lang.UnsupportedOperationException, java.lang.IndexOutOfBoundsExceptionRemoves the object in the collection with the given index.- Parameters:
- index- The index of the item to be removed.
- Throws:
- java.lang.IndexOutOfBoundsException- Thrown if the given index is out of the bounds of the collection.
- java.lang.UnsupportedOperationException- Thrown if the folder object is read-only.
 
 - 
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.
 
 - 
removevoid remove(WebObjectInfo object) throws java.lang.UnsupportedOperationException, java.lang.IllegalArgumentException 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:
- java.lang.IllegalArgumentException- Thrown if the given object 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 folder collection.- Throws:
- java.lang.UnsupportedOperationException- Thrown if the folder object is marked as read-only.
 
 - 
isEmptyboolean isEmpty() Returns true if the folder object contains nothing, false if it is not empty.- Returns:
- Whether the folder is empty.
 
 - 
sizeint size() Returns the number of objects in the folder.- Returns:
- The number of objects in the folder collection.
 
 - 
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.
 
 - 
containsboolean contains(WebObjectInfo 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.
 
 - 
keyOfint keyOf(WebObjectInfo object) throws java.lang.IllegalArgumentException Returns the key of the given object, if it exists in the collection.- Parameters:
- object- The- WebObjectInfoobject 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.
 
 - 
elementsjava.util.Enumeration elements() Returns a java.util.Enumeration object, which can be used to iterate through the folder. This Enumeration containsWebObjectInfoobjects.- Returns:
- An Enumeration containing all the objects in the folder.
 
 - 
isRootboolean isRoot() throws WebObjectsExceptionReturns 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.
 
 - 
isNamedFolderboolean isNamedFolder(int folderName) throws WebObjectsExceptionReturns 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.
 
 - 
getStyleint getStyle() Returns the style in which the display XML of the folder will be output.- Returns:
- The current display style of the folder, from EnumWebFolderDisplayStyle.
- See Also:
- setStyle(int)
 
 - 
setStylevoid 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:
- getStyle()
 
 - 
setFiltervoid setFilter(WebObjectFilter value) - Since:
- MicroStrategy Web 9.0.0
 
 - 
getFilterWebObjectFilter getFilter() - Since:
- MicroStrategy Web 9.0.0
 
 - 
getChildrenInTreeTree<WebObjectInfo> getChildrenInTree() Returns child units in a tree structure. Currently, when perform a search, and set its settingWebSearch.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 returnnull.- Returns:
- A Treeto represent the search results with its browsing tree structure, ornull.
 
 - 
setQuickSearchFlagvoid setQuickSearchFlag(int qsr) Read a QuickSearch flag returned in MetaDataSearch result xml node attribute and set to WebFolder object- Parameters:
- qsr-
 
 - 
getQuickSearchFlagint getQuickSearchFlag() - Returns:
- Integer flag value either 0 or 1
 
 - 
isNonSchedulableboolean isNonSchedulable() - Returns:
- boolean flag indicates the trigger folder is Non-Schedulable.
 
 - 
filterShortcutsvoid 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.
 
 - 
checkObjectVisibilityvoid checkObjectVisibility(FolderBean fb) Removes from the folder shortcuts whose target is not in the list of requested types.- Parameters:
- types- a list of desirable types.
 
 - 
checkObjectVisibilityvoid 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- Parameters:
- types- a list of desirable types.
 
 - 
getIsBrowsingboolean getIsBrowsing() read a flag to indicate whether we're browsing a folder Set only to get 'non-schedulable' flag on objects- Returns:
 
 - 
setIsBrowsingvoid setIsBrowsing(boolean bf) set a flag to indicate whether we're browsing a folder Set only to get 'non-schedulable' flag on objects
 
- 
 
-