KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > pageflow > StrutsModule


1 /*
2  * Copyright 2004 The Apache Software Foundation.
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  * $Header:$
17  */

18 package org.apache.beehive.netui.pageflow;
19
20 import javax.servlet.http.HttpServletResponse JavaDoc;
21 import javax.servlet.http.HttpServletRequest JavaDoc;
22 import javax.servlet.ServletContext JavaDoc;
23
24 /**
25  * An ActionResolver that submits actions to a Struts module.
26  *
27  * @exclude
28  */

29 public class StrutsModule
30         implements ActionResolver
31 {
32     private String JavaDoc _modulePath;
33
34     /**
35      * Construct on the given Struts module path.
36      *
37      * @param modulePath the Struts module path.
38      */

39     public StrutsModule( String JavaDoc modulePath )
40     {
41         // The path for the root module is "".
42
assert modulePath.length() == 0 || modulePath.startsWith( "/" ) : modulePath;
43         _modulePath = modulePath;
44     }
45
46     /**
47      * Get the URI for this Struts module.
48      *
49      * @return a String URI that is the Struts module path, relative to the web application root.
50      */

51     public String JavaDoc getURI()
52     {
53         return _modulePath;
54     }
55
56     public String JavaDoc getModulePath()
57     {
58         return _modulePath;
59     }
60     
61     /**
62      * Tell whether this is a {@link PageFlowController}.
63      *
64      * @return <code>false</code>.
65      */

66     public boolean isPageFlow()
67     {
68         return false;
69     }
70     
71     public void refresh( HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response )
72     {
73     }
74 }
75
Popular Tags