public class TypeAheadRequest extends SearchRequest
Modifier and Type | Class and Description |
---|---|
static class |
TypeAheadRequest.Response
Response class for the TypeAheadRequest class
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
BROWSE, CACHEABLE, CATEGORIZE, DEBUG, EMPTY_ARRAY, ENV, ID, INSPECT, LIST_PROPERTY_ALLOWED, LISTABLE_PROPERTIES, LOCAL_MERGE, LOCAL_MERGE_DEBUG, LOG_THIS_REQUEST, mDebug, mListableProperties, mListPropertyAllowed, mLocalMergeDebugEnabled, mLocalMergeDebugReady, mLocalMergeEnabled, mMergeSettings, mMultiPartitionSearch, mRequestIdentifier, MsInNs, mSleepTimeMs, mTargets, mTimeLimitMs, MULTI_PARTITION, MULTI_SEARCH_SESSION, mVersion, QUERY, RESP_FORM, SAVE_REQUEST, SIMILARDOCS, SITE_CONSTR, SITE_ID, SLEEP_TIME_MS, STRUCTQUERY, TAGS, TIME, TIME_LIMIT_MS, TREEQUERY, TYPEAHEAD, VERSION, VIC
Constructor and Description |
---|
TypeAheadRequest() |
Modifier and Type | Method and Description |
---|---|
protected SearchResponse |
doMerge(java.util.List<SearchResponse> pParsedResponses)
Default implementation returns the first element of the array and tosses the rest.
|
protected static TypeAheadRequest |
fromXml(atg.search.routing.utils.SearchMessageParser xml) |
protected void |
getAttributeXML(java.lang.StringBuilder sb) |
protected void |
getBodyXML(java.lang.StringBuilder sb) |
java.lang.String |
getLanguage()
Get the name of the language to be used in the request.
|
java.lang.String |
getName()
Returns the optional name associated with this request.
|
int |
getRequestId()
This identifies the type of request, one of
SearchRequest.QUERY , SearchRequest.BROWSE , etc. |
TypeAheadSortType |
getSort()
The kind of sorting the engine should perform on the results.
|
java.lang.String |
getSortOrder()
Get the currently set sort order.
|
java.lang.String |
getText() |
boolean |
isLocalMergeEnabled()
Indicates whether local merge is enabled for this request.
|
SearchResponse |
processSearchResponse(atg.search.routing.command.SearchEngineResponse response)
Override to provide search response processing (parsing, generally).
|
void |
setLanguage(java.lang.String language)
Set the language to be used in the request.
|
void |
setName(java.lang.String name)
Sets the name attribute of this request.
|
void |
setSort(TypeAheadSortType sort)
Set the kind of sorting the engine should perform on the results.
|
void |
setSortOrder(java.lang.String sortOrder)
Set the sort order.
|
void |
setText(java.lang.String text)
Set the text of the request, which is the text string for which completion suggestions are returned
|
static TypeAheadRequest |
valueOf(java.lang.String pRequestXml)
Convert request xml into a TypeAheadRequest object.
|
fillDynamicTargets, fillDynamicTargetSpecifier, fromXml, getAllAttributeXML, getAllBodyXML, getAssociatedRequestIdentifier, getContentLabels, getContentLabelsArray, getDebug, getDynamicTargetSpecifier, getExcludeLogicalPartitionNames, getLastResponse, getListableProperties, getListablePropertiesString, getLogicalPartitionNames, getLogicalPartitionsArray, getMaximumResults, getMergeSettings, getPreviousRequestChainToken, getRequestAttribute, getRequestAttributes, getRequestChainToken, getRequestIdentifier, getRequestTag, getRequestTime, getRespForm, getSearchEnvironmentName, getSearchTargetNames, getSiteConstraints, getSiteId, getSleepTimeMs, getTargetType, getTimeLimitMs, getUserAgent, getVersion, isCacheable, isDecodeOnly, isGeneratingXml, isKeepingXml, isListPropertyAllowed, isLocalMergeDebugEnabled, isLocalMergeDebugReady, isMultiPartitionSearch, isMultiSearchSession, isPagingRequest, isSaveRequest, merge, processResponse, setAssociatedRequestIdentifier, setCacheable, setContentLabels, setContentLabelsArray, setContentLabelsString, setDebug, setDynamicTargetSpecifier, setExcludeLogicalPartitionNames, setGeneratingXml, setKeepingXml, setLastResponse, setListableProperties, setListablePropertiesString, setListPropertyAllowed, setLocalMergeDebugEnabled, setLocalMergeDebugReady, setLocalMergeEnabled, setLogicalPartitionNames, setLogicalPartitionsArray, setMaximumResults, setMergeSettings, setMultiPartitionSearch, setMultiSearchSession, setPagingRequest, setPhysicalPartitionId, setPreviousRequestChainToken, setRequestAttribute, setRequestAttributes, setRequestChainToken, setRequestIdentifier, setRequestTime, setRespForm, setSaveRequest, setSearchEnvironmentName, setSiteConstraints, setSiteId, setSleepTimeMs, setTargetType, setTimeLimitMs, setUserAgent, setVersion
encodeMapData, isFiringSearchEvents, isKeepingResponseData, isLoggingThisRequest, setFiringSearchEvents, setKeepingResponseData, setLoggingThisRequest
appendComplexXml, appendOptionalAttr, appendOptionalElem, appendOptionalElem, appendOptionalElem, appendOptionalValue, appendRequiredAttr, appendRequiredElem, appendRequiredElem, appendRequiredValue, getDefaultXmlBytes, getParentXMLObject, getXmlPath, isPrintedFirstChild, setParentXMLObject, setPrintedFirstChild, toString, toXML, toXML
public java.lang.String getText()
public void setText(java.lang.String text)
text
- The string to be matched in the request.public boolean isLocalMergeEnabled()
SearchRequest
isLocalMergeEnabled
in class SearchRequest
public TypeAheadSortType getSort()
TypeAheadSortType
public void setSort(TypeAheadSortType sort)
TypeAheadSortType
sort
- the sort value to setpublic java.lang.String getSortOrder()
public void setSortOrder(java.lang.String sortOrder)
sortOrder
- This value can be either "ascending" or "descending". This value
indicates the overall sort order of the results. The value of getSort() indicates the kind of sorting
to perform. This value indicates whether that sorting is then rendered in ascending or descending fashion.
"descending" is the default value.public java.lang.String getLanguage()
public void setLanguage(java.lang.String language)
language
- the name of the language to be used. See available languages at Language
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name of the typeahead data to use in this requestprotected void getAttributeXML(java.lang.StringBuilder sb) throws atg.search.routing.command.IncompleteCommandException
getAttributeXML
in class atg.search.routing.command.SearchXMLObject
atg.search.routing.command.IncompleteCommandException
protected void getBodyXML(java.lang.StringBuilder sb) throws atg.search.routing.command.IncompleteCommandException
getBodyXML
in class atg.search.routing.command.SearchXMLObject
atg.search.routing.command.IncompleteCommandException
public int getRequestId()
SearchRequest
SearchRequest.QUERY
, SearchRequest.BROWSE
, etc.getRequestId
in class SearchRequest
protected SearchResponse doMerge(java.util.List<SearchResponse> pParsedResponses) throws atg.search.routing.MergeException
SearchRequest
doMerge
in class SearchRequest
pParsedResponses
- parsed responsesatg.search.routing.MergeException
public SearchResponse processSearchResponse(atg.search.routing.command.SearchEngineResponse response) throws atg.search.routing.command.RoutingCommandException
SearchRequest
processSearchResponse
in class SearchRequest
response
- the engine responseatg.search.routing.command.RoutingCommandException
SearchRequest.processResponse(atg.search.routing.command.SearchEngineResponse)
public static TypeAheadRequest valueOf(java.lang.String pRequestXml)
pRequestXml
- the request xmlprotected static TypeAheadRequest fromXml(atg.search.routing.utils.SearchMessageParser xml)