コード例 #1
0
 /**
  * Returns the permission group object matching the qualified permission name or null if the
  * permission group is not found in the known permissions list
  *
  * @param qualifiedName
  * @return
  */
 public static PermissionGroup getPermissionGroupByQualifiedName(String qualifiedName) {
   for (PermissionGroup permissionGroup : getAllPermissionGroups()) {
     if (permissionGroup.getQualifiedName().equals(qualifiedName)) {
       return permissionGroup;
     }
   }
   return null; // permission not found
 }
コード例 #2
0
 /**
  * Returns the permission group object matching the simple permission name or null if the
  * permission group is not found in the known permissions list
  *
  * @param simpleName
  * @return
  */
 public static PermissionGroup getPermissionGroupBySimpleName(String simpleName) {
   for (PermissionGroup permissionGroup : getAllPermissionGroups()) {
     if (permissionGroup.getSimpleName().equals(simpleName)) {
       return permissionGroup;
     }
   }
   return null; // permission not found
 }