|
|||||||||
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
public abstract class SearchRequest
All search requests extend this. Indexing and Deploy requests do not. Maintains a few select properties that are common to all search requests.
Field Summary | |
---|---|
static int |
BROWSE
|
protected static java.lang.String |
CACHEABLE
|
static int |
CATEGORIZE
|
static java.lang.String |
CLASS_VERSION
Class version string |
protected static java.lang.String |
DEBUG
|
protected static java.lang.String[] |
EMPTY_ARRAY
|
protected static java.lang.String |
ENV
|
protected static java.lang.String |
ID
|
static int |
INSPECT
|
protected static java.lang.String |
LIST_PROPERTY_ALLOWED
|
protected static java.lang.String |
LISTABLE_PROPERTIES
|
protected static java.lang.String |
LOCAL_MERGE
|
protected static java.lang.String |
LOCAL_MERGE_DEBUG
|
protected static java.lang.String |
LOG_THIS_REQUEST
|
protected java.lang.Boolean |
mDebug
engine debugging |
protected java.util.List<java.lang.String> |
mListableProperties
to support specific list properties in the results. |
protected boolean |
mListPropertyAllowed
to support list properties in the results. |
protected boolean |
mLocalMergeDebugEnabled
Java merge debugging. |
protected boolean |
mLocalMergeDebugReady
Java merge debugging ready. |
protected boolean |
mLocalMergeEnabled
Controls local merge. |
protected java.lang.String |
mMergeSettings
response number settings for merge |
protected boolean |
mMultiPartitionSearch
indicates a multiple partition search. |
protected java.lang.String |
mRequestIdentifier
uniquely identifies this request. |
protected static double |
MsInNs
|
protected java.lang.Integer |
mSleepTimeMs
forces the engine to go to sleep during the call, for testing timeouts |
protected atg.search.routing.SearchTargetNames |
mTargets
combined object for all search target names--environment, LPs, and excluded LPs |
protected java.lang.Integer |
mTimeLimitMs
Time limit in ms before this request times out. |
protected static java.lang.String |
MULTI_PARTITION
|
protected static java.lang.String |
MULTI_SEARCH_SESSION
|
protected java.lang.String |
mVersion
engine version, not used |
static int |
QUERY
|
protected static java.lang.String |
RESP_FORM
|
protected static java.lang.String |
SAVE_REQUEST
|
static int |
SIMILARDOCS
|
protected static java.lang.String |
SITE_CONSTR
|
protected static java.lang.String |
SITE_ID
|
protected static java.lang.String |
SLEEP_TIME_MS
|
static int |
STRUCTQUERY
|
static java.lang.String[] |
TAGS
XML tags for the different requests. |
protected static java.lang.String |
TIME
|
protected static java.lang.String |
TIME_LIMIT_MS
|
static int |
TREEQUERY
|
static int |
TYPEAHEAD
|
protected static java.lang.String |
VERSION
|
static int |
VIC
|
Constructor Summary | |
---|---|
SearchRequest()
|
Method Summary | |
---|---|
protected SearchResponse |
doMerge(java.util.List<SearchResponse> pParsedResponses)
Default implementation returns the first element of the array and tosses the rest. |
void |
fillDynamicTargets(atg.search.routing.command.search.DynamicTarget msTarget)
|
void |
fillDynamicTargetSpecifier()
|
protected void |
fromXml(atg.search.routing.utils.SearchMessageNode pXml)
populates common attributes from xml. |
protected void |
getAllAttributeXML(java.lang.StringBuilder cmd)
Inserts attributes for all commands. |
protected void |
getAllBodyXML(java.lang.StringBuilder sb)
|
java.lang.String |
getAssociatedRequestIdentifier()
This is typically a search request that came before a ViewDocument request. |
java.util.List<java.lang.String> |
getContentLabels()
returns the content label(s) for this request, which indicate site-specific content to be searched |
java.lang.String[] |
getContentLabelsArray()
Returns the content label(s) for this request, which indicate site-specific content to be searched |
java.lang.Boolean |
getDebug()
Indicates whether debugging should be enabled for this request on the engine |
atg.search.routing.command.search.DynamicTargetSpecifier |
getDynamicTargetSpecifier()
|
java.util.List |
getExcludeLogicalPartitionNames()
Returns the List of excluded Logical Partition names |
SearchResponse |
getLastResponse()
Returns the last response. |
java.util.List<java.lang.String> |
getListableProperties()
Returns the set of properties that will be stored as lists in the response. |
java.lang.String |
getListablePropertiesString()
|
java.util.List |
getLogicalPartitionNames()
Returns the List of targeted Logical Partitions' names |
java.lang.String[] |
getLogicalPartitionsArray()
Returns array of targeted Logical Partitions' names |
int |
getMaximumResults()
This is only for JSPs that might want to keep the number of results with the request. |
java.lang.String |
getMergeSettings()
This is not part of a regular request. |
java.lang.String |
getPreviousRequestChainToken()
Returns the identifier for the previous chain of requests. |
java.lang.String |
getRequestAttribute(java.lang.Object attributeName)
provided for compatibility. |
java.util.Map |
getRequestAttributes()
provided for compatibility, but a no-op, and returns null. |
java.lang.String |
getRequestChainToken()
a unique identifier for a chain of requests. |
abstract int |
getRequestId()
This identifies the type of request, one of QUERY , BROWSE , etc. |
java.lang.String |
getRequestIdentifier()
The request id is available after Routing has processed the request. |
java.lang.String |
getRequestTag()
Gets the xml element tag used in the request |
long |
getRequestTime()
The time of day that the request occured, in milliseconds since 1970. |
ResponseFormat |
getRespForm()
The search engine response format. |
java.lang.String |
getSearchEnvironmentName()
Returns the target search environment name, which may be null. |
atg.search.routing.SearchTargetNames |
getSearchTargetNames()
Returns the search target names for this request. |
atg.search.routing.command.search.MultisiteConstraint |
getSiteConstraints()
Returns the site constraints. |
java.lang.String |
getSiteId()
Deprecated. Don't use this, this is the old notion of site (as in Site == Cluster) |
java.lang.Integer |
getSleepTimeMs()
Returns the amount of time, in ms, that the engine should sleep upon receiving this call. |
java.lang.String |
getTargetType()
gets the target type for the request, e.g. |
java.lang.Integer |
getTimeLimitMs()
Returns the time limit in ms for the engine to complete its processing. |
java.lang.String |
getUserAgent()
Returns the user-agent string, if one was provided, or null |
java.lang.String |
getVersion()
Optional version string for the request type. |
boolean |
isCacheable()
If cacheable is false, no attempt will be made to satisfy this request from cached data, nor will the results of this request be added to the cache. Will also return false if test-oriented values are set. |
boolean |
isDecodeOnly()
Indicates whether the response from the request should only be decoded, not parsed |
boolean |
isGeneratingXml()
|
boolean |
isKeepingXml()
RoutingSearchService (in Routing) will provide the full XML in both the original encoded form and the decoded form, along with individual partition responses, if this is enabled. |
boolean |
isListPropertyAllowed()
If true, expect Lists from the Result's properties HashMap. |
boolean |
isLocalMergeDebugEnabled()
Results in two requests being sent: one with Java merge, one without. |
boolean |
isLocalMergeDebugReady()
Indicates whether the local merge debugging comparison is ready. |
boolean |
isLocalMergeEnabled()
Indicates whether local merge is enabled for this request. |
boolean |
isMultiPartitionSearch()
Indicates whether this is a multi-partition search. |
boolean |
isMultiSearchSession()
Indicates if this request is part of a multi-search session |
boolean |
isPagingRequest()
When the request originated in a form handler, this will indicate whether this is a paging request. |
boolean |
isSaveRequest()
Indicates whether this will be saved for paging |
SearchResponse |
merge(java.util.List<SearchResponse> pParsedResponses)
Invokes local merge on the parsed responses. |
atg.search.routing.command.SearchEngineCommandResponse |
processResponse(atg.search.routing.command.SearchEngineResponse response)
Executes and times search response processing. |
protected SearchResponse |
processSearchResponse(atg.search.routing.command.SearchEngineResponse response)
Override to provide search response processing (parsing, generally). |
void |
setAssociatedRequestIdentifier(java.lang.String pAssociatedRequestIdentifier)
This is typically the identifier for a search request that came before a ViewDocument request. |
void |
setCacheable(boolean pCacheable)
If cacheabe is false, no attempt will be made to satisfy this request from cached data, nor will the results of this request be added to the cache. |
void |
setContentLabels(java.util.List<java.lang.String> pContentLabels)
sets the List of content labels for the site-specific content to be searched. |
void |
setContentLabelsArray(java.lang.String[] pContentLabels)
sets the array of content labels for the site-specific content to be searched. |
void |
setContentLabelsString(java.lang.String contentLabels)
accepts a comma-delimited list of contentLabels |
void |
setDebug(java.lang.Boolean debug)
Indicates whether debugging should be enabled for this request on the engine |
void |
setDynamicTargetSpecifier(atg.search.routing.command.search.DynamicTargetSpecifier pDynamicTargetSpecifier)
|
void |
setExcludeLogicalPartitionNames(java.util.List pExcludeLogicalPartitionNames)
Sets the logical partition names to exclude for this request. |
void |
setGeneratingXml(boolean pGeneratingXml)
|
void |
setKeepingXml(boolean pKeepingXml)
RoutingSearchService (in Routing) will provide the full XML in both the original encoded form and the decoded form, along with individual partition responses, if this is enabled. |
void |
setLastResponse(SearchResponse pLastResponse)
Sets the last response for debugging local vs. |
void |
setListableProperties(java.util.List<java.lang.String> pListableProperties)
Sets the set of properties that will be stored as lists in the response. |
void |
setListablePropertiesString(java.lang.String pListablePropertiesString)
|
void |
setListPropertyAllowed(boolean listPropertyAllowed)
Enables storage of multi-valued properties in the Result's properties HashMap. |
void |
setLocalMergeDebugEnabled(boolean pLocalMergeDebugEnabled)
Sets whether local merge debugging is enabled for this request |
void |
setLocalMergeDebugReady(boolean pLocalMergeDebugReady)
Sets whether local merge debugging comparison is ready for this request |
void |
setLocalMergeEnabled(boolean pLocalMergeEnabled)
Controls whether local merge is enabled for this request. |
void |
setLogicalPartitionNames(java.util.List pLogicalPartitionName)
Sets the logical partition names for this request. |
void |
setLogicalPartitionsArray(java.lang.String[] pLogicalPartitions)
Sets the logical partition names for this request. |
void |
setMaximumResults(int pMaxResults)
This is only for JSPs that might want to keep the number of results with the request. |
void |
setMergeSettings(java.lang.String mergeSettings)
This is not part of a regular request. |
void |
setMultiPartitionSearch(boolean multiPartitionSearch)
Indicates whether this is a multi-partition search. |
void |
setMultiSearchSession(boolean pMultiSearchSession)
Call this if you anticipate having multiple, independent form handler searches sharing the same HTTP session. |
void |
setPagingRequest(boolean pPagingRequest)
Set this to true to indicate that this is only being used for paging. |
void |
setPhysicalPartitionId(java.lang.String pPhysicalPartitionId)
Sets the ID of the physical partition to restrict the search to. |
void |
setPreviousRequestChainToken(java.lang.String pPreviousRequestChainToken)
Sets the identifier for the previous chain of requests. |
void |
setRequestAttribute(java.lang.Object attributeName,
java.lang.Object attributeValue)
provided for compatibility. |
void |
setRequestAttributes(java.util.Map requestAttributes)
provided for compatibility. |
void |
setRequestChainToken(java.lang.String pRequestChainToken)
Sets a unique identifier for a chain of requests. |
void |
setRequestIdentifier(java.lang.String pRequestIdentifier)
This is called automatically by Routing. |
void |
setRequestTime(long pRequestTime)
Sets the time of request in milliseconds (as in the time of day). |
void |
setRespForm(ResponseFormat pRespForm)
The search engine response format. |
void |
setSaveRequest(boolean pSaveRequest)
Causes this request to be saved in session scope for paging purposes. |
void |
setSearchEnvironmentName(java.lang.String pSearchEnvironmentName)
Sets the environment target for this request. |
void |
setSiteConstraints(atg.search.routing.command.search.MultisiteConstraint siteConstraints)
Sets site constraints |
void |
setSiteId(java.lang.String pSiteId)
Deprecated. |
void |
setSleepTimeMs(java.lang.Integer pSleepTimeMs)
Sets the amount of time, in ms, that the engine should sleep upon receiving this call. |
void |
setTargetType(java.lang.String pTargetType)
sets the target type for the, e.g. |
void |
setTimeLimitMs(java.lang.Integer pTimeLimitMs)
Sets the time limit in ms for the engine to complete its processing. |
void |
setUserAgent(java.lang.String pUserAgent)
Sets the optional user agent string. |
void |
setVersion(java.lang.String version)
Optional version string for the request type. |
static SearchRequest |
valueOf(java.lang.String pRequestXml)
An alternative to the subclasses' valueOf methods. |
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, getAttributeXML, getBodyXML, 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
protected static java.lang.String[] EMPTY_ARRAY
protected java.lang.Integer mTimeLimitMs
protected java.lang.String mRequestIdentifier
protected atg.search.routing.SearchTargetNames mTargets
protected boolean mListPropertyAllowed
protected java.util.List<java.lang.String> mListableProperties
protected boolean mMultiPartitionSearch
protected boolean mLocalMergeEnabled
protected boolean mLocalMergeDebugEnabled
protected boolean mLocalMergeDebugReady
protected java.lang.String mMergeSettings
protected java.lang.String mVersion
protected java.lang.Boolean mDebug
protected java.lang.Integer mSleepTimeMs
protected static final double MsInNs
public static final int QUERY
public static final int BROWSE
public static final int STRUCTQUERY
public static final int VIC
public static final int SIMILARDOCS
public static final int CATEGORIZE
public static final int INSPECT
public static final int TREEQUERY
public static final int TYPEAHEAD
public static final java.lang.String[] TAGS
protected static final java.lang.String TIME_LIMIT_MS
protected static final java.lang.String RESP_FORM
protected static final java.lang.String VERSION
protected static final java.lang.String MULTI_PARTITION
protected static final java.lang.String DEBUG
protected static final java.lang.String SLEEP_TIME_MS
protected static final java.lang.String ID
protected static final java.lang.String TIME
protected static final java.lang.String LIST_PROPERTY_ALLOWED
protected static final java.lang.String LISTABLE_PROPERTIES
protected static final java.lang.String ENV
protected static final java.lang.String LOCAL_MERGE
protected static final java.lang.String LOCAL_MERGE_DEBUG
protected static final java.lang.String SAVE_REQUEST
protected static final java.lang.String LOG_THIS_REQUEST
protected static final java.lang.String MULTI_SEARCH_SESSION
protected static final java.lang.String CACHEABLE
protected static final java.lang.String SITE_ID
protected static final java.lang.String SITE_CONSTR
Constructor Detail |
---|
public SearchRequest()
Method Detail |
---|
public boolean isDecodeOnly()
public java.lang.Integer getTimeLimitMs()
public void setTimeLimitMs(java.lang.Integer pTimeLimitMs)
pTimeLimitMs
- the time limit in ms for the engine to complete its processing. Usually some portion of Routing's
request timeout, say 80%public java.lang.String getRequestTag()
getRequestTag
in interface atg.search.routing.command.SearchEngineRequest
getRequestTag
in class atg.search.routing.command.SearchXMLObject
public java.lang.String getRequestIdentifier()
public void setRequestIdentifier(java.lang.String pRequestIdentifier)
pRequestIdentifier
- the unique id for this requestpublic void setCacheable(boolean pCacheable)
pCacheable
- pass true to enable caching, false to disablepublic boolean isCacheable()
public void setRequestTime(long pRequestTime)
pRequestTime
- current time in millisecondspublic long getRequestTime()
public int getMaximumResults()
public void setMaximumResults(int pMaxResults)
pMaxResults
- maximum number of results to displaypublic java.lang.String getUserAgent()
public void setUserAgent(java.lang.String pUserAgent)
pUserAgent
- user agent stringpublic boolean isLocalMergeEnabled()
public void setLocalMergeEnabled(boolean pLocalMergeEnabled)
pLocalMergeEnabled
- whether local merge is enabled for this requestpublic boolean isLocalMergeDebugEnabled()
public void setLocalMergeDebugEnabled(boolean pLocalMergeDebugEnabled)
pLocalMergeDebugEnabled
- whether local merge debugging is enabled for this requestpublic boolean isLocalMergeDebugReady()
public void setLocalMergeDebugReady(boolean pLocalMergeDebugReady)
pLocalMergeDebugReady
- whether local merge debugging comparison is ready for this requestpublic boolean isPagingRequest()
public void setPagingRequest(boolean pPagingRequest)
setSaveRequest(boolean)
.
pPagingRequest
- true to indicate that this is a paging request.public boolean isSaveRequest()
public void setSaveRequest(boolean pSaveRequest)
pSaveRequest
- if true, will be saved in session scope by the form handlerpublic boolean isMultiSearchSession()
public void setMultiSearchSession(boolean pMultiSearchSession)
SearchResponse.getRequestChainToken()
;
on subsequent searches, you must pass that id to setRequestChainToken(String)
.
pMultiSearchSession
- whether this request will be used in a multi-search sessionpublic atg.search.routing.SearchTargetNames getSearchTargetNames()
getSearchEnvironmentName()
, getLogicalPartitionNames()
,
getExcludeLogicalPartitionNames()
, along with the corresponding setters.
public void setSearchEnvironmentName(java.lang.String pSearchEnvironmentName)
pSearchEnvironmentName
- environment name (not a repository id)public java.lang.String getSearchEnvironmentName()
public void setLogicalPartitionNames(java.util.List pLogicalPartitionName)
pLogicalPartitionName
- List of Stringpublic java.util.List getLogicalPartitionNames()
public void setLogicalPartitionsArray(java.lang.String[] pLogicalPartitions)
pLogicalPartitionName
- array of Stringpublic java.lang.String[] getLogicalPartitionsArray()
public void setExcludeLogicalPartitionNames(java.util.List pExcludeLogicalPartitionNames)
pExcludeLogicalPartitionNames
- List of Stringpublic java.util.List getExcludeLogicalPartitionNames()
public void setPhysicalPartitionId(java.lang.String pPhysicalPartitionId)
ViewDocumentRequest
s only,
and even in that case never needs to be set by the caller.
pPhysicalPartitionId
- ID of physical partition to restrict the search to. This is for ViewDocument requests,
and never needs to be set by the caller.public boolean isKeepingXml()
public void setKeepingXml(boolean pKeepingXml)
pKeepingXml
- whether XML will be included in the responseSearchEngineCommandResponse.getSearchEngineResponse()
,
SearchEngineResponse.getXmlResponse()
,
SearchEngineResponse.getXmlResponseDecoded()
public boolean isGeneratingXml()
public void setGeneratingXml(boolean pGeneratingXml)
public java.lang.String getAssociatedRequestIdentifier()
setAssociatedRequestIdentifier(String)
on the that request.
public void setAssociatedRequestIdentifier(java.lang.String pAssociatedRequestIdentifier)
setAssociatedRequestIdentifier(String)
on the that request.
pAssociatedRequestIdentifier
- the associated request's identifier@Deprecated public java.lang.String getSiteId()
@Deprecated public void setSiteId(java.lang.String pSiteId)
pSiteId
- the site being searched.public atg.search.routing.command.search.MultisiteConstraint getSiteConstraints()
public void setSiteConstraints(atg.search.routing.command.search.MultisiteConstraint siteConstraints)
siteConstraints
- site constraintspublic abstract int getRequestId()
QUERY
, BROWSE
, etc.
public java.lang.String getVersion()
public void setVersion(java.lang.String version)
version
- version stringpublic java.lang.Boolean getDebug()
public void setDebug(java.lang.Boolean debug)
debug
- whether debugging should be enabled in the enginepublic java.lang.Integer getSleepTimeMs()
public void setSleepTimeMs(java.lang.Integer pSleepTimeMs)
Configuration.getReadTimeoutMs()
) is 20000ms, then the call will timeout.
pSleepTimeMs
- the amount of time, in ms, that the engine should sleep upon receiving this callpublic java.util.Map getRequestAttributes()
getRequestAttributes
in interface atg.search.routing.command.SearchEngineRequest
getRequestAttributes
in class atg.search.routing.command.SearchEngineRequestImpl
public java.lang.String getRequestAttribute(java.lang.Object attributeName)
getRequestAttribute
in interface atg.search.routing.command.SearchEngineRequest
getRequestAttribute
in class atg.search.routing.command.SearchEngineRequestImpl
attributeName
-
public void setRequestAttributes(java.util.Map requestAttributes)
setRequestAttributes
in interface atg.search.routing.command.SearchEngineRequest
setRequestAttributes
in class atg.search.routing.command.SearchEngineRequestImpl
requestAttributes
- public void setRequestAttribute(java.lang.Object attributeName, java.lang.Object attributeValue)
setRequestAttribute
in interface atg.search.routing.command.SearchEngineRequest
setRequestAttribute
in class atg.search.routing.command.SearchEngineRequestImpl
attributeName
- attributeValue
- public java.lang.String getMergeSettings()
public void setMergeSettings(java.lang.String mergeSettings)
mergeSettings
- merge settingspublic boolean isMultiPartitionSearch()
public void setMultiPartitionSearch(boolean multiPartitionSearch)
multiPartitionSearch
- whether this is for multiple partitionspublic boolean isListPropertyAllowed()
public void setListPropertyAllowed(boolean listPropertyAllowed)
listPropertyAllowed
- true to enable list propertiespublic java.lang.String getTargetType()
public void setTargetType(java.lang.String pTargetType)
pTargetType
- the target type namepublic java.util.List<java.lang.String> getContentLabels()
public void setContentLabels(java.util.List<java.lang.String> pContentLabels)
pContentLabels
- public void setContentLabelsArray(java.lang.String[] pContentLabels)
pContentLabels
- - array of content labelspublic java.lang.String[] getContentLabelsArray()
public void setContentLabelsString(java.lang.String contentLabels)
contentLabels
- #setContentLabels(List)
public atg.search.routing.command.search.DynamicTargetSpecifier getDynamicTargetSpecifier()
public void setDynamicTargetSpecifier(atg.search.routing.command.search.DynamicTargetSpecifier pDynamicTargetSpecifier)
public void fillDynamicTargetSpecifier()
public void fillDynamicTargets(atg.search.routing.command.search.DynamicTarget msTarget)
public java.util.List<java.lang.String> getListableProperties()
setListPropertyAllowed(boolean)
,
this controls individual properties. Leave the other property set to false, and include in this set all
properties that should be lists. Only these properties will be represented by lists in the results.
public java.lang.String getListablePropertiesString()
public void setListableProperties(java.util.List<java.lang.String> pListableProperties)
#setListPropertyAllowed()
,
this controls individual properties. Leave the other property set to false, and include in this set all
properties that should be lists. Only these properties will be represented by lists in the results.
pListableProperties
- comma-delimited list of properties that will be stored as lists in the responsepublic void setListablePropertiesString(java.lang.String pListablePropertiesString)
pListablePropertiesString
- comma-delimited list of properties that will be stored as lists in the responseprotected final void getAllAttributeXML(java.lang.StringBuilder cmd) throws atg.search.routing.command.IncompleteCommandException
fromXml(atg.search.routing.utils.SearchMessageNode)
.
Fills the provided buffer with the complete attribute XML for the command.
getAllAttributeXML
in class atg.search.routing.command.SearchXMLObject
atg.search.routing.command.IncompleteCommandException
protected void getAllBodyXML(java.lang.StringBuilder sb) throws atg.search.routing.command.IncompleteCommandException
getAllBodyXML
in class atg.search.routing.command.SearchXMLObject
atg.search.routing.command.IncompleteCommandException
protected final void fromXml(atg.search.routing.utils.SearchMessageNode pXml)
QueryRequest#fromXml(atg.search.routing.utils.SearchMessageParser)
.
These should be the same attributes inserted into the outbound XML in
getAllAttributeXML(StringBuilder)
.
pXml
- parsed nodeprotected SearchResponse processSearchResponse(atg.search.routing.command.SearchEngineResponse response) throws atg.search.routing.command.RoutingCommandException
response
- the engine response
atg.search.routing.command.RoutingCommandException
processResponse(atg.search.routing.command.SearchEngineResponse)
public final atg.search.routing.command.SearchEngineCommandResponse processResponse(atg.search.routing.command.SearchEngineResponse response) throws atg.search.routing.command.RoutingCommandException
processResponse
in interface atg.search.routing.command.SearchEngineRequest
processResponse
in class atg.search.routing.command.SearchEngineRequestImpl
response
- the response from the engine
atg.search.routing.command.RoutingCommandException
protected SearchResponse doMerge(java.util.List<SearchResponse> pParsedResponses) throws atg.search.routing.MergeException
pParsedResponses
- parsed responses
atg.search.routing.MergeException
public final SearchResponse merge(java.util.List<SearchResponse> pParsedResponses) throws atg.search.routing.MergeException
pParsedResponses
- parsed responses
atg.search.routing.MergeException
public void setRequestChainToken(java.lang.String pRequestChainToken)
SearchResponse.getRequestChainToken()
.
See setPreviousRequestChainToken(String)
, which must be called on search requests.
pRequestChainToken
- unique identifier, often the requestIdentifier from the first response in the chain.public java.lang.String getRequestChainToken()
public java.lang.String getPreviousRequestChainToken()
setRequestChainToken(String)
and setPreviousRequestChainToken(String)
.
When available, this value is used internally to clear out the old request chain data when a new
request chain begins.
public void setPreviousRequestChainToken(java.lang.String pPreviousRequestChainToken)
setRequestChainToken(String)
is used, as the previous token provides the only means of cleaning up old request chain data once a new request chain
is started. Example: User asks a question and pages through a few pages. Then the user types in a new question and clicks Search.
The initial request establishes the request chain, and the subsequent paging requests associate data with it. The new
question establishes a new request chain. The old request chain data will remain in the session unless it is
cleared, but it can only be accessed with the old token. Thus, the best practice is to examine the search response
at the top of your search page: if you have one, then set previousRequestChainToken using the value; if you do not have
a response, then there is nothing to set.
This ensures that the next request, if it happens to be a new request and not merely a paging or faceted navigation request,
will clear out the old request data.
pPreviousRequestChainToken
- unique identifier, often the requestIdentifier from the first response in the chain.public void setLastResponse(SearchResponse pLastResponse)
isLocalMergeDebugEnabled()
is true.
pLastResponse
- the last responsepublic SearchResponse getLastResponse()
public ResponseFormat getRespForm()
public void setRespForm(ResponseFormat pRespForm)
pRespForm
- the request formatpublic static SearchRequest valueOf(java.lang.String pRequestXml)
pRequestXml
- request xml
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |