org.n52.security.common.util
Class PathWildcardMatcher

java.lang.Object
  extended by org.n52.security.common.util.PathWildcardMatcher

public class PathWildcardMatcher
extends Object

The PathWildCardMatch function works like the ant path filter expressions.

Example: /path/'*'/file matches /path//file
/path/'**'/file matches /path//file or /path///file

The match function works case insensitive.

Author:
Marko Reiprecht

Constructor Summary
PathWildcardMatcher(String wildCardString, boolean caseInsensitive)
           
 
Method Summary
protected  Pattern buildPattern(String wildCardString, boolean caseInsensitive)
           
 Pattern getWildcardPattern()
           
 boolean matches(String testString)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PathWildcardMatcher

public PathWildcardMatcher(String wildCardString,
                           boolean caseInsensitive)
Method Detail

getWildcardPattern

public Pattern getWildcardPattern()
Returns:
the wildcardPattern

matches

public boolean matches(String testString)

buildPattern

protected Pattern buildPattern(String wildCardString,
                               boolean caseInsensitive)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004–2013 52north.org. All rights reserved.