01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.portals.gems.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 516448 2007-03-09 16:25:47Z ate $
26: *
27: */
28: public class ActionParameter implements Serializable {
29: private static final long serialVersionUID = 1;
30:
31: String name;
32:
33: String action;
34:
35: String type;
36:
37: String page;
38:
39: public ActionParameter(String name, String action, String type) {
40: this .name = name;
41: if (type.equalsIgnoreCase("psml")) {
42: int index = action.indexOf("/");
43: this .page = action.substring(0, index);
44: this .action = action.substring(index + 1);
45: } else {
46: this .action = action;
47: }
48: this .type = type;
49: }
50:
51: public String getName() {
52: return this .name;
53: }
54:
55: public String getPage() {
56: return this .page;
57: }
58:
59: public String getAction() {
60: return this .action;
61: }
62:
63: public String getType() {
64: return this .type;
65: }
66:
67: public void setName(String name) {
68: this .name = name;
69: }
70:
71: public void setAction(String action) {
72: this .action = action;
73: }
74:
75: public void setType(String type) {
76: this.type = type;
77: }
78:
79: }
|