Package org.ametys.plugins.cart
Class CartHelper
- java.lang.Object
 - 
- org.ametys.plugins.cart.CartHelper
 
 
- 
public final class CartHelper extends Object
Helper forCart 
- 
- 
Field Summary
Fields Modifier and Type Field Description private static String__PLUGIN_NODE_NAMEprivate static String__ROOT_CART_NODETYPE 
- 
Constructor Summary
Constructors Modifier Constructor Description privateCartHelper() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ModifiableTraversableAmetysObjectgetCartsNode(AmetysObjectResolver resolver)Get the root plugin storage object.private static ModifiableTraversableAmetysObjectgetOrCreateNode(ModifiableTraversableAmetysObject parentNode, String nodeName, String nodeType)static StringgetXPathQueryForReadAccess(UserIdentity user, Set<GroupIdentity> groups)Creates the XPath query to get all carts in READ accessstatic StringgetXPathQueryForWriteAccess(UserIdentity user, Set<GroupIdentity> groups)Creates the XPath query to get all carts in WRITE access 
 - 
 
- 
- 
Field Detail
- 
__PLUGIN_NODE_NAME
private static final String __PLUGIN_NODE_NAME
- See Also:
 - Constant Field Values
 
 
- 
__ROOT_CART_NODETYPE
private static final String __ROOT_CART_NODETYPE
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
CartHelper
private CartHelper()
 
 - 
 
- 
Method Detail
- 
getCartsNode
public static ModifiableTraversableAmetysObject getCartsNode(AmetysObjectResolver resolver) throws AmetysRepositoryException
Get the root plugin storage object.- Parameters:
 resolver- The Ametys object resolver- Returns:
 - the root plugin storage object.
 - Throws:
 AmetysRepositoryException- if a repository error occurs.
 
- 
getOrCreateNode
private static ModifiableTraversableAmetysObject getOrCreateNode(ModifiableTraversableAmetysObject parentNode, String nodeName, String nodeType) throws AmetysRepositoryException
- Throws:
 AmetysRepositoryException
 
- 
getXPathQueryForReadAccess
public static String getXPathQueryForReadAccess(UserIdentity user, Set<GroupIdentity> groups)
Creates the XPath query to get all carts in READ access- Parameters:
 user- The usergroups- The user's groups- Returns:
 - The XPath query
 
 
- 
getXPathQueryForWriteAccess
public static String getXPathQueryForWriteAccess(UserIdentity user, Set<GroupIdentity> groups)
Creates the XPath query to get all carts in WRITE access- Parameters:
 user- The usergroups- The user's groups- Returns:
 - The XPath query
 
 
 - 
 
 -