Groupable interface
The application of an access control policy is specific to a group of resources. Resource groupings can be made based upon attributes such as the class name, the state of an order or the storeId value.
If a resource is going to be grouped by an attribute other than its class name for the purpose of applying access control policies, it must implement the com.ibm.commerce.grouping.Groupable interface.
The following code snippet represents the Groupable interface:
Groupable interface { Object getGroupingAttributeValue (String attributeName, GroupContext context) }
For example, to implement a policy that only applies to orders that are in the pending state (status = P (pending)), the remote interface of the Order entity bean implements the Groupable interface and the value for attributeName is set to "status".
Usage of the Groupable interface is rare.
Related concepts
Understanding access control
Access control interactions
Protectable interface
Groupable interface
WebSphere Commerce access control policies
Access control implications when a controller command is extended
Resource protection in WebSphere Application Server
Related tasks
Implementing access control