atg.projects.store.assembler.cartridge
Class StoreCartridgeTools

java.lang.Object
  extended by atg.projects.store.assembler.cartridge.StoreCartridgeTools

public class StoreCartridgeTools
extends java.lang.Object

This is the helper class containing reusable methods for obtaining/modifying a user's navigation information.

Version:
$Id: //hosting-blueprint/B2CBlueprint/version/10.2.1/Endeca/Assembler/src/atg/projects/store/assembler/cartridge/StoreCartridgeTools.java#2 $$Change: 788983 $
Author:
Natallia Paulouskaya

Field Summary
protected static java.lang.String CLASS_VERSION
          Class version string.
 
Constructor Summary
StoreCartridgeTools()
           
 
Method Summary
 CatalogNavigationService getCatalogNavigation()
           
 java.lang.String getCategoryNavigationUserSegment()
           
 java.lang.String getCurrentCategoryId()
           Returns the category ID that the user is currently viewing.
 com.endeca.infront.navigation.UserState getUserState()
           
 boolean isUserOnCategoryPage()
           Determines whether the user is currently on the category page.
 void setCatalogNavigation(CatalogNavigationService pCatalogNavigation)
           
 void setCategoryNavigationUserSegment(java.lang.String pCategoryNavigationUserSegment)
           
 void setUserState(com.endeca.infront.navigation.UserState pUserState)
           
 java.util.List<com.endeca.infront.navigation.model.RangeFilter> updateRangeFilters(java.util.List<com.endeca.infront.navigation.model.RangeFilter> pRangeFilters, atg.endeca.assembler.navigation.filter.RangeFilterBuilder[] pRangeFilterBuilders)
          Return a List of unique RangeFilters by the property they filter on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

protected static final java.lang.String CLASS_VERSION
Class version string.

See Also:
Constant Field Values
Constructor Detail

StoreCartridgeTools

public StoreCartridgeTools()
Method Detail

setCategoryNavigationUserSegment

public void setCategoryNavigationUserSegment(java.lang.String pCategoryNavigationUserSegment)
Parameters:
pCategoryNavigationUserSegment - - The user segment name used to determine whether the user is on the category page.

getCategoryNavigationUserSegment

public java.lang.String getCategoryNavigationUserSegment()
Returns:
the user segment name used to determine whether the user is on the category page.

setUserState

public void setUserState(com.endeca.infront.navigation.UserState pUserState)
Parameters:
pUserState - - The UserState object holding user segments.

getUserState

public com.endeca.infront.navigation.UserState getUserState()
Returns:
The UserState object holding user segments.

setCatalogNavigation

public void setCatalogNavigation(CatalogNavigationService pCatalogNavigation)
Parameters:
pCatalogNavigation - - The component used to track users catalog navigation.

getCatalogNavigation

public CatalogNavigationService getCatalogNavigation()
Returns:
the component used to track users catalog navigation.

getCurrentCategoryId

public java.lang.String getCurrentCategoryId()

Returns the category ID that the user is currently viewing.

This method first checks whether the user is currently on the category page and if so, picks up the last browsed category from the CatalogNavigation component.

Returns:
The current category ID.

isUserOnCategoryPage

public boolean isUserOnCategoryPage()

Determines whether the user is currently on the category page.

This is performed by checking whether the user state contains the category navigation user segment.

Returns:
the boolean indicating whether the user is currently on the category page.

updateRangeFilters

public java.util.List<com.endeca.infront.navigation.model.RangeFilter> updateRangeFilters(java.util.List<com.endeca.infront.navigation.model.RangeFilter> pRangeFilters,
                                                                                          atg.endeca.assembler.navigation.filter.RangeFilterBuilder[] pRangeFilterBuilders)
Return a List of unique RangeFilters by the property they filter on.

Parameters:
pRangeFilters - - The List of RangeFilters to be updated.
pRangeFilterBuilders - - The RangeFilterBuilders that will generate RangeFilters to be added to pRangeFilters.
Returns:
a new RangeFilter list consisting of pRangeFilters and the RangeFilters generated by pRangeFilterBuilders.