org.apache.struts.config
public class ActionConfigMatcher extends java.lang.Object implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
private class |
ActionConfigMatcher.Mapping
Stores a compiled wildcard pattern and the ActionConfig it came from.
|
Modifier and Type | Field and Description |
---|---|
private java.util.List |
compiledPaths
The compiled paths and their associated ActionConfig's
|
private static org.apache.commons.logging.Log |
log
The logging instance
|
private static WildcardHelper |
wildcard
Handles all wildcard pattern matching.
|
Constructor and Description |
---|
ActionConfigMatcher(ActionConfig[] configs)
Finds and precompiles the wildcard patterns from the ActionConfig
"path" attributes.
|
Modifier and Type | Method and Description |
---|---|
protected ActionConfig |
convertActionConfig(java.lang.String path,
ActionConfig orig,
java.util.Map vars)
Clones the ActionConfig and its children, replacing various properties
with the values of the wildcard-matched strings.
|
protected java.lang.String |
convertParam(java.lang.String val,
java.util.Map vars)
Inserts into a value wildcard-matched strings where specified.
|
ActionConfig |
match(java.lang.String path)
Matches the path against the compiled wildcard patterns.
|
private static final org.apache.commons.logging.Log log
private static final WildcardHelper wildcard
private java.util.List compiledPaths
public ActionConfigMatcher(ActionConfig[] configs)
configs
- An array of ActionConfig's to processpublic ActionConfig match(java.lang.String path)
path
- The portion of the request URI for selecting a config.protected ActionConfig convertActionConfig(java.lang.String path, ActionConfig orig, java.util.Map vars)
path
- The requested pathorig
- The original ActionConfigvars
- A Map of wildcard-matched stringsprotected java.lang.String convertParam(java.lang.String val, java.util.Map vars)
val
- The value to convertvars
- A Map of wildcard-matched stringsCopyright ? 2000-2014 - The Apache Software Foundation