View Javadoc

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;
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
29  {
30      String name;
31      String action;
32      String type;
33      String page;
34  
35      public ActionParameter(String name, String action, String 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 getName()
52      {
53          return this.name;
54      }
55      public String getPage()
56      {
57          return this.page;
58      }
59  
60      public String getAction()
61      {
62          return this.action;
63      }
64      public String getType()
65      {
66          return this.type;
67      }
68      public void setName(String name)
69      {
70          this.name =  name;
71      }
72  
73      public void setAction(String action)
74      {
75          this.action = action;
76      }
77      public void setType(String type)
78      {
79          this.type = type;
80      }
81  }
82  
83