Object
Request.AttributeLoader
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 ShoppingCartAttributeLoader.getShoppingCartSetName()
,
ShoppingCartAttributeLoader.getShoppingCartNamespace(Object)
, and
ShoppingCartAttributeLoader.getShoppingCartGetNames()
method.
To use this class, register it in your application-config.xml in the following places:
ShoppingCartAttributeLoader.getShoppingCartSetName()
(defaults to
"wlcs_shoppingCart") in <ScenarioService RulesRequestAttrNames="...">
attribute.
Object
ShoppingCartAttributeLoader
Request.AttributeLoader
ShoppingCartAttributeLoader
Field Summary |
public static final |
|
public static final |
|
public static final |
|
Constructor Summary |
Method Summary |
public |
|
public |
|
public |
|
protected |
|
protected |
|
protected |
|
public void |
|
Methods from class java.lang. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods from interface com.bea.p13n.http. |
|
Field Detail |
public static final String
DEF_SHOPPING_CART_GET_NAMES
Defaults to an array containing "wlcs_shoppingCart".
Related Topics
public static final String
DEF_SHOPPING_CART_SET_NAME
Defaults to "wlcs_shoppingCart".
Related Topics
ShoppingCartAttributeLoader.getShoppingCartSetName()
PipelineSessionConstants.SHOPPING_CART
public static final String
SHOPPING_CART
Constructor Detail |
public ShoppingCartAttributeLoader()
Method Detail |
publicGet the PipelineSession from the http request.Object
getPipelineSession(HttpServletRequest
req)
publicGet the shopping cart from the pipeline session.Object
getShoppingCart(Object
pSession)
This will look through the pipeline session session attributes
defined by ShoppingCartAttributeLoader.getShoppingCartGetNames()
in the namespace defined by
ShoppingCartAttributeLoader.getShoppingCartNamespace(Object)
and return the first ShoppingCart
found.
publicGet the shopping cart from the http session.Object
getShoppingCart(HttpServletRequest
req)
Related Topics
ShoppingCartAttributeLoader.getPipelineSession(HttpServletRequest)
ShoppingCartAttributeLoader.getShoppingCart(Object)
protected String
[] getShoppingCartGetNames()
Return the list of names of PipelineSession attributes to try to find
the shopping cart at.
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"
.
protectedReturn the PipelineSession namespace to check for the shopping cart in.String
getShoppingCartNamespace(Object
session)
throwsException
This returns the PipelineSession's default namespace, but subclasses can override this.
Exception
protected String
getShoppingCartSetName()
Return the name of the attribute in the p13n Request to set the
ShoppingCart to.
Defaults to "wlcs_shoppingCart"
.
Subclasses can override this to return something else.
public void loadAttributes(Load the shopping cart from the original request to the new request.Request
request,HttpServletRequest
origRequest)
Related Topics