KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > webapp > jonasadmin > catalina > ItemsConnectorsForm


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 2003-2004 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  * $Id: ItemsConnectorsForm.java,v 1.2 2004/10/15 06:58:18 danesa Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.jonas.webapp.jonasadmin.catalina;
27
28 import java.util.ArrayList JavaDoc;
29
30 import javax.servlet.http.HttpServletRequest JavaDoc;
31
32 import org.apache.struts.action.ActionErrors;
33 import org.apache.struts.action.ActionForm;
34 import org.apache.struts.action.ActionMapping;
35
36 /**
37  * @author Michel-Ange ANTON
38  */

39 public class ItemsConnectorsForm extends ActionForm {
40
41 // --------------------------------------------------------- Constants
42

43 // --------------------------------------------------------- Properties variables
44
private String JavaDoc action = null;
45     private String JavaDoc[] selectedItems = new String JavaDoc[0];
46     private ArrayList JavaDoc selectedConnectorItem = new ArrayList JavaDoc();
47
48 // --------------------------------------------------------- Public Methods
49

50     /**
51      * Reset all properties to their default values.
52      *
53      * @param mapping The mapping used to select this instance
54      * @param request The servlet request we are processing
55      */

56     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
57         selectedItems = new String JavaDoc[0];
58     }
59
60     /**
61      * Validate the properties that have been set from this HTTP request,
62      * and return an <code>ActionErrors</code> object that encapsulates any
63      * validation errors that have been found. If no errors are found, return
64      * <code>null</code> or an <code>ActionErrors</code> object with no
65      * recorded error messages.
66      *
67      * @param mapping The mapping used to select this instance
68      * @param request The servlet request we are processing
69      */

70     public ActionErrors validate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
71         ActionErrors oErrors = new ActionErrors();
72         return oErrors;
73     }
74
75     public String JavaDoc[] getSelectedItems() {
76         return selectedItems;
77     }
78
79     public void setSelectedItems(String JavaDoc[] selectedItems) {
80         this.selectedItems = selectedItems;
81     }
82
83     public String JavaDoc getAction() {
84         return action;
85     }
86
87     public void setAction(String JavaDoc action) {
88         this.action = action;
89     }
90
91     public ArrayList JavaDoc getSelectedConnectorItem() {
92         return selectedConnectorItem;
93     }
94
95     public void setSelectedConnectorItem(ArrayList JavaDoc selectedConnectorItem) {
96         this.selectedConnectorItem = selectedConnectorItem;
97     }
98
99 // --------------------------------------------------------- Properties Methods
100

101 }
Popular Tags