KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > modules > actions > portlets > browser > ActionParameter


1 /*
2  * Copyright 2000-2001,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
17 package org.apache.jetspeed.modules.actions.portlets.browser;
18
19 import java.io.Serializable JavaDoc;
20
21 /**
22  * Action Parameter
23  *
24  * @author <a HREF="mailto:taylor@apache.org">David Sean Taylor</a>
25  * @version $Id: ActionParameter.java,v 1.4 2004/02/23 02:51:19 jford Exp $
26  *
27 */

28 public class ActionParameter implements Serializable JavaDoc
29 {
30     String JavaDoc name;
31     String JavaDoc action;
32     String JavaDoc type;
33     String JavaDoc page;
34
35     public ActionParameter(String JavaDoc name, String JavaDoc action, String JavaDoc type)
36     {
37         this.name = name;
38         if(type.equalsIgnoreCase("psml"))
39         {
40             int index = action.indexOf("/");
41             this.page= action.substring(0, index);
42             this.action= action.substring(index+1);
43         }
44         else
45         {
46             this.action= action;
47         }
48         this.type = type;
49     }
50
51     public String JavaDoc getName()
52     {
53         return this.name;
54     }
55     public String JavaDoc getPage()
56     {
57         return this.page;
58     }
59
60     public String JavaDoc getAction()
61     {
62         return this.action;
63     }
64     public String JavaDoc getType()
65     {
66         return this.type;
67     }
68     public void setName(String JavaDoc name)
69     {
70         this.name = name;
71     }
72
73     public void setAction(String JavaDoc action)
74     {
75         this.action = action;
76     }
77     public void setType(String JavaDoc type)
78     {
79         this.type = type;
80     }
81 }
82
83
84
Popular Tags