Interface WebFolder

    • Method Detail

      • getFolderType

        int getFolderType()
        Returns the type of this folder, a value from EnumDSSXMLFolderType.
        Returns:
        The type of the current folder, if available.
      • getRoot

        WebFolder 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.
      • getChildCount

        int getChildCount()
        Returns the child count, which is the total number of items in the collection.
        Returns:
        The child count of the folder.
      • getOriginalChildCount

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

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

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

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

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

        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.
        Since:
        MicroStrategy Web 8.0.2
      • setDereferenceShortcuts

        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.
        Since:
        MicroStrategy Web 8.0.2
      • getTypeRestrictions

        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.
        Since:
        MicroStrategy Web 8.0.2
        See Also:
        setDereferenceShortcuts(boolean)
      • getBlockBegin

        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.
        See Also:
        setBlockBegin(int)
      • setBlockBegin

        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:
        getBlockBegin()
      • getBlockCount

        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.
        See Also:
        setBlockCount(int)
      • setBlockCount

        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:
        getBlockCount()
      • getLevel

        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:
        setLevel(int)
      • setLevel

        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:
        getLevel()
      • isReadOnly

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

        int add​(WebObjectInfo newObject)
         throws java.lang.UnsupportedOperationException,
                java.lang.IllegalArgumentException
        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:
        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.
      • add

        int add​(WebObjectInfo newObject,
                int beforeKey)
         throws java.lang.UnsupportedOperationException,
                java.lang.IllegalArgumentException
        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:
        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..
      • add

        int add​(WebObjectInfo newObject,
                WebObjectInfo beforeObject)
         throws java.lang.UnsupportedOperationException,
                java.lang.IllegalArgumentException
        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:
        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..
      • get

        WebObjectInfo 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 WebObjectInfo object with the given index in the collection.
        Throws:
        java.lang.IndexOutOfBoundsException - Thrown if the given index is out of the bounds of the collection.
      • getItemByKey

        WebObjectInfo 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 WebObjectInfo object with the given key in the collection.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the given key is not found in the collection.
      • remove

        void remove​(int index)
             throws java.lang.UnsupportedOperationException,
                    java.lang.IndexOutOfBoundsException
        Removes 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.
      • removeItemByKey

        void removeItemByKey​(int key)
                      throws java.lang.UnsupportedOperationException,
                             java.lang.IllegalArgumentException
        Removes 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.
      • remove

        void 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.
      • clear

        void clear()
            throws java.lang.UnsupportedOperationException
        Clears all objects from the folder collection.
        Throws:
        java.lang.UnsupportedOperationException - Thrown if the folder object is marked as read-only.
      • isEmpty

        boolean isEmpty()
        Returns true if the folder object contains nothing, false if it is not empty.
        Returns:
        Whether the folder is empty.
      • size

        int size()
        Returns the number of objects in the folder.
        Returns:
        The number of objects in the folder collection.
      • containsKey

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

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

        int keyOf​(WebObjectInfo object)
           throws java.lang.IllegalArgumentException
        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:
        java.lang.IllegalArgumentException - Thrown if the object does not exist in the collection.
      • elements

        java.util.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.
      • isRoot

        boolean isRoot()
                throws WebObjectsException
        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.
      • isNamedFolder

        boolean isNamedFolder​(int folderName)
                       throws WebObjectsException
        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.
      • getStyle

        int 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)
      • setStyle

        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:
        getStyle()
      • setFilter

        void setFilter​(WebObjectFilter value)
        Since:
        MicroStrategy Web 9.0.0
      • getChildrenInTree

        Tree<WebObjectInfo> getChildrenInTree()
        Returns child units in a tree structure. Currently, when perform a search, and set its setting WebSearch.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.
      • setQuickSearchFlag

        void setQuickSearchFlag​(int qsr)
        Read a QuickSearch flag returned in MetaDataSearch result xml node attribute and set to WebFolder object
        Parameters:
        qsr -
      • getQuickSearchFlag

        int getQuickSearchFlag()
        Returns:
        Integer flag value either 0 or 1
      • isNonSchedulable

        boolean isNonSchedulable()
        Returns:
        boolean flag indicates the trigger folder is Non-Schedulable.
      • filterShortcuts

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

        void 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.
      • checkObjectVisibility

        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
        Parameters:
        types - a list of desirable types.
      • getIsBrowsing

        boolean getIsBrowsing()
        read a flag to indicate whether we're browsing a folder Set only to get 'non-schedulable' flag on objects
        Returns:
      • setIsBrowsing

        void setIsBrowsing​(boolean bf)
        set a flag to indicate whether we're browsing a folder Set only to get 'non-schedulable' flag on objects