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 user's navigation information.


Field Summary
protected static java.lang.String CLASS_VERSION
          Class version string.
 
Constructor Summary
StoreCartridgeTools()
           
 
Method Summary
 CatalogNavigationService getCatalogNavigation()
          Returns the component used to track users catalog navigation.
 java.lang.String getCategoryNavigationUserSegment()
          Returns the user segment name used to determine whether the user is on the category page.
 java.lang.String getCurrentCategoryId()
          Returns the category ID user is currently viewing.
 com.endeca.infront.navigation.UserState getUserState()
          Returns the UserState object holding user segments.
 boolean isUserOnCategoryPage()
          Determines whether the user is currently on the category page.
 void setCatalogNavigation(CatalogNavigationService pCatalogNavigation)
          Sets the component used to track users catalog navigation.
 void setCategoryNavigationUserSegment(java.lang.String pCategoryNavigationUserSegment)
          Sets user segment name used to determine whether the user is on the category page.
 void setUserState(com.endeca.infront.navigation.UserState pUserState)
          Sets the UserState object holding user segments.
 
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)
Sets user segment name used to determine whether the user is on the category page.

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.

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)
Sets the UserState object holding user segments.

Parameters:
pUserState - The UserState object holding user segments.

getUserState

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

Returns:
The UserState object holding user segments.

setCatalogNavigation

public void setCatalogNavigation(CatalogNavigationService pCatalogNavigation)
Sets the component used to track users catalog navigation.

Parameters:
pCatalogNavigation - The component used to track users catalog navigation.

getCatalogNavigation

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

Returns:
The component used to track users catalog navigation.

getCurrentCategoryId

public java.lang.String getCurrentCategoryId()
Returns the category ID user is currently viewing. The 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 user state contains category navigation user segment.

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