KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > webapp > jonasadmin > joramplatform > JoramAdapterForm


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 2005 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  */

21
22 package org.objectweb.jonas.webapp.jonasadmin.joramplatform;
23
24 import javax.servlet.http.HttpServletRequest JavaDoc;
25
26 import org.apache.struts.action.ActionErrors;
27 import org.apache.struts.action.ActionForm;
28 import org.apache.struts.action.ActionMapping;
29
30 /**
31  * Form bean for the Joram Adapter form page.
32  * @author Adriana Danes
33  */

34
35 public final class JoramAdapterForm extends ActionForm {
36
37 // ------------------------------------------------------------- Properties Variables
38
/**
39      * True: when deploying, the adapter starts a collocated JORAM server.
40      * False: when deploying, the adapter connects to a remote JORAM server.
41      */

42     private boolean collocatedServer;
43     // Following properties usefull when starting a collocated server
44
/**
45      * Directory where the a3servers.xml and joram-admin.cfg files are locate
46      */

47     private String JavaDoc configDir = null;
48     /**
49      * Name of the file describing the administration tasks to perform
50      * (by default joram-admin.cfg)
51      */

52     private String JavaDoc adminFile = null;
53     /**
54      * Persistence mode of the collocated JORAM server
55      */

56     private boolean persistentServer;
57     /**
58      * Identifier of the JORAM server to start
59      */

60     private String JavaDoc serverIdTxt = null;
61     /**
62      * Name of the JORAM server to start
63      */

64     private String JavaDoc serverName = null;
65     // The following properties usefull when manageing a remote server
66
private String JavaDoc version = null;
67     /**
68      * Name of the host where the JORAM server runs
69      */

70     private String JavaDoc hostName = null;
71     /**
72      * Port the JORAM server is listening on
73      */

74     private String JavaDoc serverPortTxt = null;
75     /**
76      *
77      */

78     private String JavaDoc cnxPendingTimerTxt = null;
79     /**
80      *
81      */

82     private String JavaDoc connectingTimerTxt = null;
83     /**
84      *
85      */

86     private String JavaDoc txPendingTimerTxt = null;
87
88 // ------------------------------------------------------------- Properties Methods
89

90     public String JavaDoc getVersion() {
91         return version;
92     }
93
94     public void setVersion(String JavaDoc version) {
95         this.version = version;
96     }
97
98     /**
99      * @return Returns the collocatedServer.
100      */

101     public boolean isCollocatedServer() {
102         return collocatedServer;
103     }
104
105     /**
106      * @param collocatedServer The collocatedServer to set.
107      */

108     public void setCollocatedServer(boolean collocatedServer) {
109         this.collocatedServer = collocatedServer;
110     }
111
112     /**
113      * @return Returns the configDir.
114      */

115     public String JavaDoc getConfigDir() {
116         return configDir;
117     }
118
119     /**
120      * @param configDir The configDir to set.
121      */

122     public void setConfigDir(String JavaDoc configDir) {
123         this.configDir = configDir;
124     }
125
126     /**
127      * @return Returns the adminFile.
128      */

129     public String JavaDoc getAdminFile() {
130         return adminFile;
131     }
132
133     /**
134      * @param adminFile The adminFile to set.
135      */

136     public void setAdminFile(String JavaDoc adminFile) {
137         this.adminFile = adminFile;
138     }
139
140     /**
141      * @return Returns the persistentServer.
142      */

143     public boolean isPersistentServer() {
144         return persistentServer;
145     }
146
147     /**
148      * @param persistentServer The persistentServer to set.
149      */

150     public void setPersistentServer(boolean persistentServer) {
151         this.persistentServer = persistentServer;
152     }
153
154     /**
155      * @return Returns the serverIdTxt.
156      */

157     public String JavaDoc getServerIdTxt() {
158         return serverIdTxt;
159     }
160
161     /**
162      * @param serverIdTxt The serverIdTxt to set.
163      */

164     public void setServerIdTxt(String JavaDoc serverIdTxt) {
165         this.serverIdTxt = serverIdTxt;
166     }
167
168     /**
169      * @return Returns the serverName.
170      */

171     public String JavaDoc getServerName() {
172         return serverName;
173     }
174
175     /**
176      * @param serverName The serverName to set.
177      */

178     public void setServerName(String JavaDoc serverName) {
179         this.serverName = serverName;
180     }
181
182     /**
183      * @return Returns the hostName.
184      */

185     public String JavaDoc getHostName() {
186         return hostName;
187     }
188
189     /**
190      * @param hostName The hostName to set.
191      */

192     public void setHostName(String JavaDoc hostName) {
193         this.hostName = hostName;
194     }
195
196     /**
197      * @return Returns the serverPortTxt.
198      */

199     public String JavaDoc getServerPortTxt() {
200         return serverPortTxt;
201     }
202
203     /**
204      * @param serverPortTxt The serverPortTxt to set.
205      */

206     public void setServerPortTxt(String JavaDoc serverPortTxt) {
207         this.serverPortTxt = serverPortTxt;
208     }
209
210     /**
211      * @return Returns the cnxPendingTimerTxt.
212      */

213     public String JavaDoc getCnxPendingTimerTxt() {
214         return cnxPendingTimerTxt;
215     }
216
217     /**
218      * @param cnxPendingTimerTxt The cnxPendingTimerTxt to set.
219      */

220     public void setCnxPendingTimerTxt(String JavaDoc cnxPendingTimerTxt) {
221         this.cnxPendingTimerTxt = cnxPendingTimerTxt;
222     }
223
224     /**
225      * @return Returns the connectingTimerTxt.
226      */

227     public String JavaDoc getConnectingTimerTxt() {
228         return connectingTimerTxt;
229     }
230
231     /**
232      * @param connectingTimerTxt The connectingTimerTxt to set.
233      */

234     public void setConnectingTimerTxt(String JavaDoc connectingTimerTxt) {
235         this.connectingTimerTxt = connectingTimerTxt;
236     }
237
238     /**
239      * @return Returns the txPendingTimerTxt.
240      */

241     public String JavaDoc getTxPendingTimerTxt() {
242         return txPendingTimerTxt;
243     }
244
245     /**
246      * @param txPendingTimerTxt The txPendingTimerTxt to set.
247      */

248     public void setTxPendingTimerTxt(String JavaDoc txPendingTimerTxt) {
249         this.txPendingTimerTxt = txPendingTimerTxt;
250     }
251
252     // ------------------------------------------------------------- Public Methods
253

254     /**
255      * Reset all properties to their default values.
256      *
257      * @param mapping The mapping used to select this instance
258      * @param request The servlet request we are processing
259      */

260     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
261         version = null;
262     }
263
264     /**
265      * Validate the properties that have been set from this HTTP request,
266      * and return an <code>ActionErrors</code> object that encapsulates any
267      * validation errors that have been found. If no errors are found, return
268      * <code>null</code> or an <code>ActionErrors</code> object with no
269      * recorded error messages.
270      *
271      * @param mapping The mapping used to select this instance
272      * @param request The servlet request we are processing
273      */

274     public ActionErrors validate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
275         return new ActionErrors();
276     }
277
278 }
279
Popular Tags