use of org.apache.openejb.assembler.classic.DelegatePermissionCollection in project tomee by apache.
the class BasicPolicyConfiguration method addToRole.
public void addToRole(final String roleName, final Permission permission) throws PolicyContextException {
if (state != OPEN) {
throw new UnsupportedOperationException("Not in an open state");
}
PermissionCollection permissions = rolePermissionsMap.get(roleName);
if (permissions == null) {
permissions = new DelegatePermissionCollection();
rolePermissionsMap.put(roleName, permissions);
}
permissions.add(permission);
}
Aggregations