java.lang.Object
com.RuntimeCollective.permission.UserGroupPermissionRuleFactory
- public class UserGroupPermissionRuleFactory
- extends java.lang.Object
A factory for creating PermissionRules for user groups.
This implementation assumes a one-to-one mapping between group combinations
and rules. That is, for any given combination of groups, such as group ids
X, Y and Z, there is only one UserGroupPermissionRule with these groups.
The order of X, Y and Z is irrelevent.
This class was refactored, it used to support single groups only; now we support
combinations of groups.
This all reduces the number of objects we are dealing with.
- Version:
- $Id: UserGroupPermissionRuleFactory.java,v 1.7 2003/09/30 15:12:49 joe Exp $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
permissions
private static java.util.Hashtable permissions
- Maps group combination strings to UserGroupPermissionRule ids.
UserGroupPermissionRuleFactory
public UserGroupPermissionRuleFactory()
getOrCreateRule
public static com.RuntimeCollective.permission.bean.UserGroupPermissionRule getOrCreateRule(com.RuntimeCollective.webapps.bean.UserGroup group)
- Get a PermissionRule which matches one single group
getOrCreateRuleForGroupList
public static com.RuntimeCollective.permission.bean.UserGroupPermissionRule getOrCreateRuleForGroupList(java.util.List groups)
- Get a PermissionRule which matches a list of groups.
The order of the groups is irrelevent.