|
|||||||||
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.nucleus.TimedOperationService atg.nucleus.servlet.ServletService atg.nucleus.servlet.HttpServletService atg.servlet.DynamoServlet atg.repository.search.refinement.FacetTrailDroplet atg.commerce.search.refinement.CommerceFacetTrailDroplet
public class CommerceFacetTrailDroplet
Droplet class that provides a means of creating a FacetTrail bean object.
The droplet uses request parameters or url query parameters to create facet trail elements. Facet trail elements consist of the FacetValue objects and the current sort option. The parameters provided to the droplet may also add or remove facets from the trail.
If a parameter isn't specifically set then the droplet will check for it as a query parameter in the http request. Only the 'trail' parameter is mandatory and must either be set as a droplet parameter or else be present in the http request as a query parameter.
The query parameter names are configurable through the droplet's properties file however the droplet input parameter names are fixed.
Facet / Facet Value pairs are specified in a parameter string with a configurable separator (defaults to ':').
Here's an example. Here the user has selected facets for a 32" LCD Television costing $200-$300. In addition the user has just clicked to add a Panasonic brand facet value.
trail=1:cat444323:1:cat33222:2:200-300:45:32
addFacet=32:Panasonic
This example presumes the following refinement elements:
1 = Category.
2 = Price.
45 = Screen Size.
32 = Brand.
And the following categories exist:
cat444323 = Televisions.
cat33222 = LCD Televisions.
If a category facet value is removed from the trail then all sub categories are also removed. In addition any category specific facet values that no longer apply are also removed.
So heres a modified version of the example above where the user has now selected to remove the
Television category from the trail:
trail=1:cat444323:1:cat33222:2:200-300:45:32:32:Panasonic
removeFacet=1:cat444323
The resulting trail will be:
trail=2:200-300:32:Panasonic
i.e. The LCD sub category was removed and also the dependant category specific facet screen size.
Heres an alternative version of the example above where the user has selected to remove the
LCD category from the trail:
trail=1:cat444323:1:cat33222:2:200-300:45:32:32:Panasonic
removeFacet=1:cat33222
The resulting trail will be:
trail=1:cat444323:2:200-300:45:32:32:Panasonic
i.e. Only the LCD category was removed. The screen size facet remains because it still applies to the Television category.
Here are the input parameters (These can also be passed as http request query parameters):
trail | (Mandatory) String trail of facet/facet value pairs. |
refineConfig | The refineConfig repository item to use for querying ES for this trail. |
addFacet | String facet/facet value pairs to add to the trail. |
removeFacet | String facet/facet value pairs to remove from the trail. |
removeAllFacets | If set to "true" then the trail is cleared. |
removeFacetType | A refinement element repository item id that causes the removal of all facet values with this facet. |
There are 2 output parameters:
facetTrail | FacetTrail bean generated from the parameters. |
errorMessage | String error message if an error occurs creating the FacetTrail bean. |
There are 2 open parameters:
output | Serviced if there are no problems creating the FacetTrail bean. |
error | Serviced for any errors creating the FacetTrail bean. |
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.repository.search.refinement.FacetTrailDroplet |
---|
S_ADD_FACET, S_ERROR, S_ERROR_MESSAGE, S_FACET_TRAIL, S_OUTPUT, S_REFINE_CONFIG, S_REMOVE_ALL_FACETS, S_REMOVE_FACET, S_REMOVE_FACET_TYPE, S_TRAIL |
Fields inherited from class atg.servlet.DynamoServlet |
---|
mAllowCleanupRequest, mParameters |
Fields inherited from class atg.nucleus.servlet.ServletService |
---|
SERVLET_INFO_KEY |
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 | |
---|---|
CommerceFacetTrailDroplet()
|
Method Summary | |
---|---|
CommerceFacetTrailTools |
getCommerceFacetTrailTools()
|
FacetTrailTools |
getFacetTrailTools()
get the facet trail tools |
protected RefinementConfiguration |
getRefinementConfiguration(DynamoHttpServletRequest pRequest,
FacetTrailTools.FacetTrailElements pFacetTrailElements)
|
void |
setCommerceFacetTrailTools(CommerceFacetTrailTools pCommerceFacetTrailTools)
|
Methods inherited from class atg.repository.search.refinement.FacetTrailDroplet |
---|
getAddFacet, getRemoveAllFacets, getRemoveFacet, getRemoveFacetType, getSortBy, getTrail, service, setFacetTrailTools |
Methods inherited from class atg.servlet.DynamoServlet |
---|
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter |
Methods inherited from class atg.nucleus.servlet.ServletService |
---|
destroy, getServletConfig, getServletInfo, init, setServletInfo |
Methods inherited from class atg.nucleus.TimedOperationService |
---|
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics |
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 CommerceFacetTrailDroplet()
Method Detail |
---|
public void setCommerceFacetTrailTools(CommerceFacetTrailTools pCommerceFacetTrailTools)
public CommerceFacetTrailTools getCommerceFacetTrailTools()
public FacetTrailTools getFacetTrailTools()
getFacetTrailTools
in class FacetTrailDroplet
protected RefinementConfiguration getRefinementConfiguration(DynamoHttpServletRequest pRequest, FacetTrailTools.FacetTrailElements pFacetTrailElements) throws FacetException
getRefinementConfiguration
in class FacetTrailDroplet
FacetException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |