Package com.microstrategy.web.objects
Interface WebSearch
-
- All Superinterfaces:
EnumWebPersistableState
,KeyedObject
,Persistable
,WebDisplayUnit
,WebFeatures
,WebObjectInfo
,WebPromptSite
- All Known Subinterfaces:
WebChangeJournalSearch
- All Known Implementing Classes:
WebChangeJournalSearchImpl
public interface WebSearch extends WebObjectInfo, Persistable
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.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
-
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableState
BARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebFolder
doSynchronousQuickSearch()
Do the Synchronous Quick SearchWebFolder
doSynchronousQuickSearch(boolean searchCluster)
Do the Synchronous Quick Searchjava.lang.String
getAbbreviationPattern()
Gets the abbreviation pattern that the Search object will search for.int
getAccessRights()
Returns the access rights of the object being searched for, that the search will be narrowed by.int
getBlockBegin()
Returns the blockBegin value for the objects that the search returns.int
getBlockCount()
Returns the blockCount value for the objects that the search returns.java.lang.String
getDescriptionPattern()
Returns the description pattern that the search is currently limited to.int
getDomain()
Returns the current domain for the search.int
getFirstObjectIndex()
Returns the index to begin searching from.int
getMaxObjects()
Returns the maximum number of objects the search is configured to return.int
getMaxWait()
Returns the maximum amount of time, in milliseconds, to wait for a search to finish in synchronous mode.java.lang.String
getNamePattern()
Returns the pattern to search for in the name of the objects in metadata.int
getPollingFrequency()
Returns the current polling frequency, in milliseconds.EnumDSSXMLQuickSearchCertifiedStatus
getQuickSearchCertifiedStatus()
Get the certified status criteria for the quick searchjava.util.List<java.lang.Integer>
getQuickSearchDocumentTypes()
Get a list of document types that the user wants to search for.EnumDSSXMLQuickSearchEnabledStatus
getQuickSearchEnabledStatus()
Get the user enabled status for quick search.EnumDSSXMLQuickSearchMode
getQuickSearchMode()
Get the search mode for quick search.EnumDSSXMLQuickSearchVisibility
getQuickSearchVisibility()
Get the include hidden mode to be used for the quick searchWebFolder
getResults()
Attempts to get the results of a search from the Intelligence Server.int
getScope()
Returns the current scope for the search.java.util.List<WebFolder>
getSearchExcludeRoots()
Returns the excluded folders for the searchjava.lang.String
getSearchFields()
Return current setting of Search Fieldsint
getSearchFlags()
Returns the currently set search flags.java.lang.String
getSearchID()
Returns the search ID of the last search submitted by this object, or the last time setSearchID was called.java.lang.String
getSearchOwner()
Returns the value of the search owner restriction on the search, if it is currently set.java.lang.String
getSearchRoot()
Returns the root folder ID that the search is limited to, if applicable.int
getSearchType()
Return current setting of Search Typeint
getStateClear()
Returns the object states that the search is prohibited from returning.int
getStateSet()
Returns the object states that the search will be limited to.int
getStatus()
Returns the status of the last getResults call which was made.java.lang.String
getTargetUserGroupId()
Get the search target group id.boolean
isAsync()
Returns whether getResults will be asynchronous.boolean
isGettingTreeInfo()
Gets the setting about whether the search result would include the browsing tree structure or not.boolean
isQuickSearch()
Gets the setting about whether the search should be handled by the new quick search engine.boolean
isSynchronousQuickSearch()
Gets the setting about whether the search should be handled by the Synchronous quick search engine.void
notUsedBy(int type)
The resulting objects of the search is NOT used by objects of the specified type (EnumDSSXMLObjectTypes
) or subtype (EnumDSSXMLObjectSubTypes
).void
notUses(int type)
The resulting objects of the search does NOT use the specified type (EnumDSSXMLObjectTypes
) or subtype (EnumDSSXMLObjectSubTypes
).void
purge()
Purges the search whose ID is set on this WebSearch object from the Intelligence Server's memory.void
reset()
Resets all member variables on this object, which causes a reset of the search criteria.void
setAbbreviationPattern(java.lang.String abbreviationPattern)
Sets the abbreviation pattern of objects that a search will return.void
setAccessRights(int accessRights)
This will set the access rights that the search results will be limited by.void
setAsync(boolean async)
Sets whether getResults will be asynchronous.void
setBlockBegin(int blockBegin)
Sets the blockBegin value for the objects that the search returns.void
setBlockCount(int blockCount)
Sets the blockCount value for the objects that the search returns.void
setCreatedModifiedByDate(java.lang.String beginTime, java.lang.String endTime)
Sets the created/modified by date range of the search criteria.void
setCreatedModifiedByDate(java.util.Date beginTime, java.util.Date endTime)
Sets the created/modified by date range of the search criteria.void
setCreatedModifiedByInterval(int timeInterval, int intervalUnit)
Sets the interval for the created/modified by time for the search.void
setDescriptionPattern(java.lang.String descriptionPattern)
Sets the description pattern that the search will be limited to.void
setDomain(int domain)
Sets the domain that the search will be limited to.void
setFirstObjectIndex(int firstObjectIndex)
Sets the index to begin searching from.void
setGettingTreeInfo(boolean gettingTreeInfo)
Sets the setting about whether the search result would include the browsing tree structure or not.void
setMaxObjects(int maxObjects)
Sets the maximum number of objects that the search will return.void
setMaxWait(int millis)
Sets the maximum amount of time, in milliseconds, to wait for a search to finish in synchronous mode.void
setNamePattern(java.lang.String namePattern)
Sets the pattern to search for in the name of the objects in metadata.void
setPollingFrequency(int millis)
Sets the current polling frequency, in milliseconds.void
setQuickSearch(boolean quickSearch)
Sets the setting about whether the search should be handled by the new quick search engine.void
setQuickSearchCertifiedStatus(EnumDSSXMLQuickSearchCertifiedStatus quickSearchCertifiedStatus)
Set the certified status criteria to be used for the quick searchvoid
setQuickSearchDocumentTypes(java.util.List<java.lang.Integer> types)
Set a list of document types that the user wants to search for.void
setQuickSearchEnabledStatus(EnumDSSXMLQuickSearchEnabledStatus userEnabledStatus)
Set the user enabled status for quick search.void
setQuickSearchMode(EnumDSSXMLQuickSearchMode quickSearchMode)
Set the search mode for quick search.void
setQuickSearchVisibility(EnumDSSXMLQuickSearchVisibility quickSearchVisibility)
Set the include hidden mode to be used for the quick searchvoid
setScope(int scope)
Sets the scope that the search will be limited to.void
setSearchFields(java.lang.String searchFields)
Sets the setting for the new quick search engine.void
setSearchFlags(int flags)
Sets the search flags for the search.void
setSearchID(java.lang.String searchID)
Sets the search ID, which will be used when getResults is called.void
setSearchOwner(java.lang.String searchOwner)
Sets the value of the owner restriction on the search.void
setSearchRoot(java.lang.String searchRoot)
Sets the root folder that the search will be limited to.void
setSearchType(int searchType)
Sets the setting for the new quick search engine.void
setStateClear(int stateClear)
Sets the object states that the search is prohibited from returning.void
setStateSet(int stateSet)
Sets the object states that should be returned in the search.void
setTargetUserGroupId(java.lang.String targetUserGroupId)
Set the search target group id.void
submit()
Submits the current state of this search object to the Intelligence Server.void
submit(java.lang.String searchXML)
Submits the given search XML to the Intelligence Server.SimpleList
types()
Returns aSimpleList
from which types can be added or removed.SimpleList
usedBy()
Returns aSimpleList
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).void
usedBy(int type)
The resulting objects of the search is used by objects of the specified type (EnumDSSXMLObjectTypes
) or subtype (EnumDSSXMLObjectSubTypes
).SimpleList
uses()
Returns aSimpleList
which can be used to add or remove objects which constrain the search to only return objects which use the given object(s).void
uses(int type)
The resulting objects of the search uses the specified type (EnumDSSXMLObjectTypes
) or subtype (EnumDSSXMLObjectSubTypes
).-
Methods inherited from interface com.microstrategy.utils.KeyedObject
_getObKey
-
Methods inherited from interface com.microstrategy.utils.serialization.Persistable
restoreState, restoreState, saveState, saveState, saveState, saveState
-
Methods inherited from interface com.microstrategy.web.objects.WebDisplayUnit
addDetails, applyVisitor, canHighlight, getChildUnits, getDisplayName, getDisplayUnitType, hasDetails, highlightUnit, highlightUnit, isHighlighted, isObjectInfo, isSelected, setDisplayName, setSelected
-
Methods inherited from interface com.microstrategy.web.objects.WebFeatures
isFeatureAvailable, isFeatureAvailable
-
Methods inherited from interface com.microstrategy.web.objects.WebObjectInfo
buildShortObjectAttributes, 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.WebPromptSite
getPromptInstances
-
-
-
-
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 inEnumDSSXMLAccessRightFlags
.- 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 fromEnumDSSXMLAccessRightFlags
.- 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()
-
getDomain
int getDomain()
Returns the current domain for the search. The domain tells the scope in which the search will be performed.The default domain is
EnumDSSXMLSearchDomain.DssXmlSearchDomainProject
.- Returns:
- An int corresponding to a value in
EnumDSSXMLSearchDomain
. - See Also:
setDomain(int)
-
setDomain
void setDomain(int domain)
Sets the domain that the search will be limited to. By default, the domain isEnumDSSXMLSearchDomain.DssXmlSearchDomainProject
.- Parameters:
domain
- The new value for the domain, coming from theEnumDSSXMLSearchDomain
enumeration.- See Also:
getDomain()
-
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 classEnumDSSXMLSearchFlags
.- 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 fromEnumDSSXMLObjectState
. 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 fromEnumDSSXMLObjectState
. 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 fromEnumDSSXMLObjectState
. 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 fromEnumDSSXMLObjectState
. 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 fromEnumDSSXMLSearchUnit
.
-
types
SimpleList types()
Returns aSimpleList
from which types can be added or removed. Note that theSimpleList
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 aSimpleList
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 theSimpleList
returned can only haveWebObjectInfo
objects added to it.- Returns:
- A
SimpleList
reflecting the used-by objects which will constrain the search.
-
usedBy
void usedBy(int type)
The resulting objects of the search is used by objects of the specified type (EnumDSSXMLObjectTypes
) or subtype (EnumDSSXMLObjectSubTypes
).- Parameters:
type
- specify type (EnumDSSXMLObjectTypes
) or subtype (EnumDSSXMLObjectSubTypes
).- Since:
- MicroStrategy Web 9.0.0
-
notUsedBy
void notUsedBy(int type)
The resulting objects of the search is NOT used by objects of the specified type (EnumDSSXMLObjectTypes
) or subtype (EnumDSSXMLObjectSubTypes
).- Parameters:
type
- specify type (EnumDSSXMLObjectTypes
) or subtype (EnumDSSXMLObjectSubTypes
).- Since:
- MicroStrategy Web 9.0.0
-
uses
SimpleList uses()
Returns aSimpleList
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 theSimpleList
returned can only haveWebObjectInfo
objects added to it.- Returns:
- A
SimpleList
reflecting the uses objects which will constrain the search.
-
uses
void uses(int type)
The resulting objects of the search uses the specified type (EnumDSSXMLObjectTypes
) or subtype (EnumDSSXMLObjectSubTypes
).- Parameters:
type
- specify type (EnumDSSXMLObjectTypes
) or subtype (EnumDSSXMLObjectSubTypes
).- Since:
- MicroStrategy Web 9.0.0
-
notUses
void notUses(int type)
The resulting objects of the search does NOT use the specified type (EnumDSSXMLObjectTypes
) or subtype (EnumDSSXMLObjectSubTypes
).- Parameters:
type
- specify type (EnumDSSXMLObjectTypes
) or subtype (EnumDSSXMLObjectSubTypes
).- Since:
- MicroStrategy Web 9.0.0
-
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.
-
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.
-
getScope
int getScope()
Returns the current scope for the search.The default scope is
EnumDSSXMLSearchScope.DssXmlSearchScopeRootedObjects
.- Returns:
- An int corresponding to a value in
EnumDSSXMLSearchScope
. - Since:
- MicroStrategy Web 8.1.2
- See Also:
setScope(int)
-
setScope
void setScope(int scope)
Sets the scope that the search will be limited to. By default, scope isEnumDSSXMLSearchScope.DssXmlSearchScopeRootedObjects
.- Parameters:
scope
- domain The new value for the scope, coming from theEnumDSSXMLSearchScope
enumeration.- Since:
- MicroStrategy Web 8.1.2
- See Also:
getScope()
-
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 inEnumDSSXMLSearchTypes
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
-
-
getQuickSearchCertifiedStatus
EnumDSSXMLQuickSearchCertifiedStatus getQuickSearchCertifiedStatus()
Get the certified status criteria for the quick search- Returns:
-
getQuickSearchDocumentTypes
java.util.List<java.lang.Integer> getQuickSearchDocumentTypes()
Get a list of document types that the user wants to search for. Document type please seeEnumDSSXMLViewMedia
- 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
-
-
getQuickSearchMode
EnumDSSXMLQuickSearchMode getQuickSearchMode()
Get the search mode for quick search. Only DEFAULT(0) and USER_MENTION(1) are supported. SeeEnumDSSXMLQuickSearchMode
.- Returns:
-
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). SeeEnumDSSXMLQuickSearchMode
.- 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
-
-
-