atg.projects.store.catalog
Class CatalogNavigationService

java.lang.Object
  extended by atg.projects.store.catalog.CatalogNavigationService

public class CatalogNavigationService
extends java.lang.Object

Helper bean to store user catalog navigation information providing convenience methods for: the current category that user is currently viewing the ancestor categories from the current category to the top level category the full category path from and including the current category to the top level category the top level category The bean is intended to be used anywhere requiring access to the current shopper catalog navigation such as breadcrumbs, continue shopping, and with targeters to specify targeting rules based on the currently viewed category. The store uses this when targeting promotional content to the shopper.

Version:
$Id: //hosting-blueprint/B2CBlueprint/version/10.2.1/EStore/src/atg/projects/store/catalog/CatalogNavigationService.java#2 $$Change: 788983 $
Author:
ATG

Field Summary
static java.lang.String CLASS_VERSION
           
protected  java.util.List<java.lang.String> mAncestorCategoryIds
          The ancestors of the category that shopper is currently viewing.
protected  java.util.List<java.lang.String> mCategoryNavigationPath
          The full category path from and including the current category to the top level category.
protected  java.lang.String mCurrentCategoryId
          The current category that shopper is currently viewing.
protected  java.lang.String mTopLevelCategoryId
          The top level category for the category that shopper is currently viewing.
 
Constructor Summary
CatalogNavigationService()
           
 
Method Summary
 void clear()
          Clears the current navigation settings.
 java.util.List<java.lang.String> getAncestorCategories()
          Returns the ancestors of the category that user is currently viewing.
 StoreCatalogTools getCatalogTools()
           
 java.util.List<java.lang.String> getCategoryNavigationPath()
          Returns full category path from and including the current category to the top level category.
 java.lang.String getCurrentCategory()
          Returns the current category that user is currently viewing.
 java.lang.String getTopLevelCategory()
          Returns the top level category for the category that user is currently viewing.
 atg.service.collections.validator.CollectionObjectValidator[] getValidators()
           
 boolean isCurrentCategoryValid()
           
 void navigate(java.lang.String pCategoryId, java.util.List<java.lang.String> pAncestorCategoryIds)
          Tracks the shopper's catalog navigation setting the current category being viewed, the ancestor categories of the current category, the full category path from the top level category to the current category, and the top level category.
 void setAncestorCategories(java.util.List<java.lang.String> pAncestorCategoryIds)
          Sets ancestors of the category that user is currently viewing.
 void setCatalogTools(StoreCatalogTools pCatalogTools)
           
 void setCategoryNavigationPath(java.util.List<java.lang.String> pCategoryNavigationPath)
          Sets the full category path from and including the current category to the top level category.
 void setCurrentCategory(java.lang.String pCurrentCategoryId)
          Sets the current category that shopper is currently viewing.
 void setCurrentCategoryValid(boolean pCurrentCategoryValid)
           
 void setTopLevelCategory(java.lang.String pTopLevelCategoryId)
          Sets the top level category for the category that user is currently viewing.
 void setValidators(atg.service.collections.validator.CollectionObjectValidator[] pValidators)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

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

mTopLevelCategoryId

protected java.lang.String mTopLevelCategoryId
The top level category for the category that shopper is currently viewing.


mCurrentCategoryId

protected java.lang.String mCurrentCategoryId
The current category that shopper is currently viewing.


mAncestorCategoryIds

protected java.util.List<java.lang.String> mAncestorCategoryIds
The ancestors of the category that shopper is currently viewing.


mCategoryNavigationPath

protected java.util.List<java.lang.String> mCategoryNavigationPath
The full category path from and including the current category to the top level category.

Constructor Detail

CatalogNavigationService

public CatalogNavigationService()
Method Detail

setTopLevelCategory

public void setTopLevelCategory(java.lang.String pTopLevelCategoryId)
Sets the top level category for the category that user is currently viewing.

Parameters:
pTopLevelCategory - the top level category for the category that user is currently viewing.

getTopLevelCategory

public java.lang.String getTopLevelCategory()
Returns the top level category for the category that user is currently viewing.

Returns:
the top level category for the category that user is currently viewing.

setCurrentCategory

public void setCurrentCategory(java.lang.String pCurrentCategoryId)
Sets the current category that shopper is currently viewing.

Parameters:
pCurrentCategoryId - the current category that shopper is currently viewing.

getCurrentCategory

public java.lang.String getCurrentCategory()
Returns the current category that user is currently viewing.

Returns:
the current category that user is currently viewing.

setAncestorCategories

public void setAncestorCategories(java.util.List<java.lang.String> pAncestorCategoryIds)
Sets ancestors of the category that user is currently viewing.

Parameters:
pAncestorCategoryIds - the ancestors of the category that user is currently viewing.

getAncestorCategories

public java.util.List<java.lang.String> getAncestorCategories()
Returns the ancestors of the category that user is currently viewing. The first category in the list is the top level category and the last category in the list is the parent category of the category that user is currently viewing.

Returns:
the ancestors of the category that user is currently viewing.

setCategoryNavigationPath

public void setCategoryNavigationPath(java.util.List<java.lang.String> pCategoryNavigationPath)
Sets the full category path from and including the current category to the top level category.

Parameters:
pCategoryNavigationPath - the full category path from and including the current category to the top level category.

getCategoryNavigationPath

public java.util.List<java.lang.String> getCategoryNavigationPath()
Returns full category path from and including the current category to the top level category. The first category in the list is the top level category and the last category in the list is the category that user is currently viewing.

Returns:
the full category path from and including the current category to the top level category.

isCurrentCategoryValid

public boolean isCurrentCategoryValid()
Returns:
the isCurrentCategoryValid

setCurrentCategoryValid

public void setCurrentCategoryValid(boolean pCurrentCategoryValid)
Parameters:
puCrrentCategoryValid - the currentCategoryValid to set

getCatalogTools

public StoreCatalogTools getCatalogTools()
Returns:
the CatalogTools component.

setCatalogTools

public void setCatalogTools(StoreCatalogTools pCatalogTools)
Parameters:
pCatalogTools - - The CatalogTools component.

getValidators

public atg.service.collections.validator.CollectionObjectValidator[] getValidators()
Returns:
the validators

setValidators

public void setValidators(atg.service.collections.validator.CollectionObjectValidator[] pValidators)
Parameters:
pValidators - the validators to set

navigate

public void navigate(java.lang.String pCategoryId,
                     java.util.List<java.lang.String> pAncestorCategoryIds)
Tracks the shopper's catalog navigation setting the current category being viewed, the ancestor categories of the current category, the full category path from the top level category to the current category, and the top level category.

Parameters:
pCategoryId - the current category.
pAncestorCategoryIds - the ancestors of the current category that user is currently viewing.

clear

public void clear()
Clears the current navigation settings.