|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.struts.config.ActionConfigMatcher
public class ActionConfigMatcher
Matches paths against pre-compiled wildcard expressions pulled from action configs. It uses the wildcard matcher from the Apache Cocoon project.
| Nested Class Summary | |
|---|---|
private class |
ActionConfigMatcher.Mapping
Stores a compiled wildcard pattern and the ActionConfig it came from. |
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
ActionConfigMatcher(ActionConfig[] configs)
Finds and precompiles the wildcard patterns from the ActionConfig "path" attributes. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final org.apache.commons.logging.Log log
private static final WildcardHelper wildcard
private java.util.List compiledPaths
| Constructor Detail |
|---|
public ActionConfigMatcher(ActionConfig[] configs)
configs - An array of ActionConfig's to process| Method Detail |
|---|
public 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 strings
protected java.lang.String convertParam(java.lang.String val,
java.util.Map vars)
val - The value to convertvars - A Map of wildcard-matched strings
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||