public class Mapping extends Object implements Comparator
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SERVLET |
static int |
EXACT_PATTERN |
static int |
EXTENSION_PATTERN |
static int |
FOLDER_PATTERN |
static String |
SLASH |
static String |
STAR |
| Modifier | Constructor and Description |
|---|---|
protected |
Mapping(String mappedTo) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Object objOne,
Object objTwo)
Used to compare two url patterns.
|
static Mapping |
createFromLink(String mappedTo,
String linkName)
Factory constructor method - this turns a servlet name into a mapping element
|
static Mapping |
createFromURL(String mappedTo,
String pattern)
Factory constructor method - this parses the url pattern into pieces we can use to match
against incoming URLs.
|
String |
getLinkName() |
String |
getMappedTo() |
int |
getPatternType() |
String |
getUrlPattern() |
boolean |
match(String inputPattern,
StringBuffer servletPath,
StringBuffer pathInfo)
Try to match this pattern against the incoming url
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequalspublic static final int EXACT_PATTERN
public static final int FOLDER_PATTERN
public static final int EXTENSION_PATTERN
public static final int DEFAULT_SERVLET
public static final String STAR
public static final String SLASH
protected Mapping(String mappedTo)
public static Mapping createFromURL(String mappedTo, String pattern)
public static Mapping createFromLink(String mappedTo, String linkName)
public int getPatternType()
public String getUrlPattern()
public String getMappedTo()
public String getLinkName()
public boolean match(String inputPattern, StringBuffer servletPath, StringBuffer pathInfo)
inputPattern - The URL we want to check for a matchservletPath - An empty stringbuffer for the servletPath of a successful matchpathInfo - An empty stringbuffer for the pathInfo of a successful matchpublic int compare(Object objOne, Object objTwo)
compare in interface ComparatorCopyright © 2014. All rights reserved.