|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object org.seasar.cubby.routing.impl.PathResolverImpl
public class PathResolverImpl
クラスパスから Action
を検索し、クラス名やメソッド名、そのクラスやメソッドに指定された
Path
の情報からアクションのパスを抽出し、リクエストされたパスをどのメソッドに振り分けるかを決定します。
コンストラクタの概要 | |
---|---|
PathResolverImpl()
インスタンス化します。 |
メソッドの概要 | |
---|---|
void |
add(String actionPath,
Class<? extends Action> actionClass,
String methodName)
ルーティング情報を登録します。 |
void |
add(String actionPath,
Class<? extends Action> actionClass,
String methodName,
RequestMethod... requestMethods)
ルーティング情報を登録します。 |
String |
buildInternalForwardPath(Map<String,String[]> parameters,
String characterEncoding)
内部フォワードパスを構築します。 |
void |
dispose()
|
InternalForwardInfo |
getInternalForwardInfo(String path,
String requestMethod,
String characterEncoding)
指定されたパスとメソッドからフォワードするための情報を抽出します。 |
List<Routing> |
getRoutings()
ルーティング情報を取得します。 |
void |
initialize()
初期化します。 |
void |
processClass(String packageName,
String shortClassName)
クラスが検出された時に呼び出されるメソッドです。 |
String |
reverseLookup(Class<? extends Action> actionClass,
String methodName,
Map<String,String[]> parameters,
String characterEncoding)
指定されたアクションクラス、メソッド名、パラメータからパスを逆引きします。 |
void |
setClassDetector(ClassDetector classDetector)
クラスパスを走査してクラスを検出するクラスを設定します。 |
void |
setNamingConvention(NamingConvention namingConvention)
命名規約を設定します。 |
void |
setPathTemplateParser(PathTemplateParser pathTemplateParser)
パステンプレートのパーサーを設定します。 |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
public PathResolverImpl()
メソッドの詳細 |
---|
public List<Routing> getRoutings()
PathResolver
内の getRoutings
public void setClassDetector(ClassDetector classDetector)
classDetector
- クラスパスを走査してクラスを検出するクラスpublic void setPathTemplateParser(PathTemplateParser pathTemplateParser)
pathTemplateParser
- パステンプレートのパーサーpublic void initialize()
public void dispose()
Disposable
内の dispose
public void add(String actionPath, Class<? extends Action> actionClass, String methodName)
クラスパスを検索して自動登録されるルーティング情報以外にも、このメソッドによって手動でルーティング情報を登録できます。
actionPath
- アクションのパスactionClass
- アクションクラスmethodName
- アクションメソッド名public void add(String actionPath, Class<? extends Action> actionClass, String methodName, RequestMethod... requestMethods)
クラスパスを検索して自動登録されるルーティング情報以外にも、このメソッドによって手動でルーティング情報を登録できます。
PathResolver
内の add
actionPath
- アクションのパスactionClass
- アクションクラスmethodName
- アクションメソッド名requestMethods
- リクエストメソッド自動設定の際のプライオリティ
public InternalForwardInfo getInternalForwardInfo(String path, String requestMethod, String characterEncoding)
パスにマッチするパターンがない場合は null
を返します。
PathResolver
内の getInternalForwardInfo
path
- パスrequestMethod
- HTTPメソッドcharacterEncoding
- URI のエンコーディング
public String buildInternalForwardPath(Map<String,String[]> parameters, String characterEncoding)
PathResolver
内の buildInternalForwardPath
parameters
- パラメータcharacterEncoding
- URI のエンコーディング
public void setNamingConvention(NamingConvention namingConvention)
namingConvention
- 命名規約public String reverseLookup(Class<? extends Action> actionClass, String methodName, Map<String,String[]> parameters, String characterEncoding)
PathResolver
内の reverseLookup
actionClass
- アクションクラスmethodName
- メソッド名parameters
- パラメータcharacterEncoding
- URI のエンコーディング
public void processClass(String packageName, String shortClassName)
指定されたパッケージ名、クラス名から導出されるクラスがアクションクラスだった場合はルーティングを登録します。
DetectClassProcessor
内の processClass
packageName
- パッケージ名shortClassName
- クラス短縮名
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |