1 /* 2 * Copyright 2004-2009 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.RequestMethod; 23 24 /** 25 * ルーティング。 26 * 27 * @author baba 28 */ 29 public interface Routing { 30 31 /** 32 * アクションクラスを取得します。 33 * 34 * @return アクションクラス 35 */ 36 Class<?> getActionClass(); 37 38 /** 39 * アクションメソッドを取得します。 40 * 41 * @return アクションメソッド 42 */ 43 Method getActionMethod(); 44 45 /** 46 * アクションのパスを取得します。 47 * 48 * @return アクションのパス 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 * @param requestMethod 91 * 要求メソッド 92 * @return 対象の場合は <code>true</code>、そうでない場合は <code>false</code> 93 */ 94 boolean isAcceptable(final String requestMethod); 95 96 }