|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.endeca.infront.cartridge.RequestParamMarshaller
com.endeca.infront.cartridge.ResultsListRequestParamMarshaller
public class ResultsListRequestParamMarshaller
Creates ResultsListHandler configuration from the parameters present
in a request URL. The following mapping is used:
OFFSET_PARAMETER ("No") -> ResultsListConfig.setOffset(long)RECORDS_PER_PAGE_PARAMETER ("Nrpp") -> ResultsListConfig.setRecordsPerPage(int)SORT_PARAMETER ("Ns") -> ResultsListConfig.setSortOption(com.endeca.infront.navigation.model.SortOption) WHY_RANK ("whyrank") -> ResultsListConfig.setWhyRankEnabled(boolean)WHY_MATCH ("whymatch") -> ResultsListConfig.setWhyMatchEnabled(boolean)RELRANK_KEY_PARAMETER ("Nrk") -> ResultsListConfig.setRelRankKey(String)RELRANK_TERMS_PARAMETER ("Nrt") -> ResultsListConfig.setRelRankTerms(String)RELRANK_MATCHMODE_PARAMETER ("Nrm") -> ResultsListConfig.setRelRankMatchMode(com.endeca.infront.navigation.model.MatchMode)
| Field Summary | |
|---|---|
static String |
OFFSET_PARAMETER
Name of request parameter that sets the offset, in terms of number of records from the start of the results, of the first record of the ResultsList, "No". |
static String |
RECORDS_PER_PAGE_PARAMETER
Name of request parameter that sets the maximum number of records that the ResultsList may contain, "Nrpp". |
static String |
RELRANK_KEY_PARAMETER
Name of request parameter that sets the relevance ranking search key. |
static String |
RELRANK_MATCHMODE_PARAMETER
Name of request parameter that sets the relevance ranking match mode. |
static String |
RELRANK_TERMS_PARAMETER
Name of request parameter that sets the relevance ranking search terms. |
static String |
SORT_PARAMETER
Name of request parameter that sets the sort options, "Ns". |
static String |
WHY_MATCH
Query parameter name for turning on debug information about why a record is included in a text search result, "whymatch". |
static String |
WHY_RANK
Query parameter name for turning on debug information about why a record is ordered higher or lower than another in the result list, "whyrank". |
| Fields inherited from class com.endeca.infront.cartridge.RequestParamMarshaller |
|---|
mRequest, mRequestMap |
| Constructor Summary | |
|---|---|
ResultsListRequestParamMarshaller()
Creates the marshaller for reading request parameters related to ResultsListConfig. |
|
| Method Summary | |
|---|---|
ContentItem |
marshall()
Creates a new ContentItem and populates it with information from the HttpServletRequest. |
void |
setEnableRecordsPerPage(boolean enable)
Controls whether or not records per page can be set via RECORDS_PER_PAGE_PARAMETER. |
void |
setMaxRecordsPerPage(int max)
Sets the maximum number of records per page that will be returned. |
| Methods inherited from class com.endeca.infront.cartridge.RequestParamMarshaller |
|---|
convertToBoolean, convertToInt, convertToList, convertToLong, override, setHttpServletRequest, setRequestMap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String OFFSET_PARAMETER
ResultsListConfig.setOffset(long),
Constant Field Valuespublic static final String RECORDS_PER_PAGE_PARAMETER
ResultsListConfig.setRecordsPerPage(int),
Constant Field Valuespublic static final String SORT_PARAMETER
If a value is present for this parameter, it is parsed to create
the selected SortOption
ResultsListConfig.setSortOption(com.endeca.infront.navigation.model.SortOption),
Constant Field Valuespublic static final String WHY_RANK
Record output model's attribute with the key
"DGraph.WhyRank".
This parameter value overrides the default value that is set
up by the application.
e.g. /N-83092?whyrank=1
ResultsListConfig.setWhyRankEnabled(boolean),
Constant Field Valuespublic static final String WHY_MATCH
Record output model's attribute
with the key "DGraph.WhyMatch".
on the output model. This parameter value overrides the default value that is
set up by the application.
e.g. /N-83092?whymatch=1&Ntt=cannon
ResultsListConfig.setWhyMatchEnabled(boolean),
Constant Field Valuespublic static final String RELRANK_KEY_PARAMETER
ResultsListConfig.setRelRankKey(String),
Constant Field Valuespublic static final String RELRANK_MATCHMODE_PARAMETER
MatchMode
e.g. /N-83092?Nrm=matchall
ResultsListConfig.setRelRankMatchMode(MatchMode),
Constant Field Valuespublic static final String RELRANK_TERMS_PARAMETER
ResultsListConfig.setRelRankTerms(String),
Constant Field Values| Constructor Detail |
|---|
public ResultsListRequestParamMarshaller()
ResultsListConfig.
| Method Detail |
|---|
public void setMaxRecordsPerPage(int max)
RECORDS_PER_PAGE_PARAMETER value. The default value is 1000.
Note that this value is ignored if records per page parsing is disabled.
max - a positive integer to limit the number of records that can be requested via
RECORDS_PER_PAGE_PARAMETER.
IllegalArgumentException - if max is negative or zerosetEnableRecordsPerPage(boolean),
ResultsListConfig.setRecordsPerPage(int)public void setEnableRecordsPerPage(boolean enable)
RECORDS_PER_PAGE_PARAMETER.
The default value is true.
enable - true to enable use of RECORDS_PER_PAGE_PARAMETER, false to disable request
parameter control of records per page.ResultsListConfig.setRecordsPerPage(int)public ContentItem marshall()
RequestParamMarshaller
marshall in class RequestParamMarshaller
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||