| java.lang.Object org.apache.struts.config.ActionConfigMatcher
ActionConfigMatcher | public class ActionConfigMatcher implements Serializable(Code) | | Matches paths against pre-compiled wildcard expressions pulled from
action configs. It uses the wildcard matcher from the Apache Cocoon
project. Patterns will be matched in the order they exist in the Struts
config file. The last match wins, so more specific patterns should be
defined after less specific patterns.
since: Struts 1.2 |
Constructor Summary | |
public | ActionConfigMatcher(ActionConfig[] configs) Finds and precompiles the wildcard patterns from the ActionConfig
"path" attributes. |
ActionConfigMatcher | public ActionConfigMatcher(ActionConfig[] configs)(Code) | | Finds and precompiles the wildcard patterns from the ActionConfig
"path" attributes. ActionConfig's will be evaluated in the order they
exist in the Struts config file. Only paths that actually contain a
wildcard will be compiled.
Parameters: configs - An array of ActionConfig's to process |
convertActionConfig | protected ActionConfig convertActionConfig(String path, ActionConfig orig, Map vars)(Code) | | Clones the ActionConfig and its children, replacing various
properties with the values of the wildcard-matched strings.
Parameters: path - The requested path Parameters: orig - The original ActionConfig Parameters: vars - A Map of wildcard-matched strings A cloned ActionConfig with appropriate properties replaced withwildcard-matched values |
convertParam | protected String convertParam(String val, Map vars)(Code) | | Inserts into a value wildcard-matched strings where specified.
Parameters: val - The value to convert Parameters: vars - A Map of wildcard-matched strings The new value |
match | public ActionConfig match(String path)(Code) | | Matches the path against the compiled wildcard patterns.
Parameters: path - The portion of the request URI for selecting a config. The action config if matched, else null |
replaceProperties | protected void replaceProperties(Properties orig, Properties props, Map vars)(Code) | | Replaces placeholders from one Properties values set to another.
Parameters: orig - The original properties set with placehold values Parameters: props - The target properties to store the processed values Parameters: vars - A Map of wildcard-matched strings |
|
|