KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > webapp > jonasadmin > service > resource > ResourceAdapterAOForm


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 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: ResourceAdapterAOForm.java,v 1.1 2005/04/26 16:19:06 ehardesty Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.jonas.webapp.jonasadmin.service.resource;
27
28 import java.net.URL JavaDoc;
29 import java.util.ArrayList JavaDoc;
30 import java.util.Collections JavaDoc;
31 import java.util.Enumeration JavaDoc;
32 import java.util.Iterator JavaDoc;
33 import java.util.List JavaDoc;
34 import java.util.Properties JavaDoc;
35
36 import javax.management.ObjectName JavaDoc;
37
38 import javax.servlet.http.HttpServletRequest JavaDoc;
39
40 import org.apache.struts.action.ActionErrors;
41 import org.apache.struts.action.ActionForm;
42 import org.apache.struts.action.ActionMapping;
43 import org.objectweb.jonas.webapp.jonasadmin.Jlists;
44 import org.objectweb.jonas.webapp.jonasadmin.JonasAdminJmx;
45 import org.objectweb.jonas.webapp.jonasadmin.common.LabelValueByLabelComparator;
46 import org.objectweb.jonas.webapp.taglib.LabelValueBean;
47 import org.objectweb.jonas_rar.deployment.api.RequiredConfigPropertyDesc;
48
49
50 /**
51  * @author Michel-Ange ANTON
52  */

53 public class ResourceAdapterAOForm extends ActionForm {
54
55 // --------------------------------------------------------- Properties variables
56

57     private String JavaDoc description = null;
58     private String JavaDoc name = null;
59     private ArrayList JavaDoc listProperties = new ArrayList JavaDoc();
60     private ObjectName JavaDoc oName = null;
61
62     private ArrayList JavaDoc listUsedByMdb = new ArrayList JavaDoc();
63
64 // --------------------------------------------------------- Public Methods
65

66     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
67     }
68
69     public ActionErrors validate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
70         ActionErrors oErrors = new ActionErrors();
71         return oErrors;
72     }
73
74 // --------------------------------------------------------- Properties Methods
75

76     public String JavaDoc getDescription() {
77         return description;
78     }
79
80     public void setDescription(String JavaDoc description) {
81         this.description = description;
82     }
83
84     public String JavaDoc getName() {
85         return name;
86     }
87
88     public void setName(String JavaDoc name) {
89         this.name = name;
90     }
91
92     public ArrayList JavaDoc getListProperties() {
93         return listProperties;
94     }
95
96     public void setListProperties(Properties JavaDoc properties) {
97         this.listProperties.clear();
98         // Fill list with properties (keys and values)
99
String JavaDoc sKey;
100         Enumeration JavaDoc oEnum = properties.keys();
101         while (oEnum.hasMoreElements()) {
102             sKey = oEnum.nextElement().toString();
103             this.listProperties.add(new LabelValueBean(sKey, properties.getProperty(sKey, "")));
104         }
105         Collections.sort(this.listProperties, new LabelValueByLabelComparator());
106     }
107
108
109     public void setOName(ObjectName JavaDoc oName) {
110         this.oName = oName;
111     }
112     
113     public ObjectName JavaDoc getOName() {
114         return oName;
115     }
116
117     public ArrayList JavaDoc getListUsedByMdb() {
118         return listUsedByMdb;
119     }
120
121     public void setListUsedByMdb(ArrayList JavaDoc listUsedByMdb) {
122         this.listUsedByMdb = listUsedByMdb;
123     }
124     
125 }
Popular Tags