|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.commerce.ebusiness.campaign.ShoppingCartAttributeLoader
A p13n request attribute loader which will load the ShoppingCart into the p13n request.
This will, by default, pull the shopping cart from the pipeline session
at a session attribute "wlcs_shoppingCart", and, if found, set it in the
p13n Request at an attribute called "wlcs_shoppingCart". The attribute
names are controlled by the getShoppingCartSetName()
,
getShoppingCartNamespace(com.bea.p13n.appflow.common.PipelineSession)
, and getShoppingCartGetNames()
method.
To use this class, register it in your application-config.xml in the following places:
getShoppingCartSetName()
(defaults to
"wlcs_shoppingCart") in <ScenarioService RulesRequestAttrNames="...">
attribute.
Field Summary | |
static java.lang.String[] |
DEF_SHOPPING_CART_GET_NAMES
The default list of names in the PipelineSession to look for the ShoppingCart. |
static java.lang.String |
DEF_SHOPPING_CART_SET_NAME
The name of the attribute to set the ShoppingCart in the p13n Request. |
static java.lang.String |
SHOPPING_CART
Deprecated. Replaced by DEF_SHOPPING_CART_SET_NAME . |
Constructor Summary | |
ShoppingCartAttributeLoader()
|
Method Summary | |
PipelineSession |
getPipelineSession(javax.servlet.http.HttpServletRequest req)
Get the PipelineSession from the http request. |
ShoppingCart |
getShoppingCart(javax.servlet.http.HttpServletRequest req)
Get the shopping cart from the http session. |
ShoppingCart |
getShoppingCart(PipelineSession pSession)
Get the shopping cart from the pipeline session. |
protected java.lang.String[] |
getShoppingCartGetNames()
Return the list of names of PipelineSession attributes to try to find the shopping cart at. |
protected java.lang.String |
getShoppingCartNamespace(PipelineSession session)
Return the PipelineSession namespace to check for the shopping cart in. |
protected java.lang.String |
getShoppingCartSetName()
Return the name of the attribute in the p13n Request to set the ShoppingCart to. |
void |
loadAttributes(Request request,
javax.servlet.http.HttpServletRequest origRequest)
Load the shopping cart from the original request to the new request. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String DEF_SHOPPING_CART_SET_NAME
Defaults to "wlcs_shoppingCart".
getShoppingCartSetName()
,
PipelineSessionConstants.SHOPPING_CART
public static final java.lang.String SHOPPING_CART
DEF_SHOPPING_CART_SET_NAME
.public static final java.lang.String[] DEF_SHOPPING_CART_GET_NAMES
Defaults to an array containing "wlcs_shoppingCart".
getShoppingCartGetNames()
Constructor Detail |
public ShoppingCartAttributeLoader()
Method Detail |
public void loadAttributes(Request request, javax.servlet.http.HttpServletRequest origRequest)
getShoppingCart(com.bea.p13n.appflow.common.PipelineSession)
protected java.lang.String getShoppingCartSetName()
Defaults to "wlcs_shoppingCart".
Subclasses can override this to return something else.
protected java.lang.String[] getShoppingCartGetNames()
This object will use the first shopping cart found.
Defaults to an array containing
Subclasses can override to return a different list of names to check.
"wlcs_shoppingCart".
protected java.lang.String getShoppingCartNamespace(PipelineSession session)
This returns the PipelineSession's default namespace, but subclasses can override this.
public PipelineSession getPipelineSession(javax.servlet.http.HttpServletRequest req)
public ShoppingCart getShoppingCart(PipelineSession pSession)
This will look through the pipeline session session attributes
defined by getShoppingCartGetNames()
in the namespace defined by
getShoppingCartNamespace(com.bea.p13n.appflow.common.PipelineSession)
and return the first ShoppingCart
found.
public ShoppingCart getShoppingCart(javax.servlet.http.HttpServletRequest req)
getPipelineSession(javax.servlet.http.HttpServletRequest)
,
getShoppingCart(com.bea.p13n.appflow.common.PipelineSession)
|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |