KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > webapp > admin > realm > RealmForm


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.realm;
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 realm page.
32  *
33  * @author Manveen Kaur
34  * @version $Revision: 1.5 $ $Date: 2004/06/28 02:14:51 $
35  */

36
37 public class RealmForm 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 realm this bean refers to.
48      */

49     private String JavaDoc objectName = null;
50     
51     /**
52      * The text for the realm type.
53      */

54     private String JavaDoc realmType = null;
55         
56     /**
57      * The text for the node label.
58      */

59     private String JavaDoc nodeLabel = null;
60     
61     /**
62      * The object name of the parent of this realm.
63      */

64     private String JavaDoc parentObjectName = null;
65         
66     /**
67      * Set of valid values for realms.
68      */

69     private List JavaDoc realmTypeVals = null;
70
71     /**
72      * The text for whether "delete this realm" operation is allowed
73      * on the realm or not.
74      */

75     private String JavaDoc allowDeletion = 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 realm type.
117      */

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

127     public void setRealmType(String JavaDoc realmType) {
128         
129         this.realmType = realmType;
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 realm 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 realm 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 realmTypeVals.
173      */

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

183     public void setRealmTypeVals(List JavaDoc realmTypeVals) {
184         
185         this.realmTypeVals = realmTypeVals;
186         
187     }
188     
189     /**
190      * Return the allow deletion value.
191      */

192     public String JavaDoc getAllowDeletion() {
193         
194         return this.allowDeletion;
195         
196     }
197     
198     /**
199      * Set the allow Deletion value.
200      */

201     public void setAllowDeletion(String JavaDoc allowDeletion) {
202         
203         this.allowDeletion = allowDeletion;
204         
205     }
206    
207     
208     // --------------------------------------------------------- Public Methods
209

210     /**
211      * Reset all properties to their default values.
212      *
213      * @param mapping The mapping used to select this instance
214      * @param request The servlet request we are processing
215      */

216     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
217         
218         objectName = null;
219         adminAction = "Edit";
220         
221     }
222
223 }
224
Popular Tags