com.endeca.infront.cartridge
Class RefinementMenuHandler

java.lang.Object
  extended by com.endeca.infront.cartridge.NavigationCartridgeHandler<RefinementMenuConfig,RefinementMenu>
      extended by com.endeca.infront.cartridge.RefinementMenuHandler
All Implemented Interfaces:
CartridgeHandler<RefinementMenuConfig>

public class RefinementMenuHandler
extends NavigationCartridgeHandler<RefinementMenuConfig,RefinementMenu>

Cartridge handler that creates RefinementMenu model objects.


Constructor Summary
RefinementMenuHandler()
           
 
Method Summary
 void preprocess(RefinementMenuConfig cartridgeConfig)
          Creates a query to the MDEX for the refinements of the Dimension specified by RefinementMenuConfig.getDimensionId().
 RefinementMenu process(RefinementMenuConfig cartridgeConfig)
          Returns null if no dimension id is specified in the config, or if the MDEX doesn't return any refinements.
protected  RefinementMenuConfig wrapConfig(ContentItem pContentItem)
          Wraps the input ContentItem as a typed config object.
 
Methods inherited from class com.endeca.infront.cartridge.NavigationCartridgeHandler
createMdexRequest, dispatchNavigationEventInformation, executeMdexRequest, getActionPathProvider, getContentItemInitializer, getMdexRequestBroker, getNavigationState, initialize, populateNavigationPathDefaults, setActionPathProvider, setContentItemInitializer, setMdexRequestBroker, setNavigationState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RefinementMenuHandler

public RefinementMenuHandler()
Method Detail

wrapConfig

protected RefinementMenuConfig wrapConfig(ContentItem pContentItem)
Description copied from class: NavigationCartridgeHandler
Wraps the input ContentItem 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.

Specified by:
wrapConfig in class NavigationCartridgeHandler<RefinementMenuConfig,RefinementMenu>
Parameters:
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.
Returns:
an instance of ConfigType which wraps the input ContentItem.
See Also:
NavigationCartridgeHandler.initialize(ContentItem), NavigationCartridgeHandler.setContentItemInitializer(ContentItemInitializer)

preprocess

public void preprocess(RefinementMenuConfig cartridgeConfig)
                throws CartridgeHandlerException
Creates a query to the MDEX for the refinements of the Dimension specified by RefinementMenuConfig.getDimensionId(). If the dimension id is not specified, this CartridgeHandler will return null for its ContentItem.

Specified by:
preprocess in interface CartridgeHandler<RefinementMenuConfig>
Overrides:
preprocess in class NavigationCartridgeHandler<RefinementMenuConfig,RefinementMenu>
Parameters:
cartridgeConfig - the cartridge configuration returned by CartridgeHandler.initialize(ContentItem). This cartridge configuration may be modified by this handler. Note that this cartridge configuration is also passed to CartridgeHandler.process(ContentItem).
Throws:
CartridgeHandlerException - if an error occurs that is scoped to an individual cartridge instance. This exception will not halt the entire assembly process, which occurs across multiple cartridges; instead, this exception will be packaged in the overall response model. If an unchecked exception is thrown, then the entire assembly process will be halted.

process

public RefinementMenu process(RefinementMenuConfig cartridgeConfig)
                       throws CartridgeHandlerException
Returns null if no dimension id is specified in the config, or if the MDEX doesn't return any refinements.

Specified by:
process in interface CartridgeHandler<RefinementMenuConfig>
Overrides:
process in class NavigationCartridgeHandler<RefinementMenuConfig,RefinementMenu>
Parameters:
cartridgeConfig - the cartridge configuration returned by CartridgeHandler.initialize(ContentItem). Note that this instance may have been modified by the CartridgeHandler.preprocess(ContentItem) method.
Returns:
the output value for this cartridge. If null is returned, then the corresponding node in the output tree will be deleted.
Throws:
CartridgeHandlerException - if an error occurs that is scoped to an individual cartridge instance. This exception will not halt the entire assembly process, which occurs across multiple cartridges; instead, this exception will be packaged in the overall response model. If an unchecked exception is thrown, then the entire assembly process will be halted.


Copyright © 2012, Oracle and/or its affiliates. All rights reserved.