public interface PathMapper
PathMapper pm = new PathMapper();
pm.put("one","/");
pm.put("two","/mydir/*");
pm.put("three","*.xml");
pm.put("four","/myexactfile.html");
pm.put("five","/*\/admin/*.??ml");
String result1 = pm.get("/mydir/myfile.xml"); // returns "two";
String result2 = pm.get("/mydir/otherdir/admin/myfile.html"); // returns "five";
This was copied from Atlassian Seraph 1.0
| Modifier and Type | Method and Description |
|---|---|
String |
get(String path)
Retrieve appropriate key by matching patterns with supplied path.
|
Collection<String> |
getAll(String path)
Retrieve all mappings which match a supplied path.
|
void |
put(String key,
String pattern)
Add a key and appropriate matching pattern.
|
Copyright © 2019 Atlassian. All rights reserved.