KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > webapp > jonasadmin > jonasserver > JndiResourcesForm


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: JndiResourcesForm.java,v 1.2 2005/02/14 15:04:37 danesa Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.jonas.webapp.jonasadmin.jonasserver;
27
28 import java.util.ArrayList JavaDoc;
29 import java.util.Collections JavaDoc;
30 import java.util.List JavaDoc;
31
32 import javax.servlet.http.HttpServletRequest JavaDoc;
33
34 import org.apache.struts.action.ActionForm;
35 import org.apache.struts.action.ActionMapping;
36 import org.objectweb.jonas.webapp.jonasadmin.common.BeanComparator;
37 /**
38  * @author Adriana Danes
39  */

40 public class JndiResourcesForm extends BasicJonasServerForm {
41
42 // --------------------------------------------------------- Properties variables
43

44     private ArrayList JavaDoc providers = new ArrayList JavaDoc();
45     private ArrayList JavaDoc listNames = new ArrayList JavaDoc();
46
47 // --------------------------------------------------------- Public Methods
48

49     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
50         providers = new ArrayList JavaDoc();
51         listNames = new ArrayList JavaDoc();
52     }
53
54 // --------------------------------------------------------- Properties Methods
55

56     public void addProvider(JndiResourceItem provider) {
57         providers.add(provider);
58     }
59     
60     public List JavaDoc getProviders() {
61         return providers;
62     }
63     public ArrayList JavaDoc getListNames() {
64         return listNames;
65     }
66
67     public void setListNames(List JavaDoc p_List) {
68         listNames.clear();
69         listNames = new ArrayList JavaDoc(p_List);
70         Collections.sort(listNames, new BeanComparator());
71     }
72 }
Popular Tags