Examples of PathMatcher


Examples of org.springframework.util.PathMatcher

            return response.getOutputStream();
        }
    }

    private boolean matchesCompressedMimeTypes(String mimeType) {
        PathMatcher pathMatcher = new AntPathMatcher();
        Iterator<String> compressedMimeTypesIt = compressedMimeTypes.iterator();
        while (compressedMimeTypesIt.hasNext()) {
            String compressedMimeType = compressedMimeTypesIt.next();
            if (pathMatcher.match(compressedMimeType, mimeType)) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of org.springframework.util.PathMatcher

    private boolean isAllowed(String resourcePath) {
        if (resourcePath.matches(protectedPath)) {
            return false;
        }
        PathMatcher pathMatcher = new AntPathMatcher();
        Iterator<String> allowedResourcePathsIt = allowedResourcePaths.iterator();
        while (allowedResourcePathsIt.hasNext()) {
            String pattern = allowedResourcePathsIt.next();
            if (pathMatcher.match(pattern, resourcePath)) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of org.springframework.util.PathMatcher

            return response.getOutputStream();
        }
    }

    private boolean matchesCompressedMimeTypes(String mimeType) {
        PathMatcher pathMatcher = new AntPathMatcher();
        Iterator compressedMimeTypesIt = compressedMimeTypes.iterator();
        while (compressedMimeTypesIt.hasNext()) {
            String compressedMimeType = (String) compressedMimeTypesIt.next();
            if (pathMatcher.match(compressedMimeType, mimeType)) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of org.springframework.util.PathMatcher

    private boolean isAllowed(String resourcePath) {
        if (resourcePath.matches(protectedPath)) {
            return false;
        }
        PathMatcher pathMatcher = new AntPathMatcher();
        Iterator allowedResourcePathsIt = allowedResourcePaths.iterator();
        while (allowedResourcePathsIt.hasNext()) {
            String pattern = (String) allowedResourcePathsIt.next();
            if (pathMatcher.match(pattern, resourcePath)) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of org.springframework.util.PathMatcher

            return response.getOutputStream();
        }
    }

    private boolean matchesCompressedMimeTypes(String mimeType) {
        PathMatcher pathMatcher = new AntPathMatcher();
        Iterator compressedMimeTypesIt = compressedMimeTypes.iterator();
        while (compressedMimeTypesIt.hasNext()) {
            String compressedMimeType = (String) compressedMimeTypesIt.next();
            if (pathMatcher.match(compressedMimeType, mimeType)) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of org.springframework.util.PathMatcher

    private boolean isAllowed(String resourcePath) {
        if (resourcePath.matches(protectedPath)) {
            return false;
        }
        PathMatcher pathMatcher = new AntPathMatcher();
        Iterator allowedResourcePathsIt = allowedResourcePaths.iterator();
        while (allowedResourcePathsIt.hasNext()) {
            String pattern = (String) allowedResourcePathsIt.next();
            if (pathMatcher.match(pattern, resourcePath)) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of org.springframework.util.PathMatcher

      if (startsWithSlash) {
        pkg = FOLDER_SEPARATOR + pkg;
      }

      PathMatcher matcher = getPathMatcher();
      // if the imported package matches the path
      if (matcher.matchStart(path, pkg)) {
        // start the JAR analysis
        Enumeration entries = importedBundle.getBundle().getEntryPaths(pkg);
        while (entries != null && entries.hasMoreElements()) {
          String entry = (String) entries.nextElement();
          if (startsWithSlash)
            entry = FOLDER_SEPARATOR + entry;

          if (matcher.match(path, entry))
            foundPaths.add(entry);
        }
      }
    }
  }
View Full Code Here

Examples of org.springframework.util.PathMatcher

      return response.getOutputStream();
    }
  }

  private boolean matchesCompressedMimeTypes(String mimeType) {
    PathMatcher pathMatcher = new AntPathMatcher();
    for (String compressedMimeType : compressedMimeTypes) {
      if (pathMatcher.match(compressedMimeType, mimeType)) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

Examples of org.springframework.util.PathMatcher

  private boolean isAllowed(String resourcePath) {
    if (resourcePath.matches(protectedPath)) {
      return false;
    }
    PathMatcher pathMatcher = new AntPathMatcher();
    for (String pattern : allowedResourcePaths) {
      if (pathMatcher.match(pattern, resourcePath)) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

Examples of org.springframework.util.PathMatcher

   * Returns {@code true} if the interceptor applies to the given request path.
   * @param lookupPath the current request path
   * @param pathMatcher a path matcher for path pattern matching
   */
  public boolean matches(String lookupPath, PathMatcher pathMatcher) {
    PathMatcher pathMatcherToUse = (this.pathMatcher != null) ? this.pathMatcher : pathMatcher;
    if (this.excludePatterns != null) {
      for (String pattern : this.excludePatterns) {
        if (pathMatcherToUse.match(pattern, lookupPath)) {
          return false;
        }
      }
    }
    if (this.includePatterns == null) {
      return true;
    }
    else {
      for (String pattern : this.includePatterns) {
        if (pathMatcherToUse.match(pattern, lookupPath)) {
          return true;
        }
      }
      return false;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.