Package com.microstrategy.web.app.beans
Interface SearchBean
-
- All Superinterfaces:
AppComponent
,EnumWebPersistableState
,Persistable
,RequestPersistable
,Transformable
,WebComponent
public interface SearchBean extends AppComponent, RequestPersistable
This bean is used to render and save the state of searches. It heavily relies on the FolderBean, so please make sure it has a FolderBean as a children.
It uses aSearchSimpleTransform
to generate its output.
It handles it request by searching for the Folder Search Event, and if found it changes its state to the values in the request.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
Fields Modifier and Type Field Description static int
DATE_ALL_DATES
static int
DATE_BETWEEN_DATES
static int
DATE_BETWEEN_INTERVAL
static int
DATE_CREATED
static int
DATE_DAYS
static int
DATE_HOURS
static int
DATE_MODIFIED
static int
DATE_MONTHS
static int
DATE_SPECIFIC_DATE
static int
DATE_WEEKS
static int
DATE_YEARS
static java.lang.String
FIELD_DATE_CREATED
static java.lang.String
FIELD_DATE_SUBTYPE
static java.lang.String
FIELD_DATE_TYPE
static java.lang.String
FIELD_DESCRIPTION
static java.lang.String
FIELD_END_DATE
static java.lang.String
FIELD_FOLDER_ID
static java.lang.String
FIELD_FOLDER_TYPE
static java.lang.String
FIELD_ID
static java.lang.String
FIELD_INTERVAL_UNIT
static java.lang.String
FIELD_INTERVAL_VALUE
static java.lang.String
FIELD_NAME
static java.lang.String
FIELD_OWNER_TYPE
static java.lang.String
FIELD_SEARCH_OPTIONS
static java.lang.String
FIELD_START_DATE
static java.lang.String
FIELD_TYPES
static java.lang.String
FIELD_WILDCARDS
static int
OWNER_ALL
static int
OWNER_CURRENT
static java.lang.String
SEARCH_STR_MAX_SIZE
static int
WILDCARD_BEGINS
static int
WILDCARD_CONTAINS
static int
WILDCARD_CONTAINS_ANY
static int
WILDCARD_ENDS
static int
WILDCARD_EXACTLY
-
Fields inherited from interface com.microstrategy.web.app.beans.AppComponent
COMPONENT_POSITION_NOT_INITIALIZED
-
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 int
getBlockCount()
int
getDateCreated()
Gets whether the search will be taken from the creation or modification time.int
getDateSubType()
Gets whether the search will be restricted based on a time or date interval.int
getDateType()
Gets whether the search will be restricted based on dates.java.lang.String
getDescriptionPattern()
Returns the description pattern that the search is currently limited to.int
getDomain()
Return the search domain, an enumeration value fromEnumDSSXMLSearchDomain
.java.lang.String
getEndDate()
Gets the end date if the search is restricted on a date interval.FolderBean
getFolderBean()
java.lang.String
getFolderID()
Gets the folder ID where the user is coming from.java.lang.String
getFolderName()
Gets the folder name where the user is coming from.int
getFolderType()
Gets the folder type, which specifies a system folder ID.int
getIntervalUnit()
Gets the time units to use if the search is restricted on a time interval.java.lang.String
getIntervalValue()
Gets the time value to use if the search is restricted on a time interval.int
getMaxObjects()
Returns the maximum number of objects the search is configured to return.int
getMaxWait()
java.lang.String
getNamePattern()
Returns the pattern to search for in the name of the objects in metadata.int
getOwnerType()
Gets the owner of the objects to search for.int
getPollingFrequency()
java.lang.String
getSearchID()
Returns the search ID of the last search submitted, or the last time setSearchID was called.java.lang.String
getStartDate()
Gets the start date if the search is restricted on a date interval.SimpleListObj
getTypes()
Returns aSimpleListObj
from which types can be added or removed.int
getWildCards()
Returns the wild card used in the current search.boolean
isAdvanced()
boolean
isDerefrenceShortcut()
Indicate whether DssXmlSearchDereferenceShortcut flag should be set for search, seeboolean
isFieldValid(java.lang.String field)
Checks if the field has valid information.void
setAdvanced(boolean advanced)
Sets the bean to show in advaced/simple mode.void
setBlockCount(int count)
Sets the Block count.void
setDateCreated(int dateCreated)
Sets whether the search will be taken from the creation or modification time.void
setDateSubType(int dateSubType)
Sets whether the search will be restricted based on a time or date interval.void
setDateType(int dataType)
Sets whether the search will be restricted based on dates.void
setDerefrenceShortcut(boolean derefrenceShortcut)
Set the DerefrenceShortcut property which indicate DssXmlSearchDereferenceShortcut flag for search, seevoid
setDescriptionPattern(java.lang.String description)
Sets the description pattern that the search will be limited to.void
setDomain(int domain)
Sets the search domain, an enumeration value fromEnumDSSXMLSearchDomain
.void
setEndDate(java.lang.String endDate)
Sets the end date of a search restricted on a date interval.void
setFolderID(java.lang.String id)
Sets the folderId.void
setFolderType(int type)
Sets the folderType.void
setIntervalUnit(int intervalUnit)
Sets the time units to use if the search is restricted on a time interval.void
setIntervalValue(java.lang.String intervalValue)
Sets the time value to use if the search is restricted on a time interval.void
setMaxObjects(int maxObjects)
Sets the maximum number of objects that the search will return.void
setMaxWait(int wait)
Sets the maximum time that a search will wait before returning.void
setNamePattern(java.lang.String name)
Sets the pattern to search for in the name of the objects in metadata.void
setOwnerType(int ownerType)
Sets the owner of the objects to search for.void
setPollingFrequency(int frequency)
Sets the time that a search will will poll for the results.void
setSearchID(java.lang.String id)
Sets the search ID.void
setStartDate(java.lang.String startDate)
Sets the start date of a search restricted on a date interval.void
setTypes(java.lang.String value)
Allows the user to set the types restriction as a comma separated list of integers representing the types the search should be restricted to.void
setWildCards(int wildCards)
Sets the wild card used in the current search.boolean
showResults()
-
Methods inherited from interface com.microstrategy.web.app.beans.AppComponent
getAppContext, getDescriptor, getDescriptor, getEventManager, getExtraInput, getExtraUrl, getLeft, getResultFilterMode, getTop, isDialog, isForcedChildrenStateSaving, isModal, isModalOpen, isOpen, setExtraInput, setExtraUrl, setForcedChildrenStateSaving, setHasJustOpened, setIsDialog, setIsModal, setIsOpen, setLeft, setTop
-
Methods inherited from interface com.microstrategy.utils.serialization.Persistable
restoreState, restoreState, saveState, saveState, saveState, saveState
-
Methods inherited from interface com.microstrategy.web.beans.RequestPersistable
restoreStateFromRequest, restoreStateFromRequest
-
Methods inherited from interface com.microstrategy.web.beans.Transformable
addTransform, addTransformByClass, addTransformByStyle, addTransformByStyle, clearTransforms, getBeanContext, getMessageString, getMyTransformInstances, getTransformInstance, getTransformInstance, getTransformInstances, getType, hasTransform, hasTransform, invalidateTransformCache, setBeanContext, transform, transform
-
Methods inherited from interface com.microstrategy.web.beans.WebComponent
addChild, addChildStateInfo, addChildStateInfo, collectData, collectMinimalData, generateOutput, getBeanContext, getChild, getChild, getChildByClass, getChildByType, getChildCount, getChildrenByClass, getDefaultStateLevel, getFeaturesManager, getMaximumStateLevel, getName, getOutputFormat, getParent, getPath, getPersistMode, getRenderingFilter, getRoot, getTargetBean, getTargetBeanPath, getWebEvent, getWebEvent, getWebEventHandler, getXMLStatus, handleRequest, hasChanged, hasJustOpened, initBean, invalidateChildrenState, isBeanContextEmpty, isFeatureAvailable, prepareForReuse, removeChild, removeChild, searchChild, setBeanContext, setBeanContext, setChanged, setChanged, setDefaultStateLevel, setFeaturesManager, setName, setOutputFormat, setParent, setPersistMode, setRenderingFilter, setTargetBean, setTargetBeanPath, setWebEventHandler
-
-
-
-
Field Detail
-
WILDCARD_CONTAINS
static final int WILDCARD_CONTAINS
-
WILDCARD_CONTAINS_ANY
static final int WILDCARD_CONTAINS_ANY
-
WILDCARD_EXACTLY
static final int WILDCARD_EXACTLY
-
WILDCARD_BEGINS
static final int WILDCARD_BEGINS
-
WILDCARD_ENDS
static final int WILDCARD_ENDS
-
DATE_ALL_DATES
static final int DATE_ALL_DATES
- See Also:
- Constant Field Values
-
DATE_SPECIFIC_DATE
static final int DATE_SPECIFIC_DATE
- See Also:
- Constant Field Values
-
DATE_BETWEEN_INTERVAL
static final int DATE_BETWEEN_INTERVAL
- See Also:
- Constant Field Values
-
DATE_BETWEEN_DATES
static final int DATE_BETWEEN_DATES
- See Also:
- Constant Field Values
-
DATE_CREATED
static final int DATE_CREATED
- See Also:
- Constant Field Values
-
DATE_MODIFIED
static final int DATE_MODIFIED
- See Also:
- Constant Field Values
-
DATE_HOURS
static final int DATE_HOURS
- See Also:
- Constant Field Values
-
DATE_DAYS
static final int DATE_DAYS
- See Also:
- Constant Field Values
-
DATE_WEEKS
static final int DATE_WEEKS
- See Also:
- Constant Field Values
-
DATE_MONTHS
static final int DATE_MONTHS
- See Also:
- Constant Field Values
-
DATE_YEARS
static final int DATE_YEARS
- See Also:
- Constant Field Values
-
OWNER_ALL
static final int OWNER_ALL
- See Also:
- Constant Field Values
-
OWNER_CURRENT
static final int OWNER_CURRENT
- See Also:
- Constant Field Values
-
FIELD_ID
static final java.lang.String FIELD_ID
- See Also:
- Constant Field Values
-
FIELD_NAME
static final java.lang.String FIELD_NAME
- See Also:
- Constant Field Values
-
FIELD_WILDCARDS
static final java.lang.String FIELD_WILDCARDS
- See Also:
- Constant Field Values
-
FIELD_FOLDER_TYPE
static final java.lang.String FIELD_FOLDER_TYPE
- See Also:
- Constant Field Values
-
FIELD_FOLDER_ID
static final java.lang.String FIELD_FOLDER_ID
- See Also:
- Constant Field Values
-
FIELD_TYPES
static final java.lang.String FIELD_TYPES
- See Also:
- Constant Field Values
-
FIELD_DATE_TYPE
static final java.lang.String FIELD_DATE_TYPE
- See Also:
- Constant Field Values
-
FIELD_DATE_SUBTYPE
static final java.lang.String FIELD_DATE_SUBTYPE
- See Also:
- Constant Field Values
-
FIELD_DATE_CREATED
static final java.lang.String FIELD_DATE_CREATED
- See Also:
- Constant Field Values
-
FIELD_INTERVAL_UNIT
static final java.lang.String FIELD_INTERVAL_UNIT
- See Also:
- Constant Field Values
-
FIELD_INTERVAL_VALUE
static final java.lang.String FIELD_INTERVAL_VALUE
- See Also:
- Constant Field Values
-
FIELD_START_DATE
static final java.lang.String FIELD_START_DATE
- See Also:
- Constant Field Values
-
FIELD_END_DATE
static final java.lang.String FIELD_END_DATE
- See Also:
- Constant Field Values
-
FIELD_OWNER_TYPE
static final java.lang.String FIELD_OWNER_TYPE
- See Also:
- Constant Field Values
-
FIELD_DESCRIPTION
static final java.lang.String FIELD_DESCRIPTION
- See Also:
- Constant Field Values
-
FIELD_SEARCH_OPTIONS
static final java.lang.String FIELD_SEARCH_OPTIONS
- See Also:
- Constant Field Values
-
SEARCH_STR_MAX_SIZE
static final java.lang.String SEARCH_STR_MAX_SIZE
- Since:
- MicroStrategy Web 8.0.1
- See Also:
- Constant Field Values
-
-
Method Detail
-
showResults
boolean showResults()
- Returns:
- true if the folderBean is ready to display the search results
-
isFieldValid
boolean isFieldValid(java.lang.String field)
Checks if the field has valid information. In the handleRequest method all the fields are validated and saved. This method checks if the field is in the list of invalid ones.- Parameters:
field
- the name of the field- Returns:
- true if the field contains valid information
-
setAdvanced
void setAdvanced(boolean advanced)
Sets the bean to show in advaced/simple mode. In advanced mode all the search sections are displayed.- Parameters:
advanced
- true if the bean should be render in advanced mode
-
isAdvanced
boolean isAdvanced()
- Returns:
- whether the bean will be shown in advanced mode.
-
getFolderID
java.lang.String getFolderID()
Gets the folder ID where the user is coming from.- Returns:
- the folder ID where the user is coming from.
-
setFolderID
void setFolderID(java.lang.String id)
Sets the folderId. This however has no impact on the handleRequest method, is just to identify from which folder the user is coming from.- Parameters:
id
- folder ID.
-
getFolderType
int getFolderType()
Gets the folder type, which specifies a system folder ID.- Returns:
- the folder type.
-
setFolderType
void setFolderType(int type)
Sets the folderType. This however has no impact on the handleRequest method, is just to identify from which folder the user is coming from.- Parameters:
type
- the folder type.
-
getFolderName
java.lang.String getFolderName()
Gets the folder name where the user is coming from.- Returns:
- the folder name.
-
setMaxWait
void setMaxWait(int wait)
Sets the maximum time that a search will wait before returning. For more information refer to theWebSearch
object.- Parameters:
wait
- the waittime
-
getMaxWait
int getMaxWait()
- Returns:
- the maximum time that a search will wait before returning. For more information
refer to the
WebSearch
object.
-
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()
-
setBlockCount
void setBlockCount(int count)
Sets the Block count.- Parameters:
count
-int
value indicating the page size for the search results
-
getBlockCount
int getBlockCount()
- Returns:
- the maximum time that a search will wait before returning. For more information
refer to the
WebSearch
object.
-
setPollingFrequency
void setPollingFrequency(int frequency)
Sets the time that a search will will poll for the results. For more information refer to theWebSearch
object.- Parameters:
frequency
- the frequency that a search polls for results.
-
getPollingFrequency
int getPollingFrequency()
- Returns:
- the time that a search will will poll for the results. For more information
refer to the
WebSearch
object.
-
getFolderBean
FolderBean getFolderBean()
- Returns:
- the FolderBean associates with this Bean.
-
getSearchID
java.lang.String getSearchID()
Returns the search ID of the last search submitted, 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 id)
Sets the search ID.- Parameters:
id
- The search ID of a search which is executing or has results waiting on the Intelligence Server.- See Also:
getSearchID()
-
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 name)
Sets the pattern to search for in the name of the objects in metadata.- Parameters:
name
- The name pattern that will be searched for.- See Also:
getNamePattern()
-
getWildCards
int getWildCards()
Returns the wild card used in the current search.- Returns:
- The wild card used in the current search.
- See Also:
WILDCARD_CONTAINS
,WILDCARD_EXACTLY
,WILDCARD_BEGINS
,WILDCARD_ENDS
-
setWildCards
void setWildCards(int wildCards)
Sets the wild card used in the current search.- Parameters:
wildCards
- the wild card used in the current search.- See Also:
WILDCARD_CONTAINS
,WILDCARD_EXACTLY
,WILDCARD_BEGINS
,WILDCARD_ENDS
-
getDateType
int getDateType()
Gets whether the search will be restricted based on dates.- Returns:
- whether the search will be restricted based on dates.
- See Also:
DATE_ALL_DATES
,DATE_SPECIFIC_DATE
-
setDateType
void setDateType(int dataType)
Sets whether the search will be restricted based on dates.- Parameters:
dataType
- whether the search will be restricted based on dates.- See Also:
DATE_ALL_DATES
,DATE_SPECIFIC_DATE
-
getDateSubType
int getDateSubType()
Gets whether the search will be restricted based on a time or date interval.- Returns:
- whether the search will be restricted based on a time or date interval.
- See Also:
DATE_BETWEEN_INTERVAL
,DATE_BETWEEN_DATES
-
setDateSubType
void setDateSubType(int dateSubType)
Sets whether the search will be restricted based on a time or date interval.- Parameters:
dateSubType
- whether the search will be restricted based on a time or date interval.- See Also:
DATE_BETWEEN_INTERVAL
,DATE_BETWEEN_DATES
-
getDateCreated
int getDateCreated()
Gets whether the search will be taken from the creation or modification time.- Returns:
- value that specifies whether the search will be taken from the creation or modification time.
- See Also:
DATE_CREATED
,DATE_MODIFIED
-
setDateCreated
void setDateCreated(int dateCreated)
Sets whether the search will be taken from the creation or modification time.- Parameters:
dateCreated
- value that specifies whether the search will be taken from the creation or modification time.- See Also:
DATE_CREATED
,DATE_MODIFIED
-
getIntervalUnit
int getIntervalUnit()
Gets the time units to use if the search is restricted on a time interval.- Returns:
- the time units used by the current search.
- See Also:
DATE_HOURS
,DATE_DAYS
,DATE_WEEKS
,DATE_MONTHS
,DATE_YEARS
-
setIntervalUnit
void setIntervalUnit(int intervalUnit)
Sets the time units to use if the search is restricted on a time interval.- Parameters:
intervalUnit
- the time units used by the current search.- See Also:
DATE_HOURS
,DATE_DAYS
,DATE_WEEKS
,DATE_MONTHS
,DATE_YEARS
-
getIntervalValue
java.lang.String getIntervalValue()
Gets the time value to use if the search is restricted on a time interval. Possible values are positive integers.- Returns:
- the time value that the current search will use.
-
setIntervalValue
void setIntervalValue(java.lang.String intervalValue)
Sets the time value to use if the search is restricted on a time interval. Possible values are positive integers.- Parameters:
intervalValue
- the time value the current search will use.
-
getStartDate
java.lang.String getStartDate()
Gets the start date if the search is restricted on a date interval. Possible values are valid dates.- Returns:
- the start date of the interval.
-
setStartDate
void setStartDate(java.lang.String startDate)
Sets the start date of a search restricted on a date interval.- Parameters:
startDate
- A valid date which represents the start date of the interval.
-
getEndDate
java.lang.String getEndDate()
Gets the end date if the search is restricted on a date interval. Possible values are valid dates.- Returns:
- the end date of the interval.
-
setEndDate
void setEndDate(java.lang.String endDate)
Sets the end date of a search restricted on a date interval.- Parameters:
endDate
- A valid date which represents the start date of the interval.
-
getOwnerType
int getOwnerType()
Gets the owner of the objects to search for.- Returns:
- The owner of the objects to search for.
- See Also:
OWNER_ALL
,OWNER_CURRENT
-
setOwnerType
void setOwnerType(int ownerType)
Sets the owner of the objects to search for.- Parameters:
ownerType
- the owner of the objects to search for.- See Also:
OWNER_ALL
,OWNER_CURRENT
-
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 description)
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:
description
- The description pattern to use in the search.- See Also:
getDescriptionPattern()
-
getTypes
SimpleListObj getTypes()
Returns aSimpleListObj
from which types can be added or removed. Note that theSimpleListObj
returned can only have java.lang.Integer objects added to it.- Returns:
- A
SimpleListObj
reflecting the types of objects which will be searched for.
-
setTypes
void setTypes(java.lang.String value)
Allows the user to set the types restriction as a comma separated list of integers representing the types the search should be restricted to. Valid values are those defined in theEnumDSSXMLObjectTypes
or theEnumDSSXMLObjectSubTypes
enumerations.- Since:
- MicroStrategy Web 9.0.0
-
getDomain
int getDomain()
Return the search domain, an enumeration value fromEnumDSSXMLSearchDomain
.- Returns:
- the search domain.
- Since:
- MicroStrategy Web 9.0.0
-
setDomain
void setDomain(int domain)
Sets the search domain, an enumeration value fromEnumDSSXMLSearchDomain
.- Parameters:
domain
- the search domain.- Since:
- MicroStrategy Web 9.0.0
-
isDerefrenceShortcut
boolean isDerefrenceShortcut()
Indicate whether DssXmlSearchDereferenceShortcut flag should be set for search, see- Returns:
- the boolean value.
- Since:
- MicroStrategy Web 9.1.0
-
setDerefrenceShortcut
void setDerefrenceShortcut(boolean derefrenceShortcut)
Set the DerefrenceShortcut property which indicate DssXmlSearchDereferenceShortcut flag for search, see- Parameters:
derefrenceShortcut
- the boolean value.- Since:
- MicroStrategy Web 9.1.0
-
-