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_NAME
private static String
__ROOT_CART_NODETYPE
-
Constructor Summary
Constructors Modifier Constructor Description private
CartHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ModifiableTraversableAmetysObject
getCartsNode(AmetysObjectResolver resolver)
Get the root plugin storage object.private static ModifiableTraversableAmetysObject
getOrCreateNode(ModifiableTraversableAmetysObject parentNode, String nodeName, String nodeType)
static String
getXPathQueryForReadAccess(UserIdentity user, Set<GroupIdentity> groups)
Creates the XPath query to get all carts in READ accessstatic String
getXPathQueryForWriteAccess(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
-
-