public class ResultsListRequestParamMarshaller
extends RequestParamMarshaller
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)| Modifier and Type | Field and Description |
|---|---|
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".
|
| Constructor and Description |
|---|
ResultsListRequestParamMarshaller()
Creates the marshaller for reading request parameters related
to
ResultsListConfig. |
| Modifier and Type | Method and Description |
|---|---|
ContentItem |
marshall() |
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.
|
public static final String OFFSET_PARAMETER
public static final String RECORDS_PER_PAGE_PARAMETER
public static final String SORT_PARAMETER
If a value is present for this parameter, it is parsed to create
the selected SortOption
public 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=1public 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=cannonpublic static final String RELRANK_KEY_PARAMETER
public static final String RELRANK_MATCHMODE_PARAMETER
MatchMode
e.g. /N-83092?Nrm=matchallpublic static final String RELRANK_TERMS_PARAMETER
public ResultsListRequestParamMarshaller()
ResultsListConfig.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()
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.