KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > velocity > demo > action > Command


1 package org.apache.velocity.demo.action;
2
3 /*
4  * Copyright 1999,2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 // Java Stuff
20
import javax.servlet.http.HttpServlet JavaDoc;
21 import javax.servlet.http.HttpServletRequest JavaDoc;
22 import javax.servlet.http.HttpServletResponse JavaDoc;
23
24 // Velocity stuff
25
import org.apache.velocity.context.Context;
26
27 /**
28  * Base class for commands
29  *
30  * @author <a HREF="mailto:daveb@miceda-data.com">Dave Bryson</a>
31  * @version $Revision: 1.2.14.1 $
32  * $Id: Command.java,v 1.2.14.1 2004/03/04 00:18:29 geirm Exp $
33  */

34 public abstract class Command
35 {
36     protected HttpServletRequest JavaDoc request = null;
37     protected HttpServletResponse JavaDoc response = null;
38     
39     /**
40      * Constructor
41      */

42     public Command( HttpServletRequest JavaDoc req, HttpServletResponse JavaDoc resp )
43     {
44         this.request=req;
45         this.response=resp;
46     }
47     
48     /**
49      * Implemented by classes that extends this class
50      *
51      * @param the context
52      * @return the name of the template to execute
53      */

54     public abstract String JavaDoc exec( Context context );
55 }
56
57
Popular Tags