|
|||||||||
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
public class FacetSearchTools
Processor for search requests to handle refinements. This component will amend the search request to add refinement properties and constraints.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
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 | |
---|---|
FacetSearchTools()
Constructs an instanceof FacetSearchTools |
Method Summary | |
---|---|
protected boolean |
containsConstraint(DocumentSetConstraint pConstraint,
ConstraintsGroup pGroup)
test to see if a given constraint exists in a constraint group |
protected FacetValue |
convertRefineValue(RefinementFacet pRefineFacet,
RefinementValue pRefineValue,
boolean pIsLastValue)
Converts a RefinementValue object to a FacetValue object |
protected DocumentSetConstraint |
createConstraint(java.lang.String pCatalogId,
java.lang.String pFormat)
|
protected DocumentSetConstraint |
createConstraints(java.lang.String[] pCatalogIds,
java.lang.String pFormat,
BooleanExpressionType pBooleanExpressionType)
|
DocumentSetConstraint |
createDocSetConstraint(java.lang.String pDocSetPath,
QueryRequest pRequest)
create the docset constraint from the facet trail |
DocumentSetConstraint |
createFacetDocSetConstraint(FacetTrail pTrail)
create the docset constrain using the facet trail and any additional constraints |
DocumentSetConstraint |
createFacetDocSetConstraint(FacetTrail pTrail,
boolean pIsCatNav)
create the docset constrain using the facet trail and any additional constraints |
FacetTrail |
createFacetTrail(java.lang.String pTrailString)
create a facet trail with no refine config |
FacetTrail |
createFacetTrail(java.lang.String pTrailString,
RefinementConfiguration pRefineConfig)
turn a facet trail string into a facet trail object |
FacetTrail |
createFacetTrail(java.lang.String pTrailString,
RepositoryItem pRefineConfig)
create a facet trail with a refinement configuration object |
QueryRequest |
createQueryRequest()
create a new query request with default values set |
atg.search.client.SearchSession |
createSession()
create a session |
java.lang.String |
determineCommerceRefineConfigName(FacetTrail pTrail,
QueryRequest pRequest)
determineCommerceRefineConfigName |
java.lang.String |
determineDocSetPath(FacetTrail pTrail,
QueryRequest pRequest)
get the docset path to use for a category navigation query |
java.lang.String |
determineQuestionText(FacetTrail pTrail,
QueryRequest pRequest)
get the question text for the query request |
java.lang.String |
determineRefineConfigMap(FacetTrail pTrail,
QueryRequest pRequest)
get the refine config map property name |
java.lang.String |
determineRefineConfigName(FacetTrail pTrail,
QueryRequest pRequest)
determine the refine config name |
protected java.lang.String |
escapeAsterisk(java.lang.String pString)
remove asterisks from range values |
java.lang.String[] |
getAdditionalConstraints()
get any additional constraints |
FacetHolder[] |
getAllFacets()
This method gets the array of all facets INCLUDING ineligible ones returned by the search engine. |
protected FacetTrail |
getCurrentFacetTrail(DynamoHttpServletRequest pDynamoRequest,
java.lang.Object pCallback)
get the current facet trail |
int |
getDefaultFacetPriority()
|
FacetManager |
getFacetManager()
|
FacetHolder[] |
getFacets()
This method gets the array of eligible facets ordered by facet priority. |
java.lang.String |
getFacetTrail()
|
FacetTrailTools |
getFacetTrailTools()
|
long |
getMinMatchingDocsCount()
get MinMatchingDocsCount |
QueryRequest |
getQueryRequest()
|
java.lang.String |
getRedirect(SearchResponse pSearchResponse)
if a redirect is required, get the url to redirect to |
java.lang.String |
getRefineConfig()
|
RefineConfigXMLGenerator |
getRefineConfigXMLGenerator()
|
SearchClient |
getSearchClient()
|
SearchRequest |
getSearchRequest()
|
boolean |
getTestingMode()
|
boolean |
handleAutoRedirect(SearchResponse pSearchResponse,
DynamoHttpServletRequest pDynamoRequest,
java.lang.Object pCallback)
process redirect |
protected boolean |
isCategoryFacet(FacetValue pValue)
test to see if a given facet value is actually a category facet value. |
protected boolean |
isEligibleFacetValue(FacetTrail pFacetTrail,
FacetValue pFacetValue)
Determines whether the given facet value is eligible for inclusion in the list of facet values. |
boolean |
isIncludeOverflowAndUnderflowRangeValues()
|
boolean |
isSkipValuesAlreadyInTrail()
|
ConstraintsGroup |
mergeConstraints(ConstraintsGroup pNewConstraints,
DocumentSetConstraint pOldConstraints)
merge old and new constraints |
QueryRequest |
processFacetTrail(FacetTrail pTrail,
QueryRequest pRequest)
process a facet trail into the query request |
QueryRequest |
processFacetTrail(FacetTrail pTrail,
QueryRequest pRequest,
boolean pIsCategoryNavigation)
process a facet trail into the query request |
SearchRequest |
processSearchRequest(SearchRequest pSearchRequest,
DynamoHttpServletRequest pDynamoRequest,
java.lang.Object pCallback)
process search request |
SearchResponse |
processSearchResponse(SearchResponse pSearchResponse,
DynamoHttpServletRequest pDynamoRequest,
java.lang.Object pCallback)
process search response |
protected void |
removeAncestorCategoriesFromFacetValues(java.util.List<FacetValue> facetValuesList)
|
QueryRequest.Response |
search(FacetTrail pTrail)
perform a search and all the steps involved with setting up the search |
QueryRequest.Response |
search(QueryRequest pRequest,
atg.search.client.SearchSession pSession)
perform just a search, assumes a prepared QueryRequest with all the facet work already done |
QueryRequest.Response |
search(java.lang.String pTrailString)
perform a search with a facet trial string |
void |
setAllFacets(FacetHolder[] pAllFacets)
|
void |
setDefaultFacetPriority(int pDefaultFacetPriority)
|
void |
setFacetManager(FacetManager pFacetManager)
|
void |
setFacets(FacetHolder[] pFacets)
|
void |
setFacetTrail(java.lang.String pFacetTrail)
|
void |
setFacetTrailTools(FacetTrailTools pFacetTrailTools)
|
void |
setIncludeOverflowAndUnderflowRangeValues(boolean pIncludeOverflowAndUnderflowRangeValues)
|
void |
setMinMatchingDocsCount(long pMinMatchingDocsCount)
set MinMatchingDocsCount |
void |
setQueryRequest(QueryRequest pQueryRequest)
|
void |
setRefineConfig(java.lang.String pRefineConfig)
|
void |
setRefineConfigXMLGenerator(RefineConfigXMLGenerator pRefineConfigXMLGenerator)
|
void |
setSearchClient(SearchClient pSearchClient)
|
void |
setSearchRequest(SearchRequest pSearchRequest)
|
void |
setSkipValuesAlreadyInTrail(boolean pSkipValuesAlreadyInTrail)
|
void |
setTestingMode(boolean pTestingMode)
|
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
Constructor Detail |
---|
public FacetSearchTools()
Method Detail |
---|
public void setFacetManager(FacetManager pFacetManager)
public FacetManager getFacetManager()
public void setSearchClient(SearchClient pSearchClient)
public SearchClient getSearchClient()
public void setFacetTrailTools(FacetTrailTools pFacetTrailTools)
public FacetTrailTools getFacetTrailTools()
public void setQueryRequest(QueryRequest pQueryRequest)
public QueryRequest getQueryRequest()
public void setSearchRequest(SearchRequest pSearchRequest)
public SearchRequest getSearchRequest()
public void setFacets(FacetHolder[] pFacets)
public FacetHolder[] getFacets()
public void setAllFacets(FacetHolder[] pAllFacets)
public FacetHolder[] getAllFacets()
public void setSkipValuesAlreadyInTrail(boolean pSkipValuesAlreadyInTrail)
public boolean isSkipValuesAlreadyInTrail()
public void setDefaultFacetPriority(int pDefaultFacetPriority)
public int getDefaultFacetPriority()
public void setFacetTrail(java.lang.String pFacetTrail)
public java.lang.String getFacetTrail()
public void setRefineConfig(java.lang.String pRefineConfig)
public java.lang.String getRefineConfig()
public void setTestingMode(boolean pTestingMode)
public boolean getTestingMode()
public void setRefineConfigXMLGenerator(RefineConfigXMLGenerator pRefineConfigXMLGenerator)
public RefineConfigXMLGenerator getRefineConfigXMLGenerator()
public void setIncludeOverflowAndUnderflowRangeValues(boolean pIncludeOverflowAndUnderflowRangeValues)
public boolean isIncludeOverflowAndUnderflowRangeValues()
public void setMinMatchingDocsCount(long pMinMatchingDocsCount)
pMinMatchingDocsCount
- the MinMatchingDocsCountpublic long getMinMatchingDocsCount()
public atg.search.client.SearchSession createSession() throws FacetException
FacetException
public FacetTrail createFacetTrail(java.lang.String pTrailString) throws FacetException
FacetException
public FacetTrail createFacetTrail(java.lang.String pTrailString, RepositoryItem pRefineConfig) throws FacetException
FacetException
public FacetTrail createFacetTrail(java.lang.String pTrailString, RefinementConfiguration pRefineConfig) throws FacetException
FacetException
public QueryRequest processFacetTrail(FacetTrail pTrail, QueryRequest pRequest)
public QueryRequest processFacetTrail(FacetTrail pTrail, QueryRequest pRequest, boolean pIsCategoryNavigation)
public QueryRequest createQueryRequest()
public java.lang.String determineRefineConfigName(FacetTrail pTrail, QueryRequest pRequest)
public java.lang.String determineCommerceRefineConfigName(FacetTrail pTrail, QueryRequest pRequest)
public java.lang.String determineRefineConfigMap(FacetTrail pTrail, QueryRequest pRequest)
public java.lang.String determineQuestionText(FacetTrail pTrail, QueryRequest pRequest)
public java.lang.String determineDocSetPath(FacetTrail pTrail, QueryRequest pRequest)
public DocumentSetConstraint createDocSetConstraint(java.lang.String pDocSetPath, QueryRequest pRequest)
public ConstraintsGroup mergeConstraints(ConstraintsGroup pNewConstraints, DocumentSetConstraint pOldConstraints)
protected boolean containsConstraint(DocumentSetConstraint pConstraint, ConstraintsGroup pGroup)
public DocumentSetConstraint createFacetDocSetConstraint(FacetTrail pTrail)
public DocumentSetConstraint createFacetDocSetConstraint(FacetTrail pTrail, boolean pIsCatNav)
protected void removeAncestorCategoriesFromFacetValues(java.util.List<FacetValue> facetValuesList) throws FacetException
facetValuesList
-
FacetException
protected DocumentSetConstraint createConstraint(java.lang.String pCatalogId, java.lang.String pFormat)
pCatalogId
- pFormat
-
protected DocumentSetConstraint createConstraints(java.lang.String[] pCatalogIds, java.lang.String pFormat, BooleanExpressionType pBooleanExpressionType)
pCatalogIds
- pFormat
- pBooleanExpressionType
-
protected boolean isCategoryFacet(FacetValue pValue)
public java.lang.String[] getAdditionalConstraints()
public QueryRequest.Response search(FacetTrail pTrail) throws FacetException
FacetException
public QueryRequest.Response search(java.lang.String pTrailString) throws FacetException
FacetException
public QueryRequest.Response search(QueryRequest pRequest, atg.search.client.SearchSession pSession) throws atg.search.client.SearchClientException
atg.search.client.SearchClientException
protected java.lang.String escapeAsterisk(java.lang.String pString)
protected FacetTrail getCurrentFacetTrail(DynamoHttpServletRequest pDynamoRequest, java.lang.Object pCallback) throws FacetException
FacetException
public SearchRequest processSearchRequest(SearchRequest pSearchRequest, DynamoHttpServletRequest pDynamoRequest, java.lang.Object pCallback) throws atg.search.client.SearchClientException
processSearchRequest
in interface SearchRequestProcessor
pSearchRequest
- the search request objectpDynamoRequest
- the dynamo requestpCallback
- the form handler component that called
this method
atg.search.client.SearchClientException
public SearchResponse processSearchResponse(SearchResponse pSearchResponse, DynamoHttpServletRequest pDynamoRequest, java.lang.Object pCallback) throws atg.search.client.SearchClientException
processSearchResponse
in interface SearchResponseProcessor
pSearchResponse
- the search response objectpDynamoRequest
- the dynamo requestpCallback
- the form handler component that called
this method
atg.search.client.SearchClientException
public boolean handleAutoRedirect(SearchResponse pSearchResponse, DynamoHttpServletRequest pDynamoRequest, java.lang.Object pCallback) throws atg.search.client.SearchClientException
handleAutoRedirect
in interface SearchRedirectProcessor
pSearchResponse
- the search response objectpDynamoRequest
- the dynamo requestpCallback
- the form handler component that called
this method
atg.search.client.SearchClientException
public java.lang.String getRedirect(SearchResponse pSearchResponse)
SearchRedirectProcessor
getRedirect
in interface SearchRedirectProcessor
pSearchResponse
-
protected FacetValue convertRefineValue(RefinementFacet pRefineFacet, RefinementValue pRefineValue, boolean pIsLastValue)
pRefineFacet
- The RefinementFacet associated with the refinement valuepRefineValue
- The RefinementValue object to be convertedpIsLastValue
- Indicates whether the refinement value is the last in the list
protected boolean isEligibleFacetValue(FacetTrail pFacetTrail, FacetValue pFacetValue)
pFacetTrail
- The facet trail to compare the facet value againstpFacetValue
- The facet value to check
true
if the facet value is eligible, false
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |