KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > webapp > admin > valve > ValveForm


1 /*
2  * Copyright 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.webapp.admin.valve;
18
19 import javax.servlet.http.HttpServletRequest JavaDoc;
20 import org.apache.struts.action.ActionError;
21 import org.apache.struts.action.ActionErrors;
22 import org.apache.struts.action.ActionForm;
23 import org.apache.struts.action.ActionMapping;
24 import java.net.InetAddress JavaDoc;
25 import java.util.List JavaDoc;
26
27 import org.apache.webapp.admin.ApplicationServlet;
28 import org.apache.webapp.admin.LabelValueBean;
29
30 /**
31  * Form bean for the generic valve page.
32  *
33  * @author Manveen Kaur
34  * @version $Revision: 1.4 $ $Date: 2004/02/27 14:59:06 $
35  */

36
37 public class ValveForm extends ActionForm {
38     
39     // ----------------------------------------------------- Instance Variables
40

41    /**
42      * The administrative action represented by this form.
43      */

44     private String JavaDoc adminAction = "Edit";
45
46     /**
47      * The object name of the valve this bean refers to.
48      */

49     private String JavaDoc objectName = null;
50
51     /**
52      * The text for the valve name, used to retrieve
53      * the corresponding valve mBean.
54      */

55     private String JavaDoc valveName = null;
56     
57     /**
58      * The text for the valve type.
59      */

60     private String JavaDoc valveType = null;
61         
62     /**
63      * The text for the node label.
64      */

65     private String JavaDoc nodeLabel = null;
66     
67     /**
68      * The object name of the parent of this valve.
69      */

70     private String JavaDoc parentObjectName = null;
71
72     /**
73      * Set of valid values for valves.
74      */

75     private List JavaDoc valveTypeVals = null;
76     
77     // ------------------------------------------------------------- Properties
78

79        /**
80      * Return the administrative action represented by this form.
81      */

82     public String JavaDoc getAdminAction() {
83
84         return this.adminAction;
85
86     }
87
88     /**
89      * Set the administrative action represented by this form.
90      */

91     public void setAdminAction(String JavaDoc adminAction) {
92
93         this.adminAction = adminAction;
94
95     }
96
97     /**
98      * Return the Object Name.
99      */

100     public String JavaDoc getObjectName() {
101         
102         return this.objectName;
103         
104     }
105     
106     /**
107      * Set the Object Name.
108      */

109     public void setObjectName(String JavaDoc objectName) {
110         
111         this.objectName = objectName;
112         
113     }
114     
115     /**
116      * Return the valve type.
117      */

118     public String JavaDoc getValveType() {
119         
120         return this.valveType;
121         
122     }
123     
124     /**
125      * Set the valve type.
126      */

127     public void setValveType(String JavaDoc valveType) {
128         
129         this.valveType = valveType;
130         
131     }
132     
133     /**
134      * Return the label of the node that was clicked.
135      */

136     public String JavaDoc getNodeLabel() {
137         
138         return this.nodeLabel;
139         
140     }
141     
142     /**
143      * Set the node label.
144      */

145     public void setNodeLabel(String JavaDoc nodeLabel) {
146         
147         this.nodeLabel = nodeLabel;
148         
149     }
150     
151     /**
152      * Return the parent object name of the valve this bean refers to.
153      */

154     public String JavaDoc getParentObjectName() {
155
156         return this.parentObjectName;
157
158     }
159
160
161     /**
162      * Set the parent object name of the valve this bean refers to.
163      */

164     public void setParentObjectName(String JavaDoc parentObjectName) {
165
166         this.parentObjectName = parentObjectName;
167
168     }
169     
170         
171    /**
172      * Return the valveTypeVals.
173      */

174     public List JavaDoc getValveTypeVals() {
175         
176         return this.valveTypeVals;
177         
178     }
179     
180     /**
181      * Set the valveTypeVals.
182      */

183     public void setValveTypeVals(List JavaDoc valveTypeVals) {
184         
185         this.valveTypeVals = valveTypeVals;
186         
187     }
188     
189     // --------------------------------------------------------- Public Methods
190

191     /**
192      * Reset all properties to their default values.
193      *
194      * @param mapping The mapping used to select this instance
195      * @param request The servlet request we are processing
196      */

197     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
198         
199         objectName = null;
200         
201     }
202
203 }
204
Popular Tags