com.endeca.infront.cartridge
Class SearchAdjustmentsHandler

java.lang.Object
  extended by com.endeca.infront.cartridge.NavigationCartridgeHandler<SearchAdjustmentsConfig,SearchAdjustments>
      extended by com.endeca.infront.cartridge.SearchAdjustmentsHandler
All Implemented Interfaces:
CartridgeHandler<SearchAdjustmentsConfig>

public class SearchAdjustmentsHandler
extends NavigationCartridgeHandler<SearchAdjustmentsConfig,SearchAdjustments>

Cartridge handler that creates SearchAdjustments model objects.


Constructor Summary
SearchAdjustmentsHandler()
           
 
Method Summary
 void preprocess(SearchAdjustmentsConfig cartridgeConfig)
          Creates an MDEX query with spell and phrase Did You Mean enabled.
 SearchAdjustments process(SearchAdjustmentsConfig cartridgeConfig)
          Always returns a SearchAdjustments object, even if no search adjustments have been suggested.
protected  SearchAdjustmentsConfig 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

SearchAdjustmentsHandler

public SearchAdjustmentsHandler()
Method Detail

wrapConfig

protected SearchAdjustmentsConfig 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<SearchAdjustmentsConfig,SearchAdjustments>
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(SearchAdjustmentsConfig cartridgeConfig)
                throws CartridgeHandlerException
Creates an MDEX query with spell and phrase Did You Mean enabled. If the autophrase URL parameter exists, (e.g. autophrase=0), a "1" value will turn on autophrasing, and any other value will turn it off.

Specified by:
preprocess in interface CartridgeHandler<SearchAdjustmentsConfig>
Overrides:
preprocess in class NavigationCartridgeHandler<SearchAdjustmentsConfig,SearchAdjustments>
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 SearchAdjustments process(SearchAdjustmentsConfig cartridgeConfig)
                          throws CartridgeHandlerException
Always returns a SearchAdjustments object, even if no search adjustments have been suggested.

Specified by:
process in interface CartridgeHandler<SearchAdjustmentsConfig>
Overrides:
process in class NavigationCartridgeHandler<SearchAdjustmentsConfig,SearchAdjustments>
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.