001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 2005 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: */package org.objectweb.jonas.webapp.jonasadmin.joramplatform;
021:
022: import javax.servlet.http.HttpServletRequest;
023:
024: import org.apache.struts.action.ActionErrors;
025: import org.apache.struts.action.ActionMapping;
026:
027: /**
028: * Form bean for the Joram local queue form page.
029: * @author Frederic MAISTRE
030: */
031:
032: public final class JoramQueueForm extends DestinationForm {
033:
034: // ------------------------------------------------------------- Properties Variables
035: /**
036: *
037: */
038: private String messageIds = null;
039: /**
040: *
041: */
042: private int nbMaxMsg = -1;
043: /**
044: *
045: */
046: private int pendingMessages = 0;
047: /**
048: *
049: */
050: private int pendingRequests = 0;
051: /**
052: *
053: */
054: private int threshold = 0;
055:
056: // ------------------------------------------------------------- Properties Methods
057: /**
058: * @return Returns the messageIds.
059: */
060: public String getMessageIds() {
061: return messageIds;
062: }
063:
064: /**
065: * @param messageIds The messageIds to set.
066: */
067: public void setMessageIds(String messageIds) {
068: this .messageIds = messageIds;
069: }
070:
071: /**
072: * @return Returns the nbMaxMsg.
073: */
074: public int getNbMaxMsg() {
075: return nbMaxMsg;
076: }
077:
078: /**
079: * @param nbMaxMsg The nbMaxMsg to set.
080: */
081: public void setNbMaxMsg(int nbMaxMsg) {
082: this .nbMaxMsg = nbMaxMsg;
083: }
084:
085: /**
086: * @return Returns the pendingMessages.
087: */
088: public int getPendingMessages() {
089: return pendingMessages;
090: }
091:
092: /**
093: * @param pendingMessages The pendingMessages to set.
094: */
095: public void setPendingMessages(int pendingMessages) {
096: this .pendingMessages = pendingMessages;
097: }
098:
099: /**
100: * @return Returns the pendingRequests.
101: */
102: public int getPendingRequests() {
103: return pendingRequests;
104: }
105:
106: /**
107: * @param pendingRequests The pendingRequests to set.
108: */
109: public void setPendingRequests(int pendingRequests) {
110: this .pendingRequests = pendingRequests;
111: }
112:
113: /**
114: * @return Returns the threshold.
115: */
116: public int getThreshold() {
117: return threshold;
118: }
119:
120: /**
121: * @param threshold The threshold to set.
122: */
123: public void setThreshold(int threshold) {
124: this .threshold = threshold;
125: }
126:
127: // ------------------------------------------------------------- Public Methods
128:
129: /**
130: * Reset all properties to their default values.
131: *
132: * @param mapping The mapping used to select this instance
133: * @param request The servlet request we are processing
134: */
135: public void reset(ActionMapping mapping, HttpServletRequest request) {
136: super .reset(mapping, request);
137: messageIds = null;
138: nbMaxMsg = -1;
139: pendingMessages = 0;
140: pendingRequests = 0;
141: threshold = -1;
142: }
143:
144: /**
145: * Validate the properties that have been set from this HTTP request,
146: * and return an <code>ActionErrors</code> object that encapsulates any
147: * validation errors that have been found. If no errors are found, return
148: * <code>null</code> or an <code>ActionErrors</code> object with no
149: * recorded error messages.
150: *
151: * @param mapping The mapping used to select this instance
152: * @param request The servlet request we are processing
153: */
154: public ActionErrors validate(ActionMapping mapping,
155: HttpServletRequest request) {
156: return super.validate(mapping, request);
157: }
158: }
|