001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999-2004 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: DomainForm.java 9469 2006-08-30 09:44:50Z durieuxp $
023: * --------------------------------------------------------------------------
024: */package org.objectweb.jonas.webapp.jonasadmin.domain;
025:
026: import javax.servlet.http.HttpServletRequest;
027:
028: import org.apache.struts.action.ActionErrors;
029: import org.apache.struts.action.ActionForm;
030: import org.apache.struts.action.ActionMapping;
031:
032: /**
033: * Form used for EditDomainAction
034: * It is used for domain or cluster display
035: * @author danesa
036: */
037: public class DomainForm extends ActionForm {
038:
039: /**
040: * domain name or cluster name (if this is a cluster)
041: */
042: private String name = null;
043:
044: /**
045: *
046: */
047: private String type = null;
048:
049: /**
050: * if cluster, gives cluster type (LogicalCluster, CmiCluster etc.)
051: */
052: private String clusterType = null;
053:
054: /**
055: * domain name (used if this is a cluster)
056: */
057: private String domainName = null;
058:
059: /**
060: * parent cluster (or domain) name
061: */
062: private String parentName = null;
063:
064: /**
065: * parent cluster (or domain) ON
066: */
067: private String parentON = null;
068:
069: /**
070: * master server name (the local server name)
071: */
072: private String masterName = null;
073:
074: /**
075: * domain or cluster description
076: */
077: private String description = null;
078:
079: /**
080: * master server's MBean OBJECT_NAME
081: */
082: private String masterON = null;
083:
084: /**
085: * true if the local server is master
086: */
087: private boolean isMaster = false;
088:
089: /**
090: * True if this is a cluster, false if this is domain (root cluster)
091: */
092: private boolean isCluster = false;
093:
094: /**
095: * Reset all properties to their default values.
096: * @param mapping The mapping used to select this instance
097: * @param request The servlet request we are processing
098: */
099: public void reset(ActionMapping mapping, HttpServletRequest request) {
100: }
101:
102: /**
103: * Validate the properties that have been set from this HTTP request,
104: * and return an <code>ActionErrors</code> object that encapsulates any
105: * validation errors that have been found. If no errors are found, return
106: * <code>null</code> or an <code>ActionErrors</code> object with no
107: * recorded error messages.
108: *
109: * @param mapping The mapping used to select this instance
110: * @param request The servlet request we are processing
111: */
112: public ActionErrors validate(ActionMapping mapping,
113: HttpServletRequest request) {
114: return new ActionErrors();
115: }
116:
117: /**
118: * @return Returns the name.
119: */
120: public String getName() {
121: return name;
122: }
123:
124: /**
125: * @param name The name to set.
126: */
127: public void setName(String name) {
128: this .name = name;
129: }
130:
131: /**
132: * @return Returns the domainName.
133: */
134: public String getDomainName() {
135: return domainName;
136: }
137:
138: /**
139: * @param domainName The domainName to set.
140: */
141: public void setDomainName(String domainName) {
142: this .domainName = domainName;
143: }
144:
145: /**
146: * @return Returns the isCluster.
147: */
148: public boolean isCluster() {
149: return isCluster;
150: }
151:
152: /**
153: * @param isCluster The isCluster to set.
154: */
155: public void setCluster(boolean isCluster) {
156: this .isCluster = isCluster;
157: }
158:
159: /**
160: * @return Returns the masterName.
161: */
162: public String getMasterName() {
163: return masterName;
164: }
165:
166: /**
167: * @param masterName The masterName to set.
168: */
169: public void setMasterName(String masterName) {
170: this .masterName = masterName;
171: }
172:
173: /**
174: * @return Returns the parentName.
175: */
176: public String getParentName() {
177: return parentName;
178: }
179:
180: /**
181: * @param parentName The parentName to set.
182: */
183: public void setParentName(String parentName) {
184: this .parentName = parentName;
185: }
186:
187: /**
188: * @return Returns the masterON.
189: */
190: public String getMasterON() {
191: return masterON;
192: }
193:
194: /**
195: * @param masterON The masterON to set.
196: */
197: public void setMasterON(String masterON) {
198: this .masterON = masterON;
199: }
200:
201: /**
202: * @return Returns the type.
203: */
204: public String getType() {
205: return type;
206: }
207:
208: /**
209: * @param type The type to set.
210: */
211: public void setType(String type) {
212: this .type = type;
213: }
214:
215: /**
216: * @return Returns the description.
217: */
218: public String getDescription() {
219: return description;
220: }
221:
222: /**
223: * @param description The description to set.
224: */
225: public void setDescription(String description) {
226: this .description = description;
227: }
228:
229: /**
230: * @return Returns the isMaster.
231: */
232: public boolean isMaster() {
233: return isMaster;
234: }
235:
236: /**
237: * @param isMaster The isMaster to set.
238: */
239: public void setMaster(boolean isMaster) {
240: this .isMaster = isMaster;
241: }
242:
243: /**
244: * @return Returns the parentON.
245: */
246: public String getParentON() {
247: return parentON;
248: }
249:
250: /**
251: * @param parentON The parentON to set.
252: */
253: public void setParentON(String parentON) {
254: this .parentON = parentON;
255: }
256:
257: public String getClusterType() {
258: return clusterType;
259: }
260:
261: public void setClusterType(String clusterType) {
262: this.clusterType = clusterType;
263: }
264:
265: }
|