org.nuxeo.runtime.jboss.deployer.structure
Class PathPattern
java.lang.Object
org.nuxeo.runtime.jboss.deployer.structure.PathPattern
- Direct Known Subclasses:
- PathPattern.CompositePattern, PathPattern.ExactMatchPattern, PathPattern.PrefixPattern, PathPattern.SuffixPattern, PathPattern.WildcardPattern
public abstract class PathPattern
- extends java.lang.Object
All path p[atterns are relative to the deployment root file. Supported
patterns are:
- exact match patterns:
lib/myfile.jar
- wildcard patterns:
lib/*
, lib/*.rar
.
Note that only a single wildcard character can be used in a pattern. Also,
wildcards can be used only on file names - not on directory path segments.
Invalid patterns: dir/*file*.jar
*dir/file.jar
- Author:
- Bogdan Stefanescu
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
setNext
public void setNext(PathPattern next)
getNext
public PathPattern getNext()
isExactMatch
public boolean isExactMatch()
getPath
public java.lang.String getPath()
- Get the determined part of the path. For exact match this is the exact
file path, for wildcard match this is the exact parent path.
- Returns:
findFile
public org.jboss.virtual.VirtualFile findFile(org.jboss.virtual.VirtualFile root)
throws java.io.IOException
- Throws:
java.io.IOException
findFirstMatchingPath
public java.lang.String findFirstMatchingPath(org.jboss.virtual.VirtualFile root)
throws java.io.IOException
- Throws:
java.io.IOException
match
public boolean match(java.lang.String name)
doMatch
public abstract boolean doMatch(java.lang.String name)
- Match the name of the given path. (only name segment is matched)
- Parameters:
name
-
- Returns:
parse
public static PathPattern parse(java.lang.String pattern)
Copyright © 2010 Nuxeo SAS. All Rights Reserved.