01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: *
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation; either
10: * version 2.1 of the License, or 1any later version.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * You should have received a copy of the GNU Lesser General Public
18: * License along with this library; if not, write to the Free Software
19: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20: * USA
21: *
22: * Initial developer: JOnAS team
23: * --------------------------------------------------------------------------
24: * $Id: ActivationConfigDesc.java 5459 2004-09-17 22:33:33Z ehardesty $
25: * --------------------------------------------------------------------------
26: */package org.objectweb.jonas_ejb.deployment.api;
27:
28: import java.util.LinkedList;
29: import java.util.List;
30:
31: import org.objectweb.jonas_ejb.deployment.xml.ActivationConfig;
32: import org.objectweb.jonas_ejb.deployment.xml.ActivationConfigProperty;
33:
34: import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
35:
36: /**
37: * This class defines the implementation of the element activation-config
38: *
39: * @author JOnAS team
40: */
41:
42: public class ActivationConfigDesc {
43:
44: /**
45: * description
46: */
47: private String description = null;
48:
49: /**
50: * activation-config-property
51: */
52: private List activationConfigPropertyList = null;
53:
54: /**
55: * Constructor
56: */
57: public ActivationConfigDesc(ActivationConfig ac) {
58: if (ac != null) {
59: description = ac.getDescription();
60: activationConfigPropertyList = convert(ac
61: .getActivationConfigPropertyList());
62: } else {
63: activationConfigPropertyList = new LinkedList();
64: }
65: }
66:
67: /**
68: * Gets the description
69: * @return the description
70: */
71: public String getDescription() {
72: return description;
73: }
74:
75: /**
76: * Gets the list of activation-config-property
77: * @return the list of activation-config-property
78: */
79: public List getActivationConfigPropertyList() {
80: return activationConfigPropertyList;
81: }
82:
83: private List convert(JLinkedList acpl) {
84: ActivationConfigProperty acp = null;
85: LinkedList ll = new LinkedList();
86: for (int i = 0; i < acpl.size(); i++) {
87: acp = (ActivationConfigProperty) acpl.get(i);
88: ll.add(new ActivationConfigPropertyDesc(acp));
89: }
90: return ll;
91: }
92: }
|