KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.util.ArrayList JavaDoc;
25
26 import javax.servlet.http.HttpServletRequest JavaDoc;
27
28 import org.apache.struts.action.ActionErrors;
29 import org.apache.struts.action.ActionForm;
30 import org.apache.struts.action.ActionMapping;
31
32 /**
33  * Form bean for the Joram queue and topic pages
34  * @author Adriana Danes
35  */

36
37 public class DestinationForm extends ActionForm {
38
39 // ------------------------------------------------------------- Properties Variables
40
/**
41      * admin name (alse jndi name)
42      */

43     private String JavaDoc name = null;
44     /**
45      * associated agent id
46      */

47     private String JavaDoc id = null;
48     /**
49      * name of the EJBs using this destination
50      */

51     private ArrayList JavaDoc listUsedByEjb = new ArrayList JavaDoc();
52     /**
53      * DeadMQueue
54      */

55     private String JavaDoc dmq = null;
56     /**
57      * freelyReadable
58      */

59     private boolean freelyReadable;
60     /**
61      * freelyWriteable
62      */

63     private boolean freelyWriteable;
64     /**
65      * list if readers
66      */

67     private String JavaDoc[] readerList = null;
68     /**
69      * list of writers
70      */

71     private String JavaDoc[] writerList = null;
72     /**
73      * destination type: queue or topic
74      */

75     private String JavaDoc type = null;
76     /**
77      * creation date
78      */

79     private String JavaDoc creationDate = null;
80 // ------------------------------------------------------------- Properties Methods
81
/**
82      * @return Returns the listUsedByEjb.
83      */

84     public ArrayList JavaDoc getListUsedByEjb() {
85         return listUsedByEjb;
86     }
87     /**
88      * @param listUsedByEjb The listUsedByEjb to set.
89      */

90     public void setListUsedByEjb(ArrayList JavaDoc listUsedByEjb) {
91         this.listUsedByEjb = listUsedByEjb;
92     }
93
94     public String JavaDoc getName() {
95         return name;
96     }
97
98     public void setName(String JavaDoc name) {
99         this.name = name;
100     }
101
102     public String JavaDoc getId() {
103         return id;
104     }
105
106     public void setId(String JavaDoc id) {
107         this.id = id;
108     }
109
110     /**
111      * @return Returns the dmq.
112      */

113     public String JavaDoc getDmq() {
114         return dmq;
115     }
116     /**
117      * @param dmq The dmq to set.
118      */

119     public void setDmq(String JavaDoc dmq) {
120         this.dmq = dmq;
121     }
122     /**
123      * @return Returns the freelyReadable.
124      */

125     public boolean getFreelyReadable() {
126         return freelyReadable;
127     }
128     /**
129      * @param freelyReadable The freelyReadable to set.
130      */

131     public void setFreelyReadable(boolean freelyReadable) {
132         this.freelyReadable = freelyReadable;
133     }
134     /**
135      * @return Returns the freelyWriteable.
136      */

137     public boolean getFreelyWriteable() {
138         return freelyWriteable;
139     }
140     /**
141      * @param freelyWriteable The freelyWriteable to set.
142      */

143     public void setFreelyWriteable(boolean freelyWriteable) {
144         this.freelyWriteable = freelyWriteable;
145     }
146     /**
147      * @return Returns the readerList.
148      */

149     public String JavaDoc[] getReaderList() {
150         return readerList;
151     }
152     /**
153      * @param readerList The readerList to set.
154      */

155     public void setReaderList(String JavaDoc[] readerList) {
156         this.readerList = readerList;
157     }
158     /**
159      * @return Returns the writerList.
160      */

161     public String JavaDoc[] getWriterList() {
162         return writerList;
163     }
164     /**
165      * @param writerList The writerList to set.
166      */

167     public void setWriterList(String JavaDoc[] writerList) {
168         this.writerList = writerList;
169     }
170     /**
171      * @return Returns the type.
172      */

173     public String JavaDoc getType() {
174         return type;
175     }
176     /**
177      * @param type The type to set.
178      */

179     public void setType(String JavaDoc type) {
180         this.type = type;
181     }
182
183     /**
184      * @return Returns the creationDate.
185      */

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

192     public void setCreationDate(String JavaDoc creationDate) {
193         this.creationDate = creationDate;
194     }
195 // ------------------------------------------------------------- Public Methods
196

197     /**
198      * Reset all properties to their default values.
199      *
200      * @param mapping The mapping used to select this instance
201      * @param request The servlet request we are processing
202      */

203     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
204         name = null;
205         id = null;
206         listUsedByEjb = new ArrayList JavaDoc();
207         dmq = null;
208         freelyReadable = true;
209         freelyWriteable = true;
210         readerList = null;
211         writerList = null;
212         type = null;
213     }
214
215     /**
216      * Validate the properties that have been set from this HTTP request,
217      * and return an <code>ActionErrors</code> object that encapsulates any
218      * validation errors that have been found. If no errors are found, return
219      * <code>null</code> or an <code>ActionErrors</code> object with no
220      * recorded error messages.
221      *
222      * @param mapping The mapping used to select this instance
223      * @param request The servlet request we are processing
224      */

225     public ActionErrors validate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
226         return new ActionErrors();
227     }
228 }
229
Popular Tags