KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_ejb > deployment > xml > ActivationConfig


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  *
8  * modify it under the terms of the GNU Lesser General Public
9  * 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: ActivationConfig.java,v 1.2 2004/05/10 11:45:44 sauthieg Exp $
25  * --------------------------------------------------------------------------
26  */

27
28 package org.objectweb.jonas_ejb.deployment.xml;
29
30 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
31 import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
32
33 /**
34  * This class defines the implementation of the element activation-config
35  *
36  * @author JOnAS team
37  */

38
39 public class ActivationConfig extends AbsElement {
40
41     /**
42      * description
43      */

44     private String JavaDoc description = null;
45
46
47     /**
48      * activation-config-property
49      */

50     private JLinkedList activationConfigPropertyList = null;
51
52     /**
53      * Constructor
54      */

55     public ActivationConfig() {
56         super();
57         activationConfigPropertyList = new JLinkedList("activation-config-property");
58
59     }
60
61     /**
62      * Gets the description
63      * @return the description
64      */

65     public String JavaDoc getDescription() {
66         return description;
67     }
68
69     /**
70      * Set the description
71      * @param description description
72      */

73     public void setDescription(String JavaDoc description) {
74         this.description = description;
75     }
76
77     /**
78      * Gets the list of activation-config-property
79      * @return the list of activation-config-property
80      */

81     public JLinkedList getActivationConfigPropertyList() {
82         return activationConfigPropertyList;
83     }
84
85     /**
86      * Set the activation-config-property
87      * @param activationConfigPropertyList activationConfigProperty
88      */

89     public void setActivationConfigPropertyList(JLinkedList activationConfigPropertyList) {
90         this.activationConfigPropertyList = activationConfigPropertyList;
91     }
92
93     /**
94      * Add a new activation-config-property element to this object
95      * @param activationConfigProperty the activationConfigPropertyobject
96      */

97     public void addActivationConfigProperty(ActivationConfigProperty
98                                             activationConfigProperty) {
99         activationConfigPropertyList.add(activationConfigProperty);
100     }
101
102
103     /**
104      * Represents this element by it's XML description.
105      * @param indent use this indent for prexifing XML representation.
106      * @return the XML description of this object.
107      */

108     public String JavaDoc toXML(int indent) {
109         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
110         sb.append(indent(indent));
111         sb.append("<activation-config>\n");
112
113         indent += 2;
114
115         // description
116
sb.append(xmlElement(description, "description", indent));
117         // activation-config-property
118
sb.append(activationConfigPropertyList.toXML(indent));
119         indent -= 2;
120         sb.append(indent(indent));
121         sb.append("</activation-config>\n");
122
123         return sb.toString();
124     }
125 }
126
Popular Tags