KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > modules > actions > JspAction


1 package org.apache.jetspeed.modules.actions;
2
3 /*
4  * Copyright 2001,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 // Turbine Stuff
20
import org.apache.turbine.util.RunData;
21 import org.apache.turbine.modules.screens.TemplateScreen;
22 import org.apache.turbine.modules.ActionEvent;
23
24 /**
25  * This class provides a convenience methods for Jsp Actions
26  * to use. Since this class is abstract, it should only be extended
27  * and not used directly.
28  *
29  * @author <a HREF="mailto:morciuch@apache.org">Mark ORciuch</a>
30  * @version $Id: JspAction.java,v 1.3 2004/02/23 02:59:06 jford Exp $
31  */

32 public abstract class JspAction extends ActionEvent
33 {
34
35     /**
36      * Sets up the context and then calls super.perform(); thus,
37      * subclasses don't have to worry about getting a context
38      * themselves!
39      *
40      * @param data Turbine information.
41      * @exception Exception, a generic exception.
42      */

43     protected void perform(RunData data)
44         throws Exception JavaDoc
45     {
46         super.perform(data);
47     }
48
49     /**
50      * This method is used when you want to short circuit an Action
51      * and change the template that will be executed next.
52      *
53      * @param data Turbine information.
54      * @param template The template that will be executed next.
55      */

56     public void setTemplate(RunData data, String JavaDoc template)
57     {
58         TemplateScreen.setTemplate(data, template);
59     }
60 }
61
Popular Tags