public class ResultsListHandler extends NavigationCartridgeHandler<Config,Model>
ResultsList cartridge.| Constructor and Description |
|---|
ResultsListHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
combineFieldNames(NavigationState navigationState,
com.endeca.infront.cartridge.FieldNamesConfig config)
Updates the list of string for retaining representative record properties.
|
protected Record |
createRecordFromAggrERec(com.endeca.navigation.AggrERec aggrERec,
NavigationState navigationState,
com.endeca.infront.cartridge.FieldNamesConfig config)
Create a Record object from an AggrERec.
|
protected Record |
createRecordFromERec(com.endeca.navigation.ERec eRec,
NavigationState navigationState,
boolean isSubRecord,
com.endeca.infront.cartridge.FieldNamesConfig config)
Create a Record object from an ERec.
|
protected List<Record> |
createRecords(com.endeca.navigation.ENEQueryResults results,
NavigationState navigationState,
com.endeca.infront.cartridge.FieldNamesConfig config)
Convert the records found in the given query to Record form.
|
protected void |
dispatchNavigationEventInformation(ResultsListConfig cartridgeConfig,
ResultsList resultsList)
Tracks all Navigation State related information.
|
List<SortOptionConfig> |
getSortOptions()
A list of sort options to display to the end user.
|
protected static long |
getTotalNumRecs(com.endeca.navigation.ENEQueryResults results) |
ResultsListConfig |
initialize(ContentItem pContentItem)
Creates a ResultsListConfig representing the full configuration for this cartridge.
|
void |
preprocess(ResultsListConfig cartridgeConfig)
Creates a record list MDEX query.
|
ResultsList |
process(ResultsListConfig cartridgeConfig)
Creates a basic RecordList model.
|
protected void |
retainFieldNames(Map<String,Attribute> attributeMap,
List<String> fieldNames)
Helper method that can be overridden by sub-classes to modify the fields retention logic.
|
protected void |
retainFields(Map<String,Attribute> attributeMap,
com.endeca.infront.cartridge.FieldNamesConfig config,
boolean aggregationEnabled)
Helper method for retaining properties.
|
void |
setContentBroker(ContentBroker pContentBroker)
Provider of essential services to dynamic content handlers.
|
void |
setContentSource(ContentSource pContentSource)
Specify the source to retrieve content for the handler.
|
void |
setRecommendationService(RecommendationService recommendationService) |
void |
setSortOptions(List<SortOptionConfig> sortOptions)
Returns the list of sort options to display to the end user.
|
protected ResultsListConfig |
wrapConfig(ContentItem pContentItem)
Wraps the input
ContentItem as a typed config object. |
createMdexRequest, dispatchNavigationEventInformation, executeMdexRequest, executeMdexRequest, getActionPathProvider, getAuditInfo, getContentItemInitializer, getMdexRequestBroker, getNavigationState, getSiteState, getUserState, populateNavigationPathDefaults, setActionPathProvider, setAuditInfo, setContentItemInitializer, setMdexRequestBroker, setNavigationState, setSiteState, setUserStatepublic List<SortOptionConfig> getSortOptions()
public void setSortOptions(List<SortOptionConfig> sortOptions)
getSortOptions()public void setContentSource(ContentSource pContentSource)
pContentSource - the source to retrieve content for the handler.public void setContentBroker(ContentBroker pContentBroker)
pContentBroker - the broker used to retrieve dynamic content.public void setRecommendationService(RecommendationService recommendationService)
public ResultsListConfig initialize(ContentItem pContentItem) throws CartridgeHandlerException
initialize in class NavigationCartridgeHandler<ResultsListConfig,ResultsList>pContentItem - cartridge instance configuration, typically
from Experience Manager.NavigationCartridgeHandler.preprocess(ConfigType)
or NavigationCartridgeHandler.process(ConfigType) methods.CartridgeHandlerExceptionNavigationCartridgeHandler.setContentItemInitializer(ContentItemInitializer),
NavigationCartridgeHandler.wrapConfig(ContentItem)protected ResultsListConfig wrapConfig(ContentItem pContentItem)
NavigationCartridgeHandlerContentItem as a typed config object. It is not expected that
subclasses will mutate the input ContentItem, beyond passing it into
their typed configuration class as a constructor argument.wrapConfig in class NavigationCartridgeHandler<ResultsListConfig,ResultsList>pContentItem - the configuration for this cartridge handler. This will either be the
fully initialized configuration object, if a ContentItemInitializer has been
set, or it will simply be the instance configuration.ConfigType which wraps the input ContentItem.NavigationCartridgeHandler.initialize(ContentItem),
NavigationCartridgeHandler.setContentItemInitializer(ContentItemInitializer)public void preprocess(ResultsListConfig cartridgeConfig) throws CartridgeHandlerException
preprocess in class NavigationCartridgeHandler<ResultsListConfig,ResultsList>CartridgeHandlerExceptionpublic ResultsList process(ResultsListConfig cartridgeConfig) throws CartridgeHandlerException
createRecordFromERec(com.endeca.navigation.ERec, com.endeca.infront.navigation.NavigationState, boolean, com.endeca.infront.cartridge.FieldNamesConfig) or createRecords(com.endeca.navigation.ENEQueryResults, com.endeca.infront.navigation.NavigationState, com.endeca.infront.cartridge.FieldNamesConfig)
methods if they are only making a customization to the Record model.process in class NavigationCartridgeHandler<ResultsListConfig,ResultsList>CartridgeHandlerExceptionprotected void dispatchNavigationEventInformation(ResultsListConfig cartridgeConfig, ResultsList resultsList)
protected void retainFields(Map<String,Attribute> attributeMap, com.endeca.infront.cartridge.FieldNamesConfig config, boolean aggregationEnabled)
attributeMap - A list of attributes to maintain on the records.config - Cartridge Configuration used to determine which attributes to include.aggregationEnabled - TRUE if aggregation is enabled on the request.RecordBasedNavigationCartridgeHandler.retainFields(java.util.Map, FieldNamesConfig,
boolean)protected void retainFieldNames(Map<String,Attribute> attributeMap, List<String> fieldNames)
attributeMap - the attributes of a given record.fieldNames - the list of fields that are to be retained.protected List<String> combineFieldNames(NavigationState navigationState, com.endeca.infront.cartridge.FieldNamesConfig config) throws CartridgeHandlerException
CartridgeHandlerExceptionprotected static long getTotalNumRecs(com.endeca.navigation.ENEQueryResults results)
protected List<Record> createRecords(com.endeca.navigation.ENEQueryResults results, NavigationState navigationState, com.endeca.infront.cartridge.FieldNamesConfig config)
results - Result of MDEX querynavigationState - Base navigation state for record details links. If null, record details links are omittedconfig - The configuration specifying which field names should be included in the resulting recordsprotected Record createRecordFromAggrERec(com.endeca.navigation.AggrERec aggrERec, NavigationState navigationState, com.endeca.infront.cartridge.FieldNamesConfig config)
createRecords(ENEQueryResults,NavigationState,FieldNamesConfig) for
each AggrERec object in the results. If you override this method, it is
strongly recommended that you call this super method before you modify the
resulting record in order to retain the default marshaling logic.aggrERec - The AggrERec to build the Record fromnavigationState - The base navigation state for details actionsconfig - The configuration specifying which field names should be included in the resulting recordsprotected Record createRecordFromERec(com.endeca.navigation.ERec eRec, NavigationState navigationState, boolean isSubRecord, com.endeca.infront.cartridge.FieldNamesConfig config)
createRecords(ENEQueryResults,NavigationState,FieldNamesConfig) for
each ERec object in the results. In this case, isSubRecord will be
false. When requesting aggregate records, this method gets called from
createRecordFromAggrERec(AggrERec,NavigationState,FieldNamesConfig)
for each child ERec object on the aggregate record. In this case, isSubRecord
will be true. If you override this method, it is strongly recommended
that you call this super method before you modify the resulting record in order
to retain the default marshaling logic.eRec - The ERec to build a Record fromnavigationState - The base navigation state for details actionsisSubRecord - 'true' if this ERec is the sub-record of an AggrERecconfig - The configuration specifying which field names should be included in the resulting recordsCopyright © 2019, Oracle and/or its affiliates. All rights reserved.