KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > webapp > admin > resources > BaseForm


1 /*
2  * Copyright 2002,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.resources;
18
19
20 import javax.management.ObjectName JavaDoc;
21 import javax.servlet.http.HttpServletRequest JavaDoc;
22 import org.apache.struts.action.ActionError;
23 import org.apache.struts.action.ActionErrors;
24 import org.apache.struts.action.ActionForm;
25 import org.apache.struts.action.ActionMapping;
26
27
28 /**
29  * Base class for form beans for the resource administration.
30  *
31  * @author Manveen Kaur
32  * @version $Revision: 1.2 $ $Date: 2004/02/27 14:59:04 $
33  * @since 4.1
34  */

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

41
42     // ------------------------------------------------------------- Properties
43

44     /**
45      * The node label to be displayed in the user interface.
46      */

47     private String JavaDoc nodeLabel = null;
48
49     public String JavaDoc getNodeLabel() {
50         return (this.nodeLabel);
51     }
52
53     public void setNodeLabel(String JavaDoc nodeLabel) {
54         this.nodeLabel = nodeLabel;
55     }
56
57
58     /**
59      * The MBean object name of this object. A null or zero-length
60      * value indicates that this is a new object.
61      */

62     private String JavaDoc objectName = null;
63
64     public String JavaDoc getObjectName() {
65         return (this.objectName);
66     }
67
68     public void setObjectName(String JavaDoc objectName) {
69         if ((objectName != null) && (objectName.length() < 1)) {
70             this.objectName = null;
71         } else {
72             this.objectName = objectName;
73         }
74     }
75
76
77     // --------------------------------------------------------- Public Methods
78

79     /**
80      * Reset all properties to their default values.
81      *
82      * @param mapping The mapping used to select this instance
83      * @param request The servlet request we are processing
84      */

85     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
86
87         nodeLabel = null;
88         objectName = null;
89
90     }
91
92
93 }
94
Popular Tags