1 /*--------------------------------------------------------------------------
2 * Copyright 2008 utgenome.org
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, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *--------------------------------------------------------------------------*/
16 //--------------------------------------
17 // utgb-core Project
18 //
19 // RequestHandlerTable.java
20 // Since: 2008/08/01
21 //
22 // $URL$
23 // $Author$
24 //--------------------------------------
25 package org.utgenome.gwt.utgb.server;
26
27 import java.util.ArrayList;
28
29 /**
30 * {@link RequestHandlerTable} holds a set of {@link RequestHandler}s and
31 * provides a search function to find a request handler that matches the given
32 * web request.
33 *
34 * When the request URL is "refseq/human/hg18/list.json", and
35 * there is an action handler, refseq.list,
36 *
37 * <li>actionHandlername = "refseq.list"
38 * <li>actionSuffix = "json"
39 * <li>actionPrefix = ""
40 * <li>actionContext = "human/hg18"
41 *
42 * @author leo
43 *
44 */
45 public class RequestHandlerTable {
46
47
48
49 public RequestHandlerTable() {
50
51 }
52
53 /**
54 *
55 * @param handlerName dot-separated handler name (e.g. admin.login, list, etc.). Dot is optional.
56 * @param handlerClass
57 */
58 public void add(String handlerName, Class<RequestHandler> handlerClass)
59 {
60 ArrayList<String> list = new ArrayList<String>();
61 list.add("");
62
63 }
64
65 public RequestHandler findHandler(String relativeActionURL)
66 {
67 return null;
68 }
69
70 }
71
72
73
74