public class StoreNavigationStateProcessor
extends java.lang.Object
implements atg.endeca.assembler.navigation.NavigationStateProcessor
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string.
|
protected StoreCatalogTools |
mCatalogTools |
protected java.util.List<java.lang.String> |
mIgnoredRangeFilters |
Constructor and Description |
---|
StoreNavigationStateProcessor() |
Modifier and Type | Method and Description |
---|---|
protected void |
addCatalogUserState(com.endeca.infront.navigation.NavigationState pNavigationState)
Add the CategoryNavigation user segment.
|
CatalogNavigationService |
getCatalogNavigation() |
StoreCatalogTools |
getCatalogTools() |
protected atg.repository.RepositoryItem |
getCategory(java.lang.String pCategoryId)
Get category by its id
|
atg.commerce.endeca.cache.DimensionValueCacheTools |
getDimensionValueCacheTools() |
java.util.List<java.lang.String> |
getIgnoredRangeFilters() |
java.lang.String |
getUserSegment() |
com.endeca.infront.content.UserState |
getUserState() |
protected boolean |
isCategoryOnCurentSite(java.lang.String pRepositoryId)
Retrieves category item using its repository id and checks
whether the category belongs to current site.
|
com.endeca.infront.navigation.NavigationState |
process(com.endeca.infront.navigation.NavigationState pNavigationState)
Process the navigation state to determine if it represents a user catalog
navigation and update the details on the catalog navigation tracking
component and set the user segment on the user state for routing the user
to the category page.
|
void |
setCatalogNavigation(CatalogNavigationService pCatalogNavigationService) |
void |
setCatalogTools(StoreCatalogTools pCatalogTools) |
void |
setDimensionValueCacheTools(atg.commerce.endeca.cache.DimensionValueCacheTools pDimensionValueCacheTools) |
void |
setIgnoredRangeFilters(java.util.List<java.lang.String> pIgnoredRangeFilters) |
void |
setUserSegment(java.lang.String pUserSegment) |
void |
setUserState(com.endeca.infront.content.UserState pUserState) |
protected void |
updateCatalogNavigation(java.lang.String pCategoryId,
java.util.List<java.lang.String> pAncestors)
Update the catalog navigation component.
|
public static final java.lang.String CLASS_VERSION
protected java.util.List<java.lang.String> mIgnoredRangeFilters
protected StoreCatalogTools mCatalogTools
public void setUserSegment(java.lang.String pUserSegment)
pUserSegment
- - The user segment to set on the user state and used within Experience Manager to
control routing the user to the category page instead of the search results page.public java.lang.String getUserSegment()
public void setUserState(com.endeca.infront.content.UserState pUserState)
pUserState
- - The userState object used to hold the user segment for use within Experience Manager to
control routing the user to the category page instead of the search results page.public com.endeca.infront.content.UserState getUserState()
public void setDimensionValueCacheTools(atg.commerce.endeca.cache.DimensionValueCacheTools pDimensionValueCacheTools)
pDimensionValueCacheTools
- - The utility class for access to the ATG<->Endeca catalog cache.public atg.commerce.endeca.cache.DimensionValueCacheTools getDimensionValueCacheTools()
public void setCatalogNavigation(CatalogNavigationService pCatalogNavigationService)
pCatalogNavigationService
- - The component used to track users catalog navigation.public CatalogNavigationService getCatalogNavigation()
public void setIgnoredRangeFilters(java.util.List<java.lang.String> pIgnoredRangeFilters)
pIgnoredRangeFilters
- - The range filters to ignore when determining whether to add the
CatalogNavigation user segment or not.public java.util.List<java.lang.String> getIgnoredRangeFilters()
public void setCatalogTools(StoreCatalogTools pCatalogTools)
pCatalogTools
- - The CatalogTools object to use when looking up products, categories and skus.public StoreCatalogTools getCatalogTools()
public com.endeca.infront.navigation.NavigationState process(com.endeca.infront.navigation.NavigationState pNavigationState)
process
in interface atg.endeca.assembler.navigation.NavigationStateProcessor
protected boolean isCategoryOnCurentSite(java.lang.String pRepositoryId)
pRepositoryId
- the category repository idprotected atg.repository.RepositoryItem getCategory(java.lang.String pCategoryId)
pCategoryId
- the category to retriveprotected void updateCatalogNavigation(java.lang.String pCategoryId, java.util.List<java.lang.String> pAncestors)
pCategoryId
- The categoryId to set as the last browsed category.pAncestors
- The ancestor category ids.protected void addCatalogUserState(com.endeca.infront.navigation.NavigationState pNavigationState)
Add the CategoryNavigation user segment. We only do this when there are no search filters or range filters. This is because we only want to land on the category page when only a category is selected.
The 'ignoredRangeFilters' property used in this method defines a list of range filters to ignore when determining whether to add the CatalogNavigation segment or not.
pNavigationState
- - The NavigationState object that holds the current search/range filters.