|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.repository.search.refinement.FacetSearchTools atg.commerce.search.refinement.CommerceFacetSearchTools
public class CommerceFacetSearchTools
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected static java.lang.String |
SEARCH_TESTING_RC_NAME_PREFIX
|
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
CommerceFacetSearchTools()
Constructs an instanceof CommerceFacetSearchTools |
Method Summary | |
---|---|
protected void |
addCategoryConstraint(java.lang.String pCategoryId,
QueryRequest pRequest)
Adds a category id constraint to the query. |
protected FacetValue |
convertRefineValue(RefinementFacet pRefineFacet,
RefinementValue pRefineValue,
boolean pIsLastValue)
Converts a RefinementValue object to a FacetValue object |
java.lang.String |
determineCommerceRefineConfigName(FacetTrail pTrail,
QueryRequest pRequest)
determine the refine config name |
java.lang.String |
determineDocSetPath(FacetTrail pTrail,
QueryRequest pRequest)
Determines the docset path constraint for the ES request. |
RepositoryItem |
findCategory(java.lang.String pCategoryId)
find the category by id |
RefinementConfiguration |
getCatalogRefineConfig(FacetTrail pTrail,
QueryRequest pRequest)
get the catalog refine config |
CatalogTools |
getCatalogTools()
|
java.lang.String |
getCategoryId()
|
java.lang.String |
getCategoryIdPropertyName()
|
protected CommerceRefinementConfiguration |
getCommerceRefinementConfiguration(RepositoryItem pItem)
Creates a CommerceRefinementConfiguration bean from the given refineConfig repository item |
CommerceRefinementConfigurationPropertyManager |
getCommerceRefinementConfigurationPropertyManager()
Gets the commerceRefinementConfigurationPropertyManager. |
protected java.util.List |
getDerivedRefineElements(RepositoryItem pCategory)
Method to get the total set of refine elements (facets) for the given category. |
java.lang.String |
getDocSetPathFormat()
|
atg.commerce.search.refinement.CommerceFacetSourceGenerator |
getFacetSourceGenerator()
|
RefinementConfiguration |
getGlobalRefineConfig()
Gets the global refine config |
java.lang.String |
getGlobalRefineConfigName()
|
protected java.lang.String |
getIdForDocSetPath(FacetTrail pTrail)
|
protected java.lang.String |
getIdPropertyNameForDocSetPath()
|
protected FacetValue |
getLastCategoryFacetValueInTrail(FacetTrail pfacetTrail)
Gets the last catalog structure facet value (facet that represents a category) in the facet trail. |
RefinementConfiguration |
getLastCategoryRefineConfig(FacetTrail pFacetTrail)
Gets the refine config of the last category in the facet trail. |
RefinementConfiguration |
getRefineConfig(RepositoryItem pCategoryItem)
Gets the refine config for the given category. |
protected java.lang.String |
getSearchTestingRefineConfigName(RepositoryItem pSourceItem,
java.lang.String pPrefix)
Generate refine-config name for search query executed from Search Testing UI. |
protected RepositoryItem |
getSourceItem(RepositoryItem pCategory)
Gets the source repository item for this refine config. |
protected boolean |
isCategoryFacet(FacetValue pValue)
test to see if a facet value is an instanceof CategoryFacetValue |
protected boolean |
isEligibleFacetValue(FacetTrail pFacetTrail,
FacetValue pFacetValue)
determines whether the given facet value is eligible for inclusion in the list of facet values |
boolean |
isEnableUnverifiedCategoryLookup()
get EnableUnverifiedCategoryLookup |
boolean |
isSkipAncestorsToCategoriesInTrail()
|
SearchRequest |
processSearchRequest(SearchRequest pSearchRequest,
DynamoHttpServletRequest pDynamoRequest,
java.lang.Object pCallback)
process search request |
protected void |
removeAncestorCategoriesFromFacetValues(java.util.List<FacetValue> pFacetValuesList)
Remove all but the most specific CategoryFacetValue from the pFacetValuesList. |
java.util.List<java.lang.String> |
reorderCategories(java.util.List<java.lang.String> pCategoryIds)
|
void |
setCatalogTools(CatalogTools pCatalogTools)
|
void |
setCategoryId(java.lang.String pCategoryId)
|
void |
setCategoryIdPropertyName(java.lang.String pCategoryIdPropertyName)
|
void |
setCommerceRefinementConfigurationPropertyManager(CommerceRefinementConfigurationPropertyManager pCRCPropertyManager)
Sets the commerceRefinementConfigurationPropertyManager. |
void |
setDocSetPathFormat(java.lang.String pDocSetPathFormat)
|
void |
setEnableUnverifiedCategoryLookup(boolean pEnableUnverifiedCategoryLookup)
set EnableUnverifiedCategoryLookup. |
void |
setFacetSourceGenerator(atg.commerce.search.refinement.CommerceFacetSourceGenerator pFacetSourceGenerator)
|
void |
setGlobalRefineConfigName(java.lang.String pGlobalRefineConfigName)
|
void |
setSkipAncestorsToCategoriesInTrail(boolean pSkipAncestorsToCategoriesInTrail)
|
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
protected static final java.lang.String SEARCH_TESTING_RC_NAME_PREFIX
Constructor Detail |
---|
public CommerceFacetSearchTools()
Method Detail |
---|
public void setDocSetPathFormat(java.lang.String pDocSetPathFormat)
public java.lang.String getDocSetPathFormat()
public void setCatalogTools(CatalogTools pCatalogTools)
public CatalogTools getCatalogTools()
public void setGlobalRefineConfigName(java.lang.String pGlobalRefineConfigName)
public java.lang.String getGlobalRefineConfigName()
public void setCategoryId(java.lang.String pCategoryId)
public java.lang.String getCategoryId()
public void setCommerceRefinementConfigurationPropertyManager(CommerceRefinementConfigurationPropertyManager pCRCPropertyManager)
public CommerceRefinementConfigurationPropertyManager getCommerceRefinementConfigurationPropertyManager()
public void setFacetSourceGenerator(atg.commerce.search.refinement.CommerceFacetSourceGenerator pFacetSourceGenerator)
public atg.commerce.search.refinement.CommerceFacetSourceGenerator getFacetSourceGenerator()
public void setCategoryIdPropertyName(java.lang.String pCategoryIdPropertyName)
public java.lang.String getCategoryIdPropertyName()
public boolean isSkipAncestorsToCategoriesInTrail()
public void setSkipAncestorsToCategoriesInTrail(boolean pSkipAncestorsToCategoriesInTrail)
public void setEnableUnverifiedCategoryLookup(boolean pEnableUnverifiedCategoryLookup)
pEnableUnverifiedCategoryLookup
- the EnableUnverifiedCategoryLookuppublic boolean isEnableUnverifiedCategoryLookup()
public java.lang.String determineCommerceRefineConfigName(FacetTrail pTrail, QueryRequest pRequest)
determineCommerceRefineConfigName
in class FacetSearchTools
public RepositoryItem findCategory(java.lang.String pCategoryId) throws RepositoryException
RepositoryException
public RefinementConfiguration getCatalogRefineConfig(FacetTrail pTrail, QueryRequest pRequest)
public RefinementConfiguration getGlobalRefineConfig()
public RefinementConfiguration getLastCategoryRefineConfig(FacetTrail pFacetTrail)
pFacetTrail
- The facet trail
protected FacetValue getLastCategoryFacetValueInTrail(FacetTrail pfacetTrail)
pfacetTrail
- The facet trail
public RefinementConfiguration getRefineConfig(RepositoryItem pCategoryItem)
pCategoryItem
- The category item to retrieve the refine config for.
protected CommerceRefinementConfiguration getCommerceRefinementConfiguration(RepositoryItem pItem) throws FacetException
pItem
- The refine config repository item used to populate the created bean
FacetException
public java.lang.String determineDocSetPath(FacetTrail pTrail, QueryRequest pRequest)
determineDocSetPath
in class FacetSearchTools
pFacetSearchRequest
- The facet search request
protected java.lang.String getIdPropertyNameForDocSetPath()
protected java.lang.String getIdForDocSetPath(FacetTrail pTrail)
pTrail
-
public java.util.List<java.lang.String> reorderCategories(java.util.List<java.lang.String> pCategoryIds)
public SearchRequest processSearchRequest(SearchRequest pSearchRequest, DynamoHttpServletRequest pDynamoRequest, java.lang.Object pCallback) throws atg.search.client.SearchClientException
processSearchRequest
in interface SearchRequestProcessor
processSearchRequest
in class FacetSearchTools
pSearchRequest
- the search request objectpDynamoRequest
- the dynamo requestpCallback
- the form handler component that called
this method
atg.search.client.SearchClientException
protected RepositoryItem getSourceItem(RepositoryItem pCategory)
pCategory
- RepositoryItem category
protected java.lang.String getSearchTestingRefineConfigName(RepositoryItem pSourceItem, java.lang.String pPrefix)
pSourceItem,
- selected categorypPrefix,
- everything before category[categoryId]
protected void addCategoryConstraint(java.lang.String pCategoryId, QueryRequest pRequest)
pCategoryId
- String category idpRequest
- QueryRequestprotected java.util.List getDerivedRefineElements(RepositoryItem pCategory)
pCategory
- RepositoryItem category to use
protected boolean isEligibleFacetValue(FacetTrail pFacetTrail, FacetValue pFacetValue)
isEligibleFacetValue
in class FacetSearchTools
pFacetTrail
- The facet trail to compare the facet value againstpFacetValue
- The facet value to check
true
if the facet value is eligible, false
otherwise.protected FacetValue convertRefineValue(RefinementFacet pRefineFacet, RefinementValue pRefineValue, boolean pIsLastValue)
FacetSearchTools
convertRefineValue
in class FacetSearchTools
pRefineFacet
- The RefinementFacet definition associated with the refinement valuepRefineValue
- The refinement value to be convertedpIsLastValue
- Indicates whether this is the last value in the list of values for this refinement.
Converts the RefinementValue object returned by the Search API to a FacetValue object
protected boolean isCategoryFacet(FacetValue pValue)
isCategoryFacet
in class FacetSearchTools
protected void removeAncestorCategoriesFromFacetValues(java.util.List<FacetValue> pFacetValuesList) throws FacetException
removeAncestorCategoriesFromFacetValues
in class FacetSearchTools
pFacetValuesList
- - this is the list of FacetValues
derived from the facet trail.
FacetException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |