atg.projects.store.assembler.cartridge.handler
Class PriceSliderHandler

java.lang.Object
  extended by com.endeca.infront.cartridge.NavigationCartridgeHandler<com.endeca.infront.assembler.ContentItem,PriceSliderContentItem>
      extended by atg.projects.store.assembler.cartridge.handler.PriceSliderHandler
All Implemented Interfaces:
com.endeca.infront.assembler.CartridgeHandler<com.endeca.infront.assembler.ContentItem>

public class PriceSliderHandler
extends com.endeca.infront.cartridge.NavigationCartridgeHandler<com.endeca.infront.assembler.ContentItem,PriceSliderContentItem>

Handler for the PriceSlider cartridge. This class is responsible for creating and initializing the PriceSliderContentItem. It extends the NavigationCartridgeHandler.


Field Summary
static java.lang.String DEFAULT_MAX_VALUE
           
static java.lang.String DEFAULT_MIN_VALUE
           
 
Constructor Summary
PriceSliderHandler()
           
 
Method Summary
protected  com.endeca.infront.cartridge.model.RangeFilterBreadcrumb buildFilterCrumb(com.endeca.infront.navigation.model.RangeFilter pRangeFilter)
          Construct a RangeFilterBreadcrumb which can be used to render the current position of the slider markers.
protected  void configureSlider(PriceSliderContentItem pSlider)
          Set the sliders range (min/max values)
 SearchedSites getSearchedSites()
           
 atg.multisite.SiteManager getSiteManager()
           
protected  com.endeca.infront.navigation.model.RangeFilter getSliderRangeFilter(java.lang.String pFilterProperty)
          Determines the RangeFilter that corresponds to our price slider
 StoreSitePropertiesManager getStoreSitePropertiesManager()
           
 void preprocess(com.endeca.infront.assembler.ContentItem pCartridgeConfig)
          Currently only used to create an MdexRequest.
 PriceSliderContentItem process(com.endeca.infront.assembler.ContentItem pCartridgeConfig)
          Create a new PriceSliderContentItem.
 void setSearchedSites(SearchedSites pSearchedSites)
           
 void setSiteManager(atg.multisite.SiteManager pSiteManager)
           
 void setStoreSitePropertiesManager(StoreSitePropertiesManager pStoreSitePropertiesManager)
           
protected  com.endeca.infront.assembler.ContentItem wrapConfig(com.endeca.infront.assembler.ContentItem pContentItem)
          Create a new BasicContentItem using the passed in ContentItem
 
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
 

Field Detail

DEFAULT_MIN_VALUE

public static final java.lang.String DEFAULT_MIN_VALUE
See Also:
Constant Field Values

DEFAULT_MAX_VALUE

public static final java.lang.String DEFAULT_MAX_VALUE
See Also:
Constant Field Values
Constructor Detail

PriceSliderHandler

public PriceSliderHandler()
Method Detail

getStoreSitePropertiesManager

public StoreSitePropertiesManager getStoreSitePropertiesManager()
Returns:
The StoreSitePropertiesManager bean which is used to manage store properties.

setStoreSitePropertiesManager

public void setStoreSitePropertiesManager(StoreSitePropertiesManager pStoreSitePropertiesManager)
Parameters:
StoreSitePropertiesManager - Set a new storeSitePropertyManager.

getSearchedSites

public SearchedSites getSearchedSites()
Returns:
A bean thats used to indicate the scope of the current search.

setSearchedSites

public void setSearchedSites(SearchedSites pSearchedSites)
Parameters:
Set - a new SearchedSites bean.

getSiteManager

public atg.multisite.SiteManager getSiteManager()
Returns:
A bean used to manage sites.

setSiteManager

public void setSiteManager(atg.multisite.SiteManager pSiteManager)
Parameters:
Set - a new SiteManager bean.

wrapConfig

protected com.endeca.infront.assembler.ContentItem wrapConfig(com.endeca.infront.assembler.ContentItem pContentItem)
Create a new BasicContentItem using the passed in ContentItem

Specified by:
wrapConfig in class com.endeca.infront.cartridge.NavigationCartridgeHandler<com.endeca.infront.assembler.ContentItem,PriceSliderContentItem>

preprocess

public void preprocess(com.endeca.infront.assembler.ContentItem pCartridgeConfig)
                throws com.endeca.infront.assembler.CartridgeHandlerException
Currently only used to create an MdexRequest. Does not execute it.

Specified by:
preprocess in interface com.endeca.infront.assembler.CartridgeHandler<com.endeca.infront.assembler.ContentItem>
Overrides:
preprocess in class com.endeca.infront.cartridge.NavigationCartridgeHandler<com.endeca.infront.assembler.ContentItem,PriceSliderContentItem>
Throws:
com.endeca.infront.assembler.CartridgeHandlerException

process

public PriceSliderContentItem process(com.endeca.infront.assembler.ContentItem pCartridgeConfig)
                               throws com.endeca.infront.assembler.CartridgeHandlerException
Create a new PriceSliderContentItem. If the PriceSliderContentItem has not previously been applied the current minimum and maximum pointers will be set to the values obtained from the current sites searched. If the PriceSliderContentItem has been applied then the minimum and maximum pointers will be set to the previously selected user values. The slider range is static and is obtained from the current sites being searched.

Specified by:
process in interface com.endeca.infront.assembler.CartridgeHandler<com.endeca.infront.assembler.ContentItem>
Overrides:
process in class com.endeca.infront.cartridge.NavigationCartridgeHandler<com.endeca.infront.assembler.ContentItem,PriceSliderContentItem>
Throws:
com.endeca.infront.assembler.CartridgeHandlerException

configureSlider

protected void configureSlider(PriceSliderContentItem pSlider)
                        throws atg.repository.RepositoryException
Set the sliders range (min/max values)

Parameters:
pSlider - PriceSliderContentItem to configure
Throws:
atg.repository.RepositoryException

buildFilterCrumb

protected com.endeca.infront.cartridge.model.RangeFilterBreadcrumb buildFilterCrumb(com.endeca.infront.navigation.model.RangeFilter pRangeFilter)
Construct a RangeFilterBreadcrumb which can be used to render the current position of the slider markers.

Parameters:
pRangeFilder -
Returns:

getSliderRangeFilter

protected com.endeca.infront.navigation.model.RangeFilter getSliderRangeFilter(java.lang.String pFilterProperty)
Determines the RangeFilter that corresponds to our price slider

Returns: