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