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.ActionForm;
026: import org.apache.struts.action.ActionMapping;
027:
028: /**
029: * Form bean for the Joram queue and topic pages
030: * @author Adriana Danes
031: */
032:
033: public class MonitoringDestForm extends ActionForm {
034:
035: // ------------------------------------------------------------- Properties Variables
036: /**
037: *
038: */
039: private long nbMsgsReceiveSinceCreation;
040: private long nbMsgsSendToDMQSinceCreation;
041: private long nbMsgsDeliverSinceCreation;
042: //private Date creationDate;
043: private String name = null;
044: private String type = null;
045:
046: // ------------------------------------------------------------- Properties Methods
047:
048: /**
049: * @return Returns the nbMsgsReceiveSinceCreation.
050: */
051: public long getNbMsgsReceiveSinceCreation() {
052: return nbMsgsReceiveSinceCreation;
053: }
054:
055: /**
056: * @param nbMsgsReceiveSinceCreation The nbMsgsReceiveSinceCreation to set.
057: */
058: public void setNbMsgsReceiveSinceCreation(
059: long nbMsgsReceiveSinceCreation) {
060: this .nbMsgsReceiveSinceCreation = nbMsgsReceiveSinceCreation;
061: }
062:
063: /**
064: * @return Returns the nbMsgsSendToDMQSinceCreation.
065: */
066: public long getNbMsgsSendToDMQSinceCreation() {
067: return nbMsgsSendToDMQSinceCreation;
068: }
069:
070: /**
071: * @param nbMsgsSendToDMQSinceCreation The nbMsgsSendToDMQSinceCreation to set.
072: */
073: public void setNbMsgsSendToDMQSinceCreation(
074: long nbMsgsSendToDMQSinceCreation) {
075: this .nbMsgsSendToDMQSinceCreation = nbMsgsSendToDMQSinceCreation;
076: }
077:
078: /**
079: * @return Returns the nbMsgsDeliverSinceCreation.
080: */
081: public long getNbMsgsDeliverSinceCreation() {
082: return nbMsgsDeliverSinceCreation;
083: }
084:
085: /**
086: * @param nbMsgsDeliverSinceCreation The nbMsgsDeliverSinceCreation to set.
087: */
088: public void setNbMsgsDeliverSinceCreation(
089: long nbMsgsDeliverSinceCreation) {
090: this .nbMsgsDeliverSinceCreation = nbMsgsDeliverSinceCreation;
091: }
092:
093: /**
094: * @return Returns the name.
095: */
096: public String getName() {
097: return name;
098: }
099:
100: /**
101: * @param name The name to set.
102: */
103: public void setName(String name) {
104: this .name = name;
105: }
106:
107: /**
108: * @return Returns the type.
109: */
110: public String getType() {
111: return type;
112: }
113:
114: /**
115: * @param type The type to set.
116: */
117: public void setType(String type) {
118: this .type = type;
119: }
120:
121: // ------------------------------------------------------------- Public Methods
122:
123: /**
124: * Reset all properties to their default values.
125: *
126: * @param mapping The mapping used to select this instance
127: * @param request The servlet request we are processing
128: */
129: public void reset(ActionMapping mapping, HttpServletRequest request) {
130: nbMsgsReceiveSinceCreation = 0;
131: nbMsgsSendToDMQSinceCreation = 0;
132: nbMsgsDeliverSinceCreation = 0;
133: name = null;
134: type = null;
135: }
136:
137: /**
138: * Validate the properties that have been set from this HTTP request,
139: * and return an <code>ActionErrors</code> object that encapsulates any
140: * validation errors that have been found. If no errors are found, return
141: * <code>null</code> or an <code>ActionErrors</code> object with no
142: * recorded error messages.
143: *
144: * @param mapping The mapping used to select this instance
145: * @param request The servlet request we are processing
146: */
147: public ActionErrors validate(ActionMapping mapping,
148: HttpServletRequest request) {
149: return new ActionErrors();
150: }
151:
152: }
|