org.apache.struts.config
クラス ActionConfigMatcher

java.lang.Object
  拡張org.apache.struts.config.ActionConfigMatcher
すべての実装インタフェース:
java.io.Serializable

public class ActionConfigMatcher
extends java.lang.Object
implements java.io.Serializable

Matches paths against pre-compiled wildcard expressions pulled from action configs. It uses the wildcard matcher from the Apache Cocoon project.

導入されたバージョン:
Struts 1.2
関連項目:
直列化された形式

入れ子クラスの概要
private  class ActionConfigMatcher.Mapping
          Stores a compiled wildcard pattern and the ActionConfig it came from.
 
フィールドの概要
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.
 
コンストラクタの概要
ActionConfigMatcher(ActionConfig[] configs)
          Finds and precompiles the wildcard patterns from the ActionConfig "path" attributes.
 
メソッドの概要
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.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

log

private static final org.apache.commons.logging.Log log
The logging instance


wildcard

private static final WildcardHelper wildcard
Handles all wildcard pattern matching.


compiledPaths

private java.util.List compiledPaths
The compiled paths and their associated ActionConfig's

コンストラクタの詳細

ActionConfigMatcher

public ActionConfigMatcher(ActionConfig[] configs)
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.

パラメータ:
configs - An array of ActionConfig's to process
メソッドの詳細

match

public ActionConfig match(java.lang.String path)
Matches the path against the compiled wildcard patterns.

パラメータ:
path - The portion of the request URI for selecting a config.
戻り値:
The action config if matched, else null

convertActionConfig

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.

パラメータ:
path - The requested path
orig - The original ActionConfig
vars - A Map of wildcard-matched strings
戻り値:
A cloned ActionConfig with appropriate properties replaced with wildcard-matched values

convertParam

protected java.lang.String convertParam(java.lang.String val,
                                        java.util.Map vars)
Inserts into a value wildcard-matched strings where specified.

パラメータ:
val - The value to convert
vars - A Map of wildcard-matched strings
戻り値:
The new value


このドキュメントは、Ja-Jakartaにより訳されました。コメントがある場合は、report@jajakarta.orgまでお願いします。
Copyright (C) 2000-2004 - Apache Software Foundation