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 JoramTopicForm extends DestinationForm {
033:
034: // ------------------------------------------------------------- Properties Variables
035: /**
036: * The id of a topic's subscribers
037: */
038: private String subscriberIds = null;
039: /**
040: * The names of a topic's subscribers
041: */
042: private String subscribers = null;
043: /**
044: * number of susbscriptions
045: */
046: private int subscriptions = 0;
047:
048: // ------------------------------------------------------------- Properties Methods
049:
050: /**
051: * @return Returns the subscriberIds.
052: */
053: public String getSubscriberIds() {
054: return subscriberIds;
055: }
056:
057: /**
058: * @param subscriberIds The subscriberIds to set.
059: */
060: public void setSubscriberIds(String subscriberIds) {
061: this .subscriberIds = subscriberIds;
062: }
063:
064: /**
065: * @return Returns the subscriptions.
066: */
067: public int getSubscriptions() {
068: return subscriptions;
069: }
070:
071: /**
072: * @param subscriptions The subscriptions to set.
073: */
074: public void setSubscriptions(int subscriptions) {
075: this .subscriptions = subscriptions;
076: }
077:
078: /**
079: * @return Returns the subscribers.
080: */
081: public String getSubscribers() {
082: return subscribers;
083: }
084:
085: /**
086: * @param subscribers The subscribers to set.
087: */
088: public void setSubscribers(String subscribers) {
089: this .subscribers = subscribers;
090: }
091:
092: // ------------------------------------------------------------- Public Methods
093:
094: /**
095: * Reset all properties to their default values.
096: *
097: * @param mapping The mapping used to select this instance
098: * @param request The servlet request we are processing
099: */
100: public void reset(ActionMapping mapping, HttpServletRequest request) {
101: super .reset(mapping, request);
102: subscriberIds = null;
103: subscriptions = 0;
104: }
105:
106: /**
107: * Validate the properties that have been set from this HTTP request,
108: * and return an <code>ActionErrors</code> object that encapsulates any
109: * validation errors that have been found. If no errors are found, return
110: * <code>null</code> or an <code>ActionErrors</code> object with no
111: * recorded error messages.
112: *
113: * @param mapping The mapping used to select this instance
114: * @param request The servlet request we are processing
115: */
116: public ActionErrors validate(ActionMapping mapping,
117: HttpServletRequest request) {
118: return super.validate(mapping, request);
119: }
120: }
|