KickJava   Java API By Example, From Geeks To Geeks.

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


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.ActionMapping;
28
29 /**
30  * Form bean for the Joram local queue form page.
31  * @author Frederic MAISTRE
32  */

33
34 public final class JoramQueueForm extends DestinationForm {
35
36 // ------------------------------------------------------------- Properties Variables
37
/**
38      *
39      */

40     private String JavaDoc[] messageIds = null;
41     /**
42      *
43      */

44     private int nbMaxMsg = -1;
45     /**
46      *
47      */

48     private int pendingMessages = 0;
49     /**
50      *
51      */

52     private int pendingRequests = 0;
53     /**
54      *
55      */

56     private int threshold = 0;
57 // ------------------------------------------------------------- Properties Methods
58
/**
59      * @return Returns the messageIds.
60      */

61     public String JavaDoc[] getMessageIds() {
62         return messageIds;
63     }
64
65     /**
66      * @param messageIds The messageIds to set.
67      */

68     public void setMessageIds(String JavaDoc[] messageIds) {
69         this.messageIds = messageIds;
70     }
71
72     /**
73      * @return Returns the nbMaxMsg.
74      */

75     public int getNbMaxMsg() {
76         return nbMaxMsg;
77     }
78
79     /**
80      * @param nbMaxMsg The nbMaxMsg to set.
81      */

82     public void setNbMaxMsg(int nbMaxMsg) {
83         this.nbMaxMsg = nbMaxMsg;
84     }
85
86     /**
87      * @return Returns the pendingMessages.
88      */

89     public int getPendingMessages() {
90         return pendingMessages;
91     }
92
93     /**
94      * @param pendingMessages The pendingMessages to set.
95      */

96     public void setPendingMessages(int pendingMessages) {
97         this.pendingMessages = pendingMessages;
98     }
99
100     /**
101      * @return Returns the pendingRequests.
102      */

103     public int getPendingRequests() {
104         return pendingRequests;
105     }
106
107     /**
108      * @param pendingRequests The pendingRequests to set.
109      */

110     public void setPendingRequests(int pendingRequests) {
111         this.pendingRequests = pendingRequests;
112     }
113
114     /**
115      * @return Returns the threshold.
116      */

117     public int getThreshold() {
118         return threshold;
119     }
120
121     /**
122      * @param threshold The threshold to set.
123      */

124     public void setThreshold(int threshold) {
125         this.threshold = threshold;
126     }
127
128 // ------------------------------------------------------------- Public Methods
129

130     /**
131      * Reset all properties to their default values.
132      *
133      * @param mapping The mapping used to select this instance
134      * @param request The servlet request we are processing
135      */

136     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
137         super.reset(mapping, request);
138         messageIds = null;
139         nbMaxMsg = -1;
140         pendingMessages = 0;
141         pendingRequests = 0;
142         threshold = -1;
143     }
144
145     /**
146      * Validate the properties that have been set from this HTTP request,
147      * and return an <code>ActionErrors</code> object that encapsulates any
148      * validation errors that have been found. If no errors are found, return
149      * <code>null</code> or an <code>ActionErrors</code> object with no
150      * recorded error messages.
151      *
152      * @param mapping The mapping used to select this instance
153      * @param request The servlet request we are processing
154      */

155     public ActionErrors validate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
156         return super.validate(mapping, request);
157     }
158
159 }
160
Popular Tags