ConnectionDefinition.java

00001 
00027 package org.objectweb.jonas_rar.deployment.xml;
00028 
00029 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
00030 import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
00037 public class ConnectionDefinition extends AbsElement  {
00038 
00042     private String id = null;
00043 
00047     private String managedconnectionfactoryClass = null;
00048 
00052     private JLinkedList configPropertyList = null;
00053 
00057     private String connectionfactoryInterface = null;
00058 
00062     private String connectionfactoryImplClass = null;
00063 
00067     private String connectionInterface = null;
00068 
00072     private String connectionImplClass = null;
00073 
00074 
00078     public ConnectionDefinition() {
00079         super();
00080         configPropertyList = new  JLinkedList("config-property");
00081     }
00082 
00087     public String getId() {
00088         return id;
00089     }
00090 
00095     public void setId(String id) {
00096         this.id = id;
00097     }
00098 
00103     public String getManagedconnectionfactoryClass() {
00104         return managedconnectionfactoryClass;
00105     }
00106 
00111     public void setManagedconnectionfactoryClass(String managedconnectionfactoryClass) {
00112         this.managedconnectionfactoryClass = managedconnectionfactoryClass;
00113     }
00114 
00119     public JLinkedList getConfigPropertyList() {
00120         return configPropertyList;
00121     }
00122 
00127     public void setConfigPropertyList(JLinkedList configPropertyList) {
00128         this.configPropertyList = configPropertyList;
00129     }
00130 
00135     public void addConfigProperty(ConfigProperty configProperty) {
00136         configPropertyList.add(configProperty);
00137     }
00138 
00143     public String getConnectionfactoryInterface() {
00144         return connectionfactoryInterface;
00145     }
00146 
00151     public void setConnectionfactoryInterface(String connectionfactoryInterface) {
00152         this.connectionfactoryInterface = connectionfactoryInterface;
00153     }
00154 
00159     public String getConnectionfactoryImplClass() {
00160         return connectionfactoryImplClass;
00161     }
00162 
00167     public void setConnectionfactoryImplClass(String connectionfactoryImplClass) {
00168         this.connectionfactoryImplClass = connectionfactoryImplClass;
00169     }
00170 
00175     public String getConnectionInterface() {
00176         return connectionInterface;
00177     }
00178 
00183     public void setConnectionInterface(String connectionInterface) {
00184         this.connectionInterface = connectionInterface;
00185     }
00186 
00191     public String getConnectionImplClass() {
00192         return connectionImplClass;
00193     }
00194 
00199     public void setConnectionImplClass(String connectionImplClass) {
00200         this.connectionImplClass = connectionImplClass;
00201     }
00202 
00203 
00209     public String toXML(int indent) {
00210         StringBuffer sb = new StringBuffer();
00211         sb.append(indent(indent));
00212         sb.append("<connection-definition");
00213         sb.append(xmlAttribute(id, "id"));
00214         sb.append(">\n");
00215 
00216         indent += 2;
00217 
00218         // managedconnectionfactory-class
00219         sb.append(xmlElement(managedconnectionfactoryClass, "managedconnectionfactory-class", indent));
00220         // config-property
00221         sb.append(configPropertyList.toXML(indent));
00222         // connectionfactory-interface
00223         sb.append(xmlElement(connectionfactoryInterface, "connectionfactory-interface", indent));
00224         // connectionfactory-impl-class
00225         sb.append(xmlElement(connectionfactoryImplClass, "connectionfactory-impl-class", indent));
00226         // connection-interface
00227         sb.append(xmlElement(connectionInterface, "connection-interface", indent));
00228         // connection-impl-class
00229         sb.append(xmlElement(connectionImplClass, "connection-impl-class", indent));
00230         indent -= 2;
00231         sb.append(indent(indent));
00232         sb.append("</connection-definition>\n");
00233 
00234         return sb.toString();
00235     }
00236 }

Generated on Tue Feb 15 15:05:57 2005 for JOnAS by  doxygen 1.3.9.1