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

java.lang.Object
  extended by com.endeca.infront.cartridge.NavigationCartridgeHandler<com.endeca.infront.cartridge.BreadcrumbsConfig,com.endeca.infront.cartridge.Breadcrumbs>
      extended by com.endeca.infront.cartridge.BreadcrumbsHandler
          extended by atg.projects.store.assembler.cartridge.handler.StoreBreadcrumbsHandler
All Implemented Interfaces:
com.endeca.infront.assembler.CartridgeHandler<com.endeca.infront.cartridge.BreadcrumbsConfig>

public class StoreBreadcrumbsHandler
extends com.endeca.infront.cartridge.BreadcrumbsHandler

Extends BreadcrumbsHandler to override preprocess method to use CategoryToDimensionAttributeAliasManager to get the source name for attribute alias. Process method is overridden to update unlocalized category names to localized ones.

Version:
$Id: //hosting-blueprint/B2CBlueprint/version/10.2.1/Endeca/Assembler/src/atg/projects/store/assembler/cartridge/handler/StoreBreadcrumbsHandler.java#4 $$Change: 788983 $
Author:
Yekaterina Kostenevich

Field Summary
protected static java.lang.String CATEGORY_DIMENSION_NAME
           
static java.lang.String CLASS_VERSION
          Class version string
protected static java.lang.String DISPLAY_NAME_PROPERTY
           
protected static java.lang.String DISPLAY_NAME_PROPERTY_ALIAS
           
 
Constructor Summary
StoreBreadcrumbsHandler()
           
 
Method Summary
 java.lang.String findLocalizedLabel(java.util.Map<java.lang.String,java.lang.String> pProperties, java.lang.String pLabel, java.lang.String pDisplayNameProperty)
          Looks for localized label for category refinements.
 atg.search.record.alias.AttributeAliasManager getLocaleAttributeAliasManager()
           
 void preprocess(com.endeca.infront.cartridge.BreadcrumbsConfig pCartridgeConfig)
          Determine the source property name for aliased display name property before calling super.preprocess method.
 com.endeca.infront.cartridge.Breadcrumbs process(com.endeca.infront.cartridge.BreadcrumbsConfig pCartridgeConfig)
          Creates a new Breadcrumbs with localized category labels and group refinement crumbs by dimension name preserving the order in that the dimension names appears.
 void setLocaleAttributeAliasManager(atg.search.record.alias.AttributeAliasManager pLocaleAttributeAliasManager)
           
protected  com.endeca.infront.cartridge.BreadcrumbsConfig wrapConfig(com.endeca.infront.assembler.ContentItem pContentItem)
          Create a new BreadcrumbsConfig using the passed in ContentItem.
 
Methods inherited from class com.endeca.infront.cartridge.NavigationCartridgeHandler
createMdexRequest, dispatchNavigationEventInformation, executeMdexRequest, 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

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


CATEGORY_DIMENSION_NAME

protected static final java.lang.String CATEGORY_DIMENSION_NAME
See Also:
Constant Field Values

DISPLAY_NAME_PROPERTY

protected static final java.lang.String DISPLAY_NAME_PROPERTY
See Also:
Constant Field Values

DISPLAY_NAME_PROPERTY_ALIAS

protected static final java.lang.String DISPLAY_NAME_PROPERTY_ALIAS
See Also:
Constant Field Values
Constructor Detail

StoreBreadcrumbsHandler

public StoreBreadcrumbsHandler()
Method Detail

getLocaleAttributeAliasManager

public atg.search.record.alias.AttributeAliasManager getLocaleAttributeAliasManager()
Returns:
The Manager component used to determine the source property for the display name aliased property.

setLocaleAttributeAliasManager

public void setLocaleAttributeAliasManager(atg.search.record.alias.AttributeAliasManager pLocaleAttributeAliasManager)
Parameters:
pLocaledAttributeAliasManager - the mLocaleAttributeAliasResolver to set.

wrapConfig

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

Overrides:
wrapConfig in class com.endeca.infront.cartridge.BreadcrumbsHandler
Parameters:
pContentItem - - The cartridge content item to be wrapped.
Returns:
a new Breadcrumbs configuration.

preprocess

public void preprocess(com.endeca.infront.cartridge.BreadcrumbsConfig pCartridgeConfig)
                throws com.endeca.infront.assembler.CartridgeHandlerException
Determine the source property name for aliased display name property before calling super.preprocess method.

Specified by:
preprocess in interface com.endeca.infront.assembler.CartridgeHandler<com.endeca.infront.cartridge.BreadcrumbsConfig>
Overrides:
preprocess in class com.endeca.infront.cartridge.BreadcrumbsHandler
Parameters:
pCartridgeConfig - - The Breadcrumbs cartridge configuration.
Throws:
com.endeca.infront.assembler.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 com.endeca.infront.cartridge.Breadcrumbs process(com.endeca.infront.cartridge.BreadcrumbsConfig pCartridgeConfig)
                                                 throws com.endeca.infront.assembler.CartridgeHandlerException
Creates a new Breadcrumbs with localized category labels and group refinement crumbs by dimension name preserving the order in that the dimension names appears.

Specified by:
process in interface com.endeca.infront.assembler.CartridgeHandler<com.endeca.infront.cartridge.BreadcrumbsConfig>
Overrides:
process in class com.endeca.infront.cartridge.BreadcrumbsHandler
Parameters:
pCartridgeConfig - - The cartridge configuration for the Breadcrumbs.
Throws:
com.endeca.infront.assembler.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.

findLocalizedLabel

public java.lang.String findLocalizedLabel(java.util.Map<java.lang.String,java.lang.String> pProperties,
                                           java.lang.String pLabel,
                                           java.lang.String pDisplayNameProperty)
Looks for localized label for category refinements.

Parameters:
pProperties - - The properties of current refinement.
pLabel - - The non-localized label of refinement.
pDisplayNameProperty - - The localized display name property.
Returns:
a localized label.