|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.search.routing.command.SearchXMLObject atg.search.routing.command.SearchEngineRequestImpl atg.search.routing.command.search.SearchRequest atg.search.routing.command.search.TypeAheadRequest
public class TypeAheadRequest
This class is used to issue Type Ahead requests to the engine. For a given (user-entered) string, and a language specified in the request, the engine returns a collection of strings representing suggested completions for the string, if any
Nested Class Summary | |
---|---|
static class |
TypeAheadRequest.Response
Response class for the TypeAheadRequest class |
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
Fields inherited from class atg.search.routing.command.search.SearchRequest |
---|
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 Summary | |
---|---|
TypeAheadRequest()
|
Method Summary | |
---|---|
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. |
Methods inherited from class atg.search.routing.command.SearchEngineRequestImpl |
---|
encodeMapData, isFiringSearchEvents, isKeepingResponseData, isLoggingThisRequest, setFiringSearchEvents, setKeepingResponseData, setLoggingThisRequest |
Methods inherited from class atg.search.routing.command.SearchXMLObject |
---|
appendComplexXml, appendOptionalAttr, appendOptionalElem, appendOptionalElem, appendOptionalElem, appendOptionalValue, appendRequiredAttr, appendRequiredElem, appendRequiredElem, appendRequiredValue, getDefaultXmlBytes, getParentXMLObject, getXmlPath, isPrintedFirstChild, setParentXMLObject, setPrintedFirstChild, toString, toXML, toXML |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface atg.search.routing.command.SearchEngineRequest |
---|
toXML |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public TypeAheadRequest()
Method Detail |
---|
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 responses
atg.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 response
atg.search.routing.command.RoutingCommandException
SearchRequest.processResponse(atg.search.routing.command.SearchEngineResponse)
public static TypeAheadRequest valueOf(java.lang.String pRequestXml)
pRequestXml
- the request xml
protected static TypeAheadRequest fromXml(atg.search.routing.utils.SearchMessageParser xml)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |