org.apache.struts.config
public class ActionConfigMatcher extends Object implements Serializable
Since: Struts 1.2
Nested Class Summary | |
---|---|
class | ActionConfigMatcher.Mapping
Stores a compiled wildcard pattern and the ActionConfig it came from. |
Field Summary | |
---|---|
List | compiledPaths
The compiled paths and their associated ActionConfig's |
static Log | log
The logging instance |
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(String path, ActionConfig orig, Map vars)
Clones the ActionConfig and its children, replacing various properties
with the values of the wildcard-matched strings.
|
protected String | convertParam(String val, Map vars)
Inserts into a value wildcard-matched strings where specified.
|
ActionConfig | match(String path)
Matches the path against the compiled wildcard patterns.
|
Parameters: configs An array of ActionConfig's to process
Parameters: path The requested path orig The original ActionConfig vars A Map of wildcard-matched strings
Returns: A cloned ActionConfig with appropriate properties replaced with wildcard-matched values
Parameters: val The value to convert vars A Map of wildcard-matched strings
Returns: The new value
Parameters: path The portion of the request URI for selecting a config.
Returns: The action config if matched, else null