code: public static List<ContentPermission> getPermissions(String[] perms) {
          List<ContentPermission> permissions = null;
          if (perms != null && perms.length > 0) {
              int i = 0;
              while (i + 1 < perms.length) {
                  String roleName = perms[i++];
                  if (roleName == null || roleName.isEmpty()) {
                      LOG.error("Illegal role name: " + roleName);
                      continue;
                  }
                  String perm = perms[i].trim();
                  ContentCapability capability = getCapbility(perm);
                  if (capability != null) {
                      if (permissions == null) {
                          permissions = new ArrayList<ContentPermission>();
                      }
                      permissions
                          .add(new ContentPermission(capability, roleName));
                  }
                  i++;
              }
          }
          return permissions;
      }
docs: Get a list of ContentPermission from given string
  @param perms a string of role-name,capability pais, separated by commna
  @return