Interface WebSearch

    • Method Detail

      • getAbbreviationPattern

        java.lang.String getAbbreviationPattern()
        Gets the abbreviation pattern that the Search object will search for. If this is an empty string, then the search will not be restricted on the objects' abbreviation pattern.
        Returns:
        The abbreviation pattern to search for.
        See Also:
        setAbbreviationPattern(java.lang.String)
      • setAbbreviationPattern

        void setAbbreviationPattern​(java.lang.String abbreviationPattern)
        Sets the abbreviation pattern of objects that a search will return.
        Parameters:
        abbreviationPattern - Abbreviation pattern to search for. An empty string will ensure that no filtering of the search results is done on the abbreviation pattern.
        See Also:
        getAbbreviationPattern()
      • getAccessRights

        int getAccessRights()
        Returns the access rights of the object being searched for, that the search will be narrowed by. This value corresponds to those in EnumDSSXMLAccessRightFlags.
        Returns:
        An int corresponding to the access rights that the search will be filtered on.
        See Also:
        setAccessRights(int)
      • setAccessRights

        void setAccessRights​(int accessRights)
        This will set the access rights that the search results will be limited by.
        Parameters:
        accessRights - The value to search for. This is the bitwise OR of values from EnumDSSXMLAccessRightFlags.
        See Also:
        getAccessRights()
      • getBlockBegin

        int getBlockBegin()
        Returns the blockBegin value for the objects that the search returns. This is used for incremental fetching of the search results, and tells which item in the search should be the first one of the subset of search results that is to be returned.

        The default value of blockBegin is 1, meaning return items starting with the first object found.

        Returns:
        The current setting for the first element to return from the search.
        See Also:
        setBlockBegin(int)
      • setBlockBegin

        void setBlockBegin​(int blockBegin)
        Sets the blockBegin value for the objects that the search returns. This is used for incremental fetching of the search results, and tells which item in the search should be the first one of the subset of search results that is to be returned.
        Parameters:
        blockBegin - The first element in the result list that should be returned from the search.
        See Also:
        getBlockBegin()
      • getBlockCount

        int getBlockCount()
        Returns the blockCount value for the objects that the search returns. This is used for incremental fetching of the search results, and tells how many items should be returned in the subset of search results that is to be returned.

        The default value of blockCount is -1, meaning return all items.

        Returns:
        The current setting for the number of elements, starting from the blockBegin element, to return from the search. This only affects the window of data that is returned by the search - it does not limit the actual number of results from the search.
        See Also:
        setBlockCount(int)
      • setBlockCount

        void setBlockCount​(int blockCount)
        Sets the blockCount value for the objects that the search returns. This is used for incremental fetching of the search results, and tells how many items should be returned in the subset of search results that is to be returned.
        Parameters:
        blockCount - The new setting to use for the number of elements, starting from the blockBegin element, to return from the search. This only affects the window of data that is returned by the search - it does not limit the actual number of results from the search.
        See Also:
        getBlockCount()
      • getDescriptionPattern

        java.lang.String getDescriptionPattern()
        Returns the description pattern that the search is currently limited to. An empty string denotes that the search will not be limited by the description of the objects.
        Returns:
        The current description pattern to search for.
        See Also:
        setDescriptionPattern(java.lang.String)
      • setDescriptionPattern

        void setDescriptionPattern​(java.lang.String descriptionPattern)
        Sets the description pattern that the search will be limited to. An empty string denotes that the search will not be limited by the description of the objects.
        Parameters:
        descriptionPattern - The description pattern to use in the search.
        See Also:
        getDescriptionPattern()
      • getSearchFlags

        int getSearchFlags()
        Returns the currently set search flags.

        The default value of the search flags is 0.

        Returns:
        A value corresponding to a bitwise OR from the enumeration class EnumDSSXMLSearchFlags.
        See Also:
        setSearchFlags(int)
      • setSearchFlags

        void setSearchFlags​(int flags)
        Sets the search flags for the search.
        Parameters:
        flags - A value corresponding to a bitwise OR from the enumeration class EnumDSSXMLSearchFlags.
        See Also:
        getSearchFlags()
      • getMaxObjects

        int getMaxObjects()
        Returns the maximum number of objects the search is configured to return. By default, this value is -1, meaning return all objects, but it can be changed by calling setMaxObjects.
        Returns:
        The maximum number of objects a search will return.
        See Also:
        setMaxObjects(int)
      • setMaxObjects

        void setMaxObjects​(int maxObjects)
        Sets the maximum number of objects that the search will return. Default is -1, meaning return all objects.
        Parameters:
        maxObjects - The maximum number of objects to return from the search.
        See Also:
        getMaxObjects()
      • getFirstObjectIndex

        int getFirstObjectIndex()
        Returns the index to begin searching from. By default, this value is 1, meaning search from beginning, but it can be changed by calling setFirstObjectIndex.
        Returns:
        The index to begin searching from.
        See Also:
        setFirstObjectIndex(int)
      • setFirstObjectIndex

        void setFirstObjectIndex​(int firstObjectIndex)
        Sets the index to begin searching from. Default is 1, meaning search from beginning.
        Parameters:
        firstObjectIndex - The index to begin searching from.
        See Also:
        getFirstObjectIndex()
      • getNamePattern

        java.lang.String getNamePattern()
        Returns the pattern to search for in the name of the objects in metadata.
        Returns:
        The name pattern that will be searched for.
        See Also:
        setNamePattern(java.lang.String)
      • setNamePattern

        void setNamePattern​(java.lang.String namePattern)
        Sets the pattern to search for in the name of the objects in metadata.
        Parameters:
        namePattern - The name pattern that will be searched for.
        See Also:
        getNamePattern()
      • getSearchOwner

        java.lang.String getSearchOwner()
        Returns the value of the search owner restriction on the search, if it is currently set.
        Returns:
        The user whose objects the search is limited to.
        See Also:
        setSearchOwner(java.lang.String)
      • setSearchOwner

        void setSearchOwner​(java.lang.String searchOwner)
        Sets the value of the owner restriction on the search.
        Parameters:
        searchOwner - The user whose objects the search is limited to.
        See Also:
        getSearchOwner()
      • getSearchRoot

        java.lang.String getSearchRoot()
        Returns the root folder ID that the search is limited to, if applicable.
        Returns:
        The folder ID that is to be used as the root of the search.
        See Also:
        setSearchRoot(java.lang.String)
      • setSearchRoot

        void setSearchRoot​(java.lang.String searchRoot)
        Sets the root folder that the search will be limited to. Requires an object ID corresponding to a folder.
        Parameters:
        searchRoot - The folder ID of a folder that will be used as the root of the search.
        See Also:
        getSearchRoot()
      • getStateClear

        int getStateClear()
        Returns the object states that the search is prohibited from returning. Value comes from the bitwise OR of values from EnumDSSXMLObjectState. The default value is 0.
        Returns:
        The current value for the clear states.
        See Also:
        setStateClear(int)
      • setStateClear

        void setStateClear​(int stateClear)
        Sets the object states that the search is prohibited from returning.
        Parameters:
        stateClear - An int corresponding to the bitwise OR of values from EnumDSSXMLObjectState. These states will not be in the search result set.
        See Also:
        getStateClear()
      • getStateSet

        int getStateSet()
        Returns the object states that the search will be limited to. Value comes from the bitwise OR of values from EnumDSSXMLObjectState. The default value is 0.
        Returns:
        The current value for the set states.
        See Also:
        setStateSet(int)
      • setStateSet

        void setStateSet​(int stateSet)
        Sets the object states that should be returned in the search.
        Parameters:
        stateSet - An int corresponding to the bitwise OR of values from EnumDSSXMLObjectState. Only objects with these states will be in the search result.
        See Also:
        getStateSet()
      • setCreatedModifiedByDate

        void setCreatedModifiedByDate​(java.lang.String beginTime,
                                      java.lang.String endTime)
                               throws java.lang.IllegalArgumentException
        Sets the created/modified by date range of the search criteria.
        Parameters:
        beginTime - A string representing the beginning date of the range.
        endTime - A string representing the ending date of the range.
        Throws:
        java.lang.IllegalArgumentException - Thrown if one of the arguments is null.
      • setCreatedModifiedByDate

        void setCreatedModifiedByDate​(java.util.Date beginTime,
                                      java.util.Date endTime)
                               throws java.lang.IllegalArgumentException
        Sets the created/modified by date range of the search criteria.
        Parameters:
        beginTime - A java.util.Date set to the beginning date of the range.
        endTime - A java.util.Date set to the ending date of the range.
        Throws:
        java.lang.IllegalArgumentException - Thrown if one of the arguments is null.
      • setCreatedModifiedByInterval

        void setCreatedModifiedByInterval​(int timeInterval,
                                          int intervalUnit)
        Sets the interval for the created/modified by time for the search. This interval is measured from the time of the search, and the intervalUnit determines what the time unit on timeInterval is.
        Parameters:
        timeInterval - The number of intervalUnits from the time of the search to filter the search results with.
        intervalUnit - The unit to use for the search. Comes from EnumDSSXMLSearchUnit.
      • types

        SimpleList types()
        Returns a SimpleList from which types can be added or removed. Note that the SimpleList returned can only have java.lang.Integer objects added to it.
        Returns:
        A SimpleList reflecting the types of objects which will be searched for.
      • usedBy

        SimpleList usedBy()
        Returns a SimpleList which can be used to add or remove objects which constrain the search to only return objects which are used by the given object(s). Note that the SimpleList returned can only have WebObjectInfo objects added to it.
        Returns:
        A SimpleList reflecting the used-by objects which will constrain the search.
      • uses

        SimpleList uses()
        Returns a SimpleList which can be used to add or remove objects which constrain the search to only return objects which use the given object(s). Note that the SimpleList returned can only have WebObjectInfo objects added to it.
        Returns:
        A SimpleList reflecting the uses objects which will constrain the search.
      • doSynchronousQuickSearch

        WebFolder doSynchronousQuickSearch()
                                    throws WebObjectsException
        Do the Synchronous Quick Search
        Returns:
        A folder object representing the folder returned from the search, or null if the search is not yet ready.
        Throws:
        WebObjectsException - Thrown if the search could not be submitted to the Intelligence Server.
      • doSynchronousQuickSearch

        WebFolder doSynchronousQuickSearch​(boolean searchCluster)
                                    throws WebObjectsException
        Do the Synchronous Quick Search
        Parameters:
        searchCluster - , if passing searchCluster as true, the entire cluster will be searched
        Returns:
        A folder object representing the folder returned from the search, or null if the search is not yet ready.
        Throws:
        WebObjectsException - Thrown if the search could not be submitted to the Intelligence Server.
      • doSynchronousQuickSearch

        WebFolder doSynchronousQuickSearch​(boolean searchCluster,
                                           java.util.List<java.lang.String> projectIds)
                                    throws WebObjectsException
        Do the Synchronous Quick Search
        Parameters:
        searchCluster - if passing searchCluster as true, the entire cluster will be searched
        projectIds - specifying the projects where the search will be performed. And searchCluster will be ignored if the project ids are specified.
        Returns:
        A folder object representing the folder returned from the search, or null if the search is not yet ready.
        Throws:
        WebObjectsException - Thrown if the search could not be submitted to the Intelligence Server.
      • submit

        void submit()
             throws WebObjectsException
        Submits the current state of this search object to the Intelligence Server. This will cause the search ID to be set to the search ID which results from this submission.
        Throws:
        WebObjectsException - Thrown if the search could not be submitted to the Intelligence Server.
      • submit

        void submit​(java.lang.String searchXML)
             throws WebObjectsException
        Submits the given search XML to the Intelligence Server. This will cause the search ID to be set to the search ID which results from this submission.
        Parameters:
        searchXML - The search XML to be sent to the Intelligence Server. This overrides all properties on this WebSearch object.
        Throws:
        WebObjectsException - Thrown if the search could not be submitted to the Intelligence Server.
      • getStatus

        int getStatus()
        Returns the status of the last getResults call which was made.
        Returns:
        The status of the search, a value from EnumDSSXMLObjectSearchStatus.
      • getSearchID

        java.lang.String getSearchID()
        Returns the search ID of the last search submitted by this object, or the last time setSearchID was called.
        Returns:
        The currently active search ID.
        See Also:
        setSearchID(java.lang.String)
      • setSearchID

        void setSearchID​(java.lang.String searchID)
        Sets the search ID, which will be used when getResults is called.
        Parameters:
        searchID - The search ID of a search which is executing or has results waiting on the Intelligence Server.
        See Also:
        getSearchID()
      • isAsync

        boolean isAsync()
        Returns whether getResults will be asynchronous. If this is true, then getResults will poll the Intelligence Server once, and return, storing the status in the status property variable (obtainable via getStatus). If this is false, then the API will poll the Intelligence Server, using the polling frequency set by setPollingFrequency, and return only when either the result of the search is available or the max wait time (which can be set by setMaxWait) has been reached, at which point it will return without a result.
        Returns:
        True if this object is asynchronous, false otherwise.
        See Also:
        setAsync(boolean)
      • setAsync

        void setAsync​(boolean async)
        Sets whether getResults will be asynchronous. If this is true, then getResults will poll the Intelligence Server once, and return, storing the status in the status property variable (obtainable via getStatus). If this is false, then the API will poll the Intelligence Server, using the polling frequency set by setPollingFrequency, and return only when either the result of the search is available or the max wait time (which can be set by setMaxWait) has been reached, at which point it will return without a result.
        Parameters:
        async - The desired setting of [a]synchronous operation.
        See Also:
        isAsync()
      • getMaxWait

        int getMaxWait()
        Returns the maximum amount of time, in milliseconds, to wait for a search to finish in synchronous mode.
        Returns:
        The maximum wait time, in milliseconds. If this value is -1, then getResults will not return unless the search finishes or an error is detected.
        See Also:
        setMaxWait(int)
      • setMaxWait

        void setMaxWait​(int millis)
        Sets the maximum amount of time, in milliseconds, to wait for a search to finish in synchronous mode.
        Parameters:
        millis - The maximum wait time, in milliseconds. If this value is -1, then getResults will not return unless the search finishes or an error is detected.
        See Also:
        getMaxWait()
      • getPollingFrequency

        int getPollingFrequency()
        Returns the current polling frequency, in milliseconds. This determines, in synchronous mode, how often the API will poll the Intelligence Server upon calling getResults.
        Returns:
        The current polling frequency, in milliseconds.
        See Also:
        setPollingFrequency(int)
      • setPollingFrequency

        void setPollingFrequency​(int millis)
        Sets the current polling frequency, in milliseconds. This determines, in synchronous mode, how often the API will poll the Intelligence Server upon calling getResults.
        Parameters:
        millis - The desired polling frequency, in milliseconds.
        See Also:
        getPollingFrequency()
      • getResults

        WebFolder getResults()
                      throws WebObjectsException
        Attempts to get the results of a search from the Intelligence Server. The search ID used will be the one set on this WebSearch object. If the asynchronous setting is true, then this method will return null and set the status variable if the report is not ready. If asynchronous is false, then this method will poll the Intelligence Server, subject to the parameters maxWait and pollingFrequency.
        Returns:
        A folder object representing the folder returned from the search, or null if the search is not yet ready.
        Throws:
        WebObjectsException - Signals an error in the execution or retrieval of results of the search.
      • purge

        void purge()
            throws WebObjectsException
        Purges the search whose ID is set on this WebSearch object from the Intelligence Server's memory. This will free up resources dedicated to the given search.
        Throws:
        WebObjectsException - Signals an error in purging the search.
      • reset

        void reset()
        Resets all member variables on this object, which causes a reset of the search criteria.
      • getSearchExcludeRoots

        java.util.List<WebFolder> getSearchExcludeRoots()
        Returns the excluded folders for the search
        Since:
        MicroStrategy Web 9.0.1
      • isGettingTreeInfo

        boolean isGettingTreeInfo()
        Gets the setting about whether the search result would include the browsing tree structure or not.
        Returns:
        setting about whether the search result would include the browsing tree structure or not.
      • setGettingTreeInfo

        void setGettingTreeInfo​(boolean gettingTreeInfo)
        Sets the setting about whether the search result would include the browsing tree structure or not. When this sets it to true, user would be able to retrieve the search result in a tree structure by calling getChildrenInTree() on the return value from getResults() from this interface.
        Parameters:
        gettingTreeInfo -
      • isQuickSearch

        boolean isQuickSearch()
        Gets the setting about whether the search should be handled by the new quick search engine.
        Returns:
        setting about whether the search should be handled by the new quick search engine.
      • setQuickSearch

        void setQuickSearch​(boolean quickSearch)
        Sets the setting about whether the search should be handled by the new quick search engine. When this sets it to true, the search will be handled by the new quick search engine.
        Parameters:
        quickSearch -
      • setSearchType

        void setSearchType​(int searchType)
        Sets the setting for the new quick search engine. Search Types are defined in EnumDSSXMLSearchTypes When this is not set, search reqeust will be redirected to old searc engine.
        Parameters:
        searchType -
      • getSearchType

        int getSearchType()
        Return current setting of Search Type
        Returns:
        int A value in EnumDSSXMLSearchTypes.
      • setSearchFields

        void setSearchFields​(java.lang.String searchFields)
        Sets the setting for the new quick search engine. Search Fields are combination of "name", "description" and "comment" separated by ",". When this is not set, search request will ask engine to use its default value - - Begin With - "name" - Exactly - "name" - Contains Any Word - "name,description,comment"
        Parameters:
        searchFields -
      • getSearchFields

        java.lang.String getSearchFields()
        Return current setting of Search Fields
        Returns:
        String
      • isSynchronousQuickSearch

        boolean isSynchronousQuickSearch()
        Gets the setting about whether the search should be handled by the Synchronous quick search engine.
        Returns:
        setting about whether the search should be handled by the Synchronous quick search engine.
      • setQuickSearchVisibility

        void setQuickSearchVisibility​(EnumDSSXMLQuickSearchVisibility quickSearchVisibility)
        Set the include hidden mode to be used for the quick search
        Parameters:
        quickSearchVisibility -
      • getQuickSearchVisibility

        EnumDSSXMLQuickSearchVisibility getQuickSearchVisibility()
        Get the include hidden mode to be used for the quick search
        Returns:
      • setQuickSearchCertifiedStatus

        void setQuickSearchCertifiedStatus​(EnumDSSXMLQuickSearchCertifiedStatus quickSearchCertifiedStatus)
        Set the certified status criteria to be used for the quick search
        Parameters:
        quickSearchCertifiedStatus -
      • setDossierTemplate

        void setDossierTemplate​(boolean template)
      • isDossierTemplate

        boolean isDossierTemplate()
      • getQuickSearchDocumentTypes

        java.util.List<java.lang.Integer> getQuickSearchDocumentTypes()
        Get a list of document types that the user wants to search for. Document type please see EnumDSSXMLViewMedia
        Returns:
      • setQuickSearchDocumentTypes

        void setQuickSearchDocumentTypes​(java.util.List<java.lang.Integer> types)
        Set a list of document types that the user wants to search for. Passing a empty list, all document types will be returned.
        Parameters:
        types -
      • getQuickSearchEnabledStatus

        EnumDSSXMLQuickSearchEnabledStatus getQuickSearchEnabledStatus()
        Get the user enabled status for quick search. Right now, only ENABLED_ONLY and ALL are supported.
        Returns:
      • setQuickSearchEnabledStatus

        void setQuickSearchEnabledStatus​(EnumDSSXMLQuickSearchEnabledStatus userEnabledStatus)
        Set the user enabled status for quick search. By setting this field, the user can specify if they want to retrieve all the users matching either full name, username or email
        Parameters:
        userEnabledStatus -
      • setQuickSearchMode

        void setQuickSearchMode​(EnumDSSXMLQuickSearchMode quickSearchMode)
        Set the search mode for quick search. Only DEFAULT(0) and USER_MENTION(1) are supported. DEFAULT will be used if this field was set with search mode other than DEFAULT(0) and USER_MENTION(1). See EnumDSSXMLQuickSearchMode.
        Parameters:
        quickSearchMode -
      • getTargetUserGroupId

        java.lang.String getTargetUserGroupId()
        Get the search target group id.
        Returns:
        The search target group id.
      • setTargetUserGroupId

        void setTargetUserGroupId​(java.lang.String targetUserGroupId)
        Set the search target group id. By setting this field, it can specify the search result users if they are under this target group.
        Parameters:
        targetUserGroupId -