com.microstrategy.web.objects.WebSearch |
![]() |
The WebSearch class represents a search object, either in metadata or created on the fly. It allows the user to modify search properties of both new searches and searches which are saved in the metadata, and submit searches to the Intelligence Server.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract WebFolder |
doSynchronousQuickSearch()
Do the Synchronous Quick Search
| ||||||||||
abstract String |
getAbbreviationPattern()
Gets the abbreviation pattern that the Search object will search for.
| ||||||||||
abstract int |
getAccessRights()
Returns the access rights of the object being searched for, that the search will be narrowed by.
| ||||||||||
abstract int |
getBlockBegin()
Returns the blockBegin value for the objects that the search returns.
| ||||||||||
abstract int |
getBlockCount()
Returns the blockCount value for the objects that the search returns.
| ||||||||||
abstract String |
getDescriptionPattern()
Returns the description pattern that the search is currently limited to.
| ||||||||||
abstract int |
getDomain()
Returns the current domain for the search.
| ||||||||||
abstract int |
getFirstObjectIndex()
Returns the index to begin searching from.
| ||||||||||
abstract int |
getMaxObjects()
Returns the maximum number of objects the search is configured to return.
| ||||||||||
abstract int |
getMaxWait()
Returns the maximum amount of time, in milliseconds, to wait for a search to finish in synchronous mode.
| ||||||||||
abstract String |
getNamePattern()
Returns the pattern to search for in the name of the objects in metadata.
| ||||||||||
abstract int |
getPollingFrequency()
Returns the current polling frequency, in milliseconds.
| ||||||||||
abstract WebFolder |
getResults()
Attempts to get the results of a search from the Intelligence Server.
| ||||||||||
abstract int |
getScope()
Returns the current scope for the search.
| ||||||||||
abstract List<WebFolder> |
getSearchExcludeRoots()
Returns the excluded folders for the search
| ||||||||||
abstract String |
getSearchFields()
Return current setting of Search Fields
| ||||||||||
abstract int |
getSearchFlags()
Returns the currently set search flags.
| ||||||||||
abstract String |
getSearchID()
Returns the search ID of the last search submitted by this object, or the last time
setSearchID was called.
| ||||||||||
abstract String |
getSearchOwner()
Returns the value of the search owner restriction on the search, if it is currently set.
| ||||||||||
abstract String |
getSearchRoot()
Returns the root folder ID that the search is limited to, if applicable.
| ||||||||||
abstract int |
getSearchType()
Return current setting of Search Type
| ||||||||||
abstract int |
getStateClear()
Returns the object states that the search is prohibited from returning.
| ||||||||||
abstract int |
getStateSet()
Returns the object states that the search will be limited to.
| ||||||||||
abstract int |
getStatus()
Returns the status of the last getResults call which was made.
| ||||||||||
abstract boolean |
isAsync()
Returns whether getResults will be asynchronous.
| ||||||||||
abstract boolean |
isGettingTreeInfo()
Gets the setting about whether the search result would include the browsing tree structure or not.
| ||||||||||
abstract boolean |
isQuickSearch()
Gets the setting about whether the search should be handled by the new quick search engine.
| ||||||||||
abstract boolean |
isSynchronousQuickSearch()
Gets the setting about whether the search should be handled by the Synchronous quick search engine.
| ||||||||||
abstract void |
notUsedBy(int type)
The resulting objects of the search is NOT used by objects of the specified
type (
EnumDSSXMLObjectTypes ) or subtype (EnumDSSXMLObjectSubTypes ). | ||||||||||
abstract void |
notUses(int type)
The resulting objects of the search does NOT use the specified type (
EnumDSSXMLObjectTypes )
or subtype (EnumDSSXMLObjectSubTypes ). | ||||||||||
abstract void |
purge()
Purges the search whose ID is set on this WebSearch object from the Intelligence
Server's memory.
| ||||||||||
abstract void |
reset()
Resets all member variables on this object, which causes a reset of the search criteria.
| ||||||||||
abstract void |
setAbbreviationPattern(String abbreviationPattern)
Sets the abbreviation pattern of objects that a search will return.
| ||||||||||
abstract void |
setAccessRights(int accessRights)
This will set the access rights that the search results will be limited by.
| ||||||||||
abstract void |
setAsync(boolean async)
Sets whether getResults will be asynchronous.
| ||||||||||
abstract void |
setBlockBegin(int blockBegin)
Sets the blockBegin value for the objects that the search returns.
| ||||||||||
abstract void |
setBlockCount(int blockCount)
Sets the blockCount value for the objects that the search returns.
| ||||||||||
abstract void |
setCreatedModifiedByDate(Date beginTime, Date endTime)
Sets the created/modified by date range of the search criteria.
| ||||||||||
abstract void |
setCreatedModifiedByDate(String beginTime, String endTime)
Sets the created/modified by date range of the search criteria.
| ||||||||||
abstract void |
setCreatedModifiedByInterval(int timeInterval, int intervalUnit)
Sets the interval for the created/modified by time for the search.
| ||||||||||
abstract void |
setDescriptionPattern(String descriptionPattern)
Sets the description pattern that the search will be limited to.
| ||||||||||
abstract void |
setDomain(int domain)
Sets the domain that the search will be limited to.
| ||||||||||
abstract void |
setFirstObjectIndex(int firstObjectIndex)
Sets the index to begin searching from.
| ||||||||||
abstract void |
setGettingTreeInfo(boolean gettingTreeInfo)
Sets the setting about whether the search result would include the browsing tree structure or not.
| ||||||||||
abstract void |
setMaxObjects(int maxObjects)
Sets the maximum number of objects that the search will return.
| ||||||||||
abstract void |
setMaxWait(int millis)
Sets the maximum amount of time, in milliseconds, to wait for a search to finish in synchronous mode.
| ||||||||||
abstract void |
setNamePattern(String namePattern)
Sets the pattern to search for in the name of the objects in metadata.
| ||||||||||
abstract void |
setPollingFrequency(int millis)
Sets the current polling frequency, in milliseconds.
| ||||||||||
abstract void |
setQuickSearch(boolean quickSearch)
Sets the setting about whether the search should be handled by the new quick search engine.
| ||||||||||
abstract void |
setScope(int scope)
Sets the scope that the search will be limited to.
| ||||||||||
abstract void |
setSearchFields(String searchFields)
Sets the setting for the new quick search engine.
| ||||||||||
abstract void |
setSearchFlags(int flags)
Sets the search flags for the search.
| ||||||||||
abstract void |
setSearchID(String searchID)
Sets the search ID, which will be used when getResults is called.
| ||||||||||
abstract void |
setSearchOwner(String searchOwner)
Sets the value of the owner restriction on the search.
| ||||||||||
abstract void |
setSearchRoot(String searchRoot)
Sets the root folder that the search will be limited to.
| ||||||||||
abstract void |
setSearchType(int searchType)
Sets the setting for the new quick search engine.
| ||||||||||
abstract void |
setStateClear(int stateClear)
Sets the object states that the search is prohibited from returning.
| ||||||||||
abstract void |
setStateSet(int stateSet)
Sets the object states that should be returned in the search.
| ||||||||||
abstract void |
submit()
Submits the current state of this search object to the Intelligence Server.
| ||||||||||
abstract void |
submit(String searchXML)
Submits the given search XML to the Intelligence Server.
| ||||||||||
abstract SimpleList |
types()
Returns a
SimpleList from which types can be added or removed. | ||||||||||
abstract void |
usedBy(int type)
The resulting objects of the search is used by objects of the specified
type (
EnumDSSXMLObjectTypes ) or subtype (EnumDSSXMLObjectSubTypes ). | ||||||||||
abstract 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). | ||||||||||
abstract 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). | ||||||||||
abstract void |
uses(int type)
The resulting objects of the search uses the specified type (
EnumDSSXMLObjectTypes )
or subtype (EnumDSSXMLObjectSubTypes ). |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Do the Synchronous Quick Search
WebObjectsException | Thrown if the search could not be submitted to the Intelligence Server. |
---|
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 access rights of the object being searched for, that the search will be narrowed by. This value
corresponds to those in EnumDSSXMLAccessRightFlags
.
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 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 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 domain for the search. The domain tells the scope in which the search will be performed.
The default domain is DssXmlSearchDomainProject
.
EnumDSSXMLSearchDomain
.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 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 amount of time, in milliseconds, to wait for a search to finish in synchronous mode.
Returns the pattern to search for in the name of the objects in metadata.
Returns the current polling frequency, in milliseconds. This determines, in synchronous mode, how often the API will poll the Intelligence Server upon calling getResults.
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.
WebObjectsException | Signals an error in the execution or retrieval of results of the search. |
---|
Returns the current scope for the search.
The default scope is DssXmlSearchScopeRootedObjects
.
EnumDSSXMLSearchScope
.Returns the excluded folders for the search
Return current setting of Search Fields
Returns the currently set search flags.
The default value of the search flags is 0.
EnumDSSXMLSearchFlags
.Returns the search ID of the last search submitted by this object, or the last time setSearchID was called.
Returns the value of the search owner restriction on the search, if it is currently set.
Returns the root folder ID that the search is limited to, if applicable.
Return current setting of Search Type
EnumDSSXMLSearchTypes
.
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 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 status of the last getResults call which was made.
EnumDSSXMLObjectSearchStatus
.
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.
Gets the setting about whether the search result would include the browsing tree structure or not.
Gets the setting about whether the search should be handled by the new quick search engine.
Gets the setting about whether the search should be handled by the Synchronous quick search engine.
The resulting objects of the search is NOT used by objects of the specified
type (EnumDSSXMLObjectTypes
) or subtype (EnumDSSXMLObjectSubTypes
).
type | specify type (EnumDSSXMLObjectTypes ) or subtype (EnumDSSXMLObjectSubTypes ). |
---|
The resulting objects of the search does NOT use the specified type (EnumDSSXMLObjectTypes
)
or subtype (EnumDSSXMLObjectSubTypes
).
type | specify type (EnumDSSXMLObjectTypes ) or subtype (EnumDSSXMLObjectSubTypes ). |
---|
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.
WebObjectsException | Signals an error in purging the search. |
---|
Resets all member variables on this object, which causes a reset of the search criteria.
Sets the abbreviation pattern of objects that a search will return.
abbreviationPattern | Abbreviation pattern to search for. An empty string will ensure that no filtering of the search results is done on the abbreviation pattern. |
---|
This will set the access rights that the search results will be limited by.
accessRights | The value to search for. This is the bitwise OR of values from EnumDSSXMLAccessRightFlags . |
---|
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.
async | The desired setting of [a]synchronous operation. |
---|
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.
blockBegin | The first element in the result list that should be returned from the search. |
---|
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.
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. |
---|
Sets the created/modified by date range of the search criteria.
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. |
IllegalArgumentException | Thrown if one of the arguments is null. |
---|
Sets the created/modified by date range of the search criteria.
beginTime | A string representing the beginning date of the range. |
---|---|
endTime | A string representing the ending date of the range. |
IllegalArgumentException | Thrown if one of the arguments is null. |
---|
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.
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 .
|
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.
descriptionPattern | The description pattern to use in the search. |
---|
Sets the domain that the search will be limited to. By default, the domain is DssXmlSearchDomainProject
.
domain | The new value for the domain, coming from the EnumDSSXMLSearchDomain enumeration. |
---|
Sets the index to begin searching from. Default is 1, meaning search from beginning.
firstObjectIndex | The index to begin searching from. |
---|
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.
Sets the maximum number of objects that the search will return. Default is -1, meaning return all objects.
maxObjects | The maximum number of objects to return from the search. |
---|
Sets the maximum amount of time, in milliseconds, to wait for a search to finish in synchronous mode.
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. |
---|
Sets the pattern to search for in the name of the objects in metadata.
namePattern | The name pattern that will be searched for. |
---|
Sets the current polling frequency, in milliseconds. This determines, in synchronous mode, how often the API will poll the Intelligence Server upon calling getResults.
millis | The desired polling frequency, in milliseconds. |
---|
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.
Sets the scope that the search will be limited to. By default, scope is DssXmlSearchScopeRootedObjects
.
scope | domain The new value for the scope, coming from the EnumDSSXMLSearchScope enumeration. |
---|
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"
Sets the search flags for the search.
flags | A value corresponding to a bitwise OR from the enumeration class EnumDSSXMLSearchFlags . |
---|
Sets the search ID, which will be used when getResults is called.
searchID | The search ID of a search which is executing or has results waiting on the Intelligence Server. |
---|
Sets the value of the owner restriction on the search.
searchOwner | The user whose objects the search is limited to. |
---|
Sets the root folder that the search will be limited to. Requires an object ID corresponding to a folder.
searchRoot | The folder ID of a folder that will be used as the root of the search. |
---|
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.
Sets the object states that the search is prohibited from returning.
stateClear | An int corresponding to the bitwise OR of values from EnumDSSXMLObjectState .
These states will not be in the search result set. |
---|
Sets the object states that should be returned in the search.
stateSet | An int corresponding to the bitwise OR of values from EnumDSSXMLObjectState .
Only objects with these states will be in the search result. |
---|
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.
WebObjectsException | Thrown if the search could not be submitted to the Intelligence Server. |
---|
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.
searchXML | The search XML to be sent to the Intelligence Server. This overrides all properties on this WebSearch object. |
---|
WebObjectsException | Thrown if the search could not be submitted to the Intelligence Server. |
---|
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.
SimpleList
reflecting the types of objects which will be searched for.
The resulting objects of the search is used by objects of the specified
type (EnumDSSXMLObjectTypes
) or subtype (EnumDSSXMLObjectSubTypes
).
type | specify type (EnumDSSXMLObjectTypes ) or subtype (EnumDSSXMLObjectSubTypes ). |
---|
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.
SimpleList
reflecting the used-by objects which will constrain the
search.
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.
SimpleList
reflecting the uses objects which will constrain the
search.
The resulting objects of the search uses the specified type (EnumDSSXMLObjectTypes
)
or subtype (EnumDSSXMLObjectSubTypes
).
type | specify type (EnumDSSXMLObjectTypes ) or subtype (EnumDSSXMLObjectSubTypes ). |
---|