public class RecordSpotlightHandler extends NavigationCartridgeHandler<Config,Model>
RecordSpotlight model objects.| Constructor and Description |
|---|
RecordSpotlightHandler() |
| 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 NavigationState |
createSpotlightNavigationState(NavigationState navigationState,
RecordSpotlightConfig config)
This method is responsible for merging the global NavigationState passed in with the
RecordSpotlightConfig's navigation selection.
|
protected static long |
getTotalNumRecs(com.endeca.navigation.ENEQueryResults results) |
void |
preprocess(RecordSpotlightConfig cartridgeConfig)
This method ensures the configuration's recordSelection is valid (i.e.
|
RecordSpotlight |
process(RecordSpotlightConfig cartridgeConfig)
This method processes the global query results in order to obtain information about the
current navigation state dimensions, such as whether they are multi-or, and what their
ancestors are.
|
protected RecordSpotlight |
processSpotlightMdexResponse(NavigationState spotlightNavigationState,
RecordSpotlightConfig config,
com.endeca.navigation.ENEQueryResults eneResults)
Protected method allows this to be overridden by subclasses of the CartridgeHandler.
|
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.
|
protected RecordSpotlightConfig |
wrapConfig(ContentItem pContentItem)
Creates a RecordSpotlightConfig.
|
createMdexRequest, dispatchNavigationEventInformation, executeMdexRequest, executeMdexRequest, getActionPathProvider, getAuditInfo, getContentItemInitializer, getMdexRequestBroker, getNavigationState, getSiteState, getUserState, initialize, populateNavigationPathDefaults, setActionPathProvider, setAuditInfo, setContentItemInitializer, setMdexRequestBroker, setNavigationState, setSiteState, setUserStateprotected RecordSpotlightConfig wrapConfig(ContentItem pContentItem)
wrapConfig in class NavigationCartridgeHandler<RecordSpotlightConfig,RecordSpotlight>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(RecordSpotlightConfig cartridgeConfig) throws CartridgeHandlerException
preprocess in class NavigationCartridgeHandler<RecordSpotlightConfig,RecordSpotlight>CartridgeHandlerException - if the recordSelection isn't validpublic RecordSpotlight process(RecordSpotlightConfig cartridgeConfig) throws CartridgeHandlerException
createSpotlightNavigationState(NavigationState, RecordSpotlightConfig) method, which
merges the spotlight's merchandiser configured navigation state with the user's navigation
state, and then makes a second MDEX query for the spotlight results, which it then passes to
processSpotlightMdexResponse(NavigationState, RecordSpotlightConfig, ENEQueryResults).process in class NavigationCartridgeHandler<RecordSpotlightConfig,RecordSpotlight>CartridgeHandlerExceptionprotected NavigationState createSpotlightNavigationState(NavigationState navigationState, RecordSpotlightConfig config)
navigationState - the global navigation stateconfig - protected RecordSpotlight processSpotlightMdexResponse(NavigationState spotlightNavigationState, RecordSpotlightConfig config, com.endeca.navigation.ENEQueryResults eneResults)
NavigationCartridgeHandler.executeMdexRequest(com.endeca.infront.navigation.request.MdexRequest) method will only
provide access to the global ENEQueryResults which would be used for building Breadcrumbs or
ResultsList, etc.RecordSpotlight modelprotected 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 recordsprotected 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.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.Copyright © 2019, Oracle and/or its affiliates. All rights reserved.