/** * * @return the full map permissions granted to entity directly or via roles */ public Map<String, Object> getFlatPermissions() { Map<String, Object> perms = new HashMap<String, Object>(permissions.size()); for (Map.Entry<String, Permission> e: permissions.entrySet()) { perms.put(e.getKey(), e.getValue().getPermissionsAsString()); } return perms; }
@ManagedAttribute(description="Returns effective Role permissions, recursivelly") public CompositeData getRecursivePermissions() { Map<String, Permission> xPerms = new HashMap<String, Permission>(); getRecursivePermissions(xPerms, entityName); Map<String, Object> pMap = new HashMap<String, Object>(xPerms.size()); for (Map.Entry<String, Permission> e: xPerms.entrySet()) { pMap.put(e.getKey(), e.getValue().getPermissionsAsString()); } return JMXUtils.mapToComposite(entityName, "permissions", pMap); }
@ManagedAttribute(description="Returns effective User permissions, recursivelly") public CompositeData getRecursivePermissions() { Map<String, Permission> xPerms = getAllPermissions(); Map<String, Object> pMap = new HashMap<String, Object>(xPerms.size()); for (Map.Entry<String, Permission> e: xPerms.entrySet()) { pMap.put(e.getKey(), e.getValue().getPermissionsAsString()); } return JMXUtils.mapToComposite(entityName, "permissions", pMap); }