Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Routing |
|
| 0.0;0 |
1 | /* | |
2 | * Copyright 2004-2008 the Seasar Foundation and the Others. | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | |
13 | * either express or implied. See the License for the specific language | |
14 | * governing permissions and limitations under the License. | |
15 | */ | |
16 | package org.seasar.cubby.routing; | |
17 | ||
18 | import java.lang.reflect.Method; | |
19 | import java.util.List; | |
20 | import java.util.regex.Pattern; | |
21 | ||
22 | import org.seasar.cubby.action.Action; | |
23 | import org.seasar.cubby.action.RequestMethod; | |
24 | ||
25 | /** | |
26 | * ルーティング。 | |
27 | * | |
28 | * @author baba | |
29 | * @since 1.1.0 | |
30 | */ | |
31 | public interface Routing { | |
32 | ||
33 | /** | |
34 | * アクションクラスを取得します。 | |
35 | * | |
36 | * @return アクションクラス | |
37 | */ | |
38 | Class<? extends Action> getActionClass(); | |
39 | ||
40 | /** | |
41 | * メソッドを取得します。 | |
42 | * | |
43 | * @return メソッド | |
44 | */ | |
45 | Method getMethod(); | |
46 | ||
47 | /** | |
48 | * アクションのパスを取得します。 | |
49 | */ | |
50 | String getActionPath(); | |
51 | ||
52 | /** | |
53 | * URI パラメータ名を取得します。 | |
54 | * | |
55 | * @return URI パラメータ名 | |
56 | */ | |
57 | List<String> getUriParameterNames(); | |
58 | ||
59 | /** | |
60 | * 正規表現パターンを取得します。 | |
61 | * | |
62 | * @return 正規表現パターン | |
63 | */ | |
64 | Pattern getPattern(); | |
65 | ||
66 | /** | |
67 | * リクエストメソッドを取得します。 | |
68 | * | |
69 | * @return リクエストメソッド | |
70 | */ | |
71 | RequestMethod getRequestMethod(); | |
72 | ||
73 | /** | |
74 | * このルーティングを使用することを判断するためのパラメータ名を取得します。 | |
75 | * | |
76 | * @return パラメータ名 | |
77 | */ | |
78 | String getOnSubmit(); | |
79 | ||
80 | /** | |
81 | * プライオリティを取得します。 | |
82 | * | |
83 | * @return プライオリティ | |
84 | */ | |
85 | int getPriority(); | |
86 | ||
87 | /** | |
88 | * 自動登録されたルーティングかを示します。 | |
89 | * | |
90 | * @return 自動登録されたルーティングの場合は <code>true</code>、そうでない場合は | |
91 | * <code>false</code> | |
92 | */ | |
93 | boolean isAuto(); | |
94 | ||
95 | /** | |
96 | * 指定されたリクエストメソッドがこのルーティングの対象かどうかを示します。 | |
97 | * | |
98 | * @param requestMethod | |
99 | * リクエストメソッド | |
100 | * @return 対象の場合は <code>true</code>、そうでない場合は <code>false</code> | |
101 | */ | |
102 | boolean isAcceptable(final String requestMethod); | |
103 | ||
104 | } |