001: /*
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 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: *
021: * --------------------------------------------------------------------------
022: * $Id:
023: * --------------------------------------------------------------------------
024: */
025:
026: package org.objectweb.jonas.webapp.jonasadmin.service.jms;
027:
028: import java.util.ArrayList;
029:
030: import javax.servlet.http.HttpServletRequest;
031:
032: import org.apache.struts.action.ActionErrors;
033: import org.apache.struts.action.ActionForm;
034: import org.apache.struts.action.ActionMapping;
035:
036: /**
037: * Form used to present a Queue's properties
038: * @author Adriana Danes
039: */
040: public class QueueForm extends ActionForm {
041:
042: // --------------------------------------------------------- Properties variables
043:
044: private String name = null;
045: private int pendingMessages;
046: private int pendingRequests;
047: private ArrayList listUsedByEjb = new ArrayList();
048:
049: // --------------------------------------------------------- Public Methods
050:
051: /**
052: * Reset all properties to their default values.
053: *
054: * @param mapping The mapping used to select this instance
055: * @param request The servlet request we are processing
056: */
057:
058: public void reset(ActionMapping mapping, HttpServletRequest request) {
059: name = null;
060: pendingMessages = 0;
061: pendingRequests = 0;
062: }
063:
064: /**
065: * Validate the properties that have been set from this HTTP request,
066: * and return an <code>ActionErrors</code> object that encapsulates any
067: * validation errors that have been found. If no errors are found, return
068: * <code>null</code> or an <code>ActionErrors</code> object with no
069: * recorded error messages.
070: *
071: * @param mapping The mapping used to select this instance
072: * @param request The servlet request we are processing
073: */
074: public ActionErrors validate(ActionMapping mapping,
075: HttpServletRequest request) {
076: ActionErrors oErrors = new ActionErrors();
077: return oErrors;
078: }
079:
080: // --------------------------------------------------------- Properties Methods
081:
082: public String getName() {
083: return name;
084: }
085:
086: public void setName(String name) {
087: this .name = name;
088: }
089:
090: public int getPendingMessages() {
091: return pendingMessages;
092: }
093:
094: public void setPendingMessages(int pendingMessages) {
095: this .pendingMessages = pendingMessages;
096: }
097:
098: public int getPendingRequests() {
099: return pendingRequests;
100: }
101:
102: public void setPendingRequests(int pendingRequests) {
103: this .pendingRequests = pendingRequests;
104: }
105:
106: public ArrayList getListUsedByEjb() {
107: return listUsedByEjb;
108: }
109:
110: public void setListUsedByEjb(ArrayList listUsedByEjb) {
111: this.listUsedByEjb = listUsedByEjb;
112: }
113: }
|