KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > webapp > jonasadmin > joramplatform > JoramTopicForm


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 2005 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  */

21
22 package org.objectweb.jonas.webapp.jonasadmin.joramplatform;
23
24 import javax.servlet.http.HttpServletRequest JavaDoc;
25
26 import org.apache.struts.action.ActionErrors;
27 import org.apache.struts.action.ActionMapping;
28
29 /**
30  * Form bean for the Joram local queue form page.
31  * @author Frederic MAISTRE
32  */

33
34 public final class JoramTopicForm extends DestinationForm {
35
36 // ------------------------------------------------------------- Properties Variables
37
/**
38      * The id of a topic's subscribers
39      */

40     private String JavaDoc[] subscriberIds = null;
41     /**
42      * number of susbscriptions
43      */

44     private int subscriptions = 0;
45
46 // ------------------------------------------------------------- Properties Methods
47

48     /**
49      * @return Returns the subscriberIds.
50      */

51     public String JavaDoc[] getSubscriberIds() {
52         return subscriberIds;
53     }
54
55     /**
56      * @param subscriberIds The subscriberIds to set.
57      */

58     public void setSubscriberIds(String JavaDoc[] subscriberIds) {
59         this.subscriberIds = subscriberIds;
60     }
61
62     /**
63      * @return Returns the subscriptions.
64      */

65     public int getSubscriptions() {
66         return subscriptions;
67     }
68
69     /**
70      * @param subscriptions The subscriptions to set.
71      */

72     public void setSubscriptions(int subscriptions) {
73         this.subscriptions = subscriptions;
74     }
75
76
77 // ------------------------------------------------------------- Public Methods
78

79     /**
80      * Reset all properties to their default values.
81      *
82      * @param mapping The mapping used to select this instance
83      * @param request The servlet request we are processing
84      */

85     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
86         super.reset(mapping, request);
87         subscriberIds = null;
88         subscriptions = 0;
89     }
90
91     /**
92      * Validate the properties that have been set from this HTTP request,
93      * and return an <code>ActionErrors</code> object that encapsulates any
94      * validation errors that have been found. If no errors are found, return
95      * <code>null</code> or an <code>ActionErrors</code> object with no
96      * recorded error messages.
97      *
98      * @param mapping The mapping used to select this instance
99      * @param request The servlet request we are processing
100      */

101     public ActionErrors validate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
102         return super.validate(mapping, request);
103     }
104 }
105
Popular Tags