atg.commerce.endeca.assembler.cartridge.handler
Class DimensionValueCacheRefreshHandler

java.lang.Object
  extended by DimensionSearchResultsHandler
      extended by atg.commerce.endeca.assembler.cartridge.handler.DimensionValueCacheRefreshHandler

public class DimensionValueCacheRefreshHandler
extends DimensionSearchResultsHandler

A cartridge handler used to query for every dimension value stored in the MDEX for a particular dimension. The results are then used to build a cache of ATG repository ids to dimension values (and other optional information).


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
DimensionValueCacheRefreshHandler()
           
 
Method Summary
protected  DimensionSearchGroup getDimension(DimensionSearchResults pDimensionSearchResults)
          Loops through all dimensions for the dimension specified by the dimensionName.
 java.lang.String getDimensionName()
           
protected  SearchFilter getDimensionSearchFilter(NavigationState navigationState)
          Gets the SearchFilter used for the dimension search.
 DimensionValueCacheTools getDimensionValueCacheTools()
           
 NavigationStateBuilder getNavigationStateBuilder()
           
 java.lang.String getRepositoryIdProperty()
           
protected  java.lang.String parseDimvalId(java.lang.String pNavState)
          Dimension values returned don't contain their dimval id so we need to parse it from the nav state.
 DimensionSearchResults process(DimensionSearchResultsConfig pConfig)
          An override of the DimensionSearchResultsHandlers process method.
 void setDimensionName(java.lang.String pDimensionName)
           
 void setDimensionValueCacheTools(DimensionValueCacheTools pDimensionValueCacheTools)
           
 void setNavigationStateBuilder(NavigationStateBuilder pNavigationStateBuilder)
           
 void setRepositoryIdProperty(java.lang.String pRepositoryIdProperty)
           
 
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

Constructor Detail

DimensionValueCacheRefreshHandler

public DimensionValueCacheRefreshHandler()
Method Detail

getDimensionName

public java.lang.String getDimensionName()
Returns:
the dimensionName which is the name of the dimension to retrieve values from. Defaults to product.category.

setDimensionName

public void setDimensionName(java.lang.String pDimensionName)
Parameters:
mDimensionName - the mDimensionName to set

getRepositoryIdProperty

public java.lang.String getRepositoryIdProperty()
Returns:
the mRepositoryIdProperty which is the name of the property within the dimension that indicates this particular items repository id. Defaults to category.repositoryId.

setRepositoryIdProperty

public void setRepositoryIdProperty(java.lang.String pRepositoryIdProperty)
Parameters:
mRepositoryIdProperty - the mRepositoryIdProperty to set.

getDimensionValueCacheTools

public DimensionValueCacheTools getDimensionValueCacheTools()
Returns:
the mDimensionValueCacheTools. A tools class that contains useful and common methods.

setDimensionValueCacheTools

public void setDimensionValueCacheTools(DimensionValueCacheTools pDimensionValueCacheTools)
Parameters:
mDimensionValueCacheTools - the mDimensionValueCacheTools to set.

getNavigationStateBuilder

public NavigationStateBuilder getNavigationStateBuilder()
Returns:
The NavigationStateBuilder used to create this handlers NavigationState.

setNavigationStateBuilder

public void setNavigationStateBuilder(NavigationStateBuilder pNavigationStateBuilder)
Parameters:
pNavigationStateBuilder - Set the navigationStateBuilder

process

public DimensionSearchResults process(DimensionSearchResultsConfig pConfig)
                               throws CartridgeHandlerException
An override of the DimensionSearchResultsHandlers process method. Makes a request to the MDEX for all the dimension values within the dimensionName property. The repositoryId, dimension value id and optionally the url for this item and ancestor repository ids are extracted and stored within the cache.

Throws:
CartridgeHandlerException

parseDimvalId

protected java.lang.String parseDimvalId(java.lang.String pNavState)
Dimension values returned don't contain their dimval id so we need to parse it from the nav state.

Parameters:
pNavState -
Returns:

getDimensionSearchFilter

protected SearchFilter getDimensionSearchFilter(NavigationState navigationState)
Gets the SearchFilter used for the dimension search. Specifies a wildcard, which allows all results to be returned.

Parameters:
navigationState - the global NavigationState object

getDimension

protected DimensionSearchGroup getDimension(DimensionSearchResults pDimensionSearchResults)
Loops through all dimensions for the dimension specified by the dimensionName.

Parameters:
pDimensionSearchResults -
Returns: