/**
   * Checks defined filters for view id, checks starting at the highest level down to NONE.
   *
   * @return the matching level or {@link AccessLevel#NONE} if none matching.
   */
  private AccessLevel requiredLevel(String viewId) {
    AccessLevel[] levels = AccessLevel.values();
    for (int i = levels.length - 1; i > 0; i--) {
      if (checkLevel(levels[i], viewId)) {
        return levels[i];
      }
    }

    return AccessLevel.NONE;
  }
 private void initLevels() {
   AccessLevel[] levels = AccessLevel.values();
   for (int i = 1; i < levels.length; i++) {
     levelFilters.put(levels[i], new ArrayList<UrlFilter>());
   }
 }