UserSetManager userSetMgr = new UserSetManager(locale, session);
permissionMgr.setAnonymousPermissions(entry, anonymousPermissions.toArray(new Long[0]));
for (Iterator<Map.Entry<Long, Set<Long>>> iter = rolePermissions.entrySet().iterator(); iter.hasNext();) {
Map.Entry<Long, Set<Long>> element = iter.next();
Role role = userMgr.getRole(element.getKey());
permissionMgr.setRolePermissions(entry, role, element.getValue().toArray(new Long[0]));
}
for (Iterator<Map.Entry<Long, Set<Long>>> iter = userSetPermissions.entrySet().iterator(); iter.hasNext();) {
Map.Entry<Long, Set<Long>> element = iter.next();
UserSet userSet = userSetMgr.getUserSet(element.getKey());