KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portlet > command > ActionCommand


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Forums JBoss Portlet *
6  * *
7  * Distributable under LGPL license. *
8  * See terms of license at gnu.org. *
9  * *
10  *****************************************/

11 package org.jboss.portlet.command;
12
13 import org.jboss.portal.common.command.Command;
14 import org.jboss.portlet.JBossActionRequest;
15 import org.jboss.portlet.JBossActionResponse;
16
17 /**
18  * A command executed during the action request of a portlet.
19  *
20  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
21  * @version $Revision: 1.1 $
22  */

23 public abstract class ActionCommand implements Command
24 {
25
26    private final JBossActionRequest request;
27    private final JBossActionResponse response;
28
29    protected ActionCommand(JBossActionRequest request, JBossActionResponse response)
30    {
31       if (request == null)
32       {
33          throw new IllegalArgumentException JavaDoc("Request cannot be null");
34       }
35       if (response == null)
36       {
37          throw new IllegalArgumentException JavaDoc("Response cannot be null");
38       }
39       this.request = request;
40       this.response = response;
41    }
42
43    public JBossActionRequest getRequest()
44    {
45       return request;
46    }
47
48    public JBossActionResponse getResponse()
49    {
50       return response;
51    }
52
53 }
54
Popular Tags