Package org.springframework.util

Examples of org.springframework.util.AntPathMatcher.match()


    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


        }
        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

        final String pattern = resourcesDefinition.getAttribute(PATTERN_ATTR);
        final AntPathMatcher matcher = new AntPathMatcher();
        FileFilter filter = new FileFilter() {
            @Override
            public boolean accept(File file) {
                return matcher.match(pattern, file.getName());
            }
        };
        List resources = new ArrayList();
        for (Iterator files = new FileIterator(dirName, filter); files.hasNext();) {
            File file = (File) files.next();
View Full Code Here

  @Override
  public boolean pathMatchesOneOfIncluded(String path, List<String> includePatterns) {
    AntPathMatcher antPathMatcher = new AntPathMatcher();
    for (String includePattern : includePatterns) {
      Assert.notNull(includePattern, "Include patterns should never be null");
      if (antPathMatcher.match(includePattern, path)) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

  }

  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

    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

    if (parent.getClassNamePattern().size() > 0) {
      AntPathMatcher matcher = new AntPathMatcher();
      matcher.setPathSeparator(".");
     
      for (ClassNamePattern pattern : parent.getClassNamePattern()) {
        if (matcher.match(pattern.getPattern(), className)) {
          boolean ok = true;
          for (String exclude : pattern.getExclude()) {
            if (matcher.match(exclude, className)) {
              ok = false;
            }
View Full Code Here

     
      for (ClassNamePattern pattern : parent.getClassNamePattern()) {
        if (matcher.match(pattern.getPattern(), className)) {
          boolean ok = true;
          for (String exclude : pattern.getExclude()) {
            if (matcher.match(exclude, className)) {
              ok = false;
            }
          }
          if (ok) {
            return pattern;
View Full Code Here

                    try {
                        Enumeration<? extends ZipEntry> entryEnum = zipFile.entries();
                        while (entryEnum.hasMoreElements()) {
                            ZipEntry zipEntry = entryEnum.nextElement();
                            for (String pattern : wiringPathPatterns) {
                                if (matcher.match(pattern, zipEntry.getName())) {
                                    foundAtLeastOneWiring = true;
                                    log.info("Reading " + zipEntry.getName() + " from " + artifact.getFile());
                                    Set<Artifact> moduleArtifacts = getModuleArtifactsFromLilyRuntimeConfig(
                                            zipFile.getInputStream(zipEntry), zipEntry.getName(), remoteRepos);
View Full Code Here

    }

    public final boolean canAnalyse(String artefactName) {
        AntPathMatcher matcher = new AntPathMatcher();
        for (String contextPath : this.contextPaths) {
            if (matcher.match(contextPath, artefactName)) {
                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.