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 Resourceadapter extends AbsElement { 00038 00042 private String resourceadapterClass = null; 00043 00047 private String managedconnectionfactoryClass = null; 00048 00052 private String connectionfactoryInterface = null; 00053 00057 private String connectionfactoryImplClass = null; 00058 00062 private String connectionInterface = null; 00063 00067 private String connectionImplClass = null; 00068 00072 private String transactionSupport = null; 00073 00077 private JLinkedList configPropertyList = null; 00078 00082 private JLinkedList authenticationMechanismList = null; 00083 00087 private OutboundResourceadapter outboundResourceadapter = null; 00088 00092 private InboundResourceadapter inboundResourceadapter = null; 00093 00097 private JLinkedList adminobjectList = null; 00098 00102 private String reauthenticationSupport = null; 00103 00107 private JLinkedList securityPermissionList = null; 00108 00109 00113 public Resourceadapter() { 00114 super(); 00115 configPropertyList = new JLinkedList("config-property"); 00116 authenticationMechanismList = new JLinkedList("authentication-mechanism"); 00117 adminobjectList = new JLinkedList("adminobject"); 00118 securityPermissionList = new JLinkedList("security-permission"); 00119 } 00120 00125 public String getResourceadapterClass() { 00126 return resourceadapterClass; 00127 } 00128 00133 public void setResourceadapterClass(String resourceadapterClass) { 00134 this.resourceadapterClass = resourceadapterClass; 00135 } 00136 00141 public String getManagedconnectionfactoryClass() { 00142 return managedconnectionfactoryClass; 00143 } 00144 00149 public void setManagedconnectionfactoryClass(String managedconnectionfactoryClass) { 00150 this.managedconnectionfactoryClass = managedconnectionfactoryClass; 00151 } 00152 00157 public String getConnectionfactoryInterface() { 00158 return connectionfactoryInterface; 00159 } 00160 00165 public void setConnectionfactoryInterface(String connectionfactoryInterface) { 00166 this.connectionfactoryInterface = connectionfactoryInterface; 00167 } 00168 00173 public String getConnectionfactoryImplClass() { 00174 return connectionfactoryImplClass; 00175 } 00176 00181 public void setConnectionfactoryImplClass(String connectionfactoryImplClass) { 00182 this.connectionfactoryImplClass = connectionfactoryImplClass; 00183 } 00184 00189 public String getConnectionInterface() { 00190 return connectionInterface; 00191 } 00192 00197 public void setConnectionInterface(String connectionInterface) { 00198 this.connectionInterface = connectionInterface; 00199 } 00200 00205 public String getConnectionImplClass() { 00206 return connectionImplClass; 00207 } 00208 00213 public void setConnectionImplClass(String connectionImplClass) { 00214 this.connectionImplClass = connectionImplClass; 00215 } 00216 00221 public String getTransactionSupport() { 00222 return transactionSupport; 00223 } 00224 00229 public void setTransactionSupport(String transactionSupport) { 00230 this.transactionSupport = transactionSupport; 00231 } 00232 00237 public JLinkedList getConfigPropertyList() { 00238 return configPropertyList; 00239 } 00240 00245 public void setConfigPropertyList(JLinkedList configPropertyList) { 00246 this.configPropertyList = configPropertyList; 00247 } 00248 00253 public void addConfigProperty(ConfigProperty configProperty) { 00254 configPropertyList.add(configProperty); 00255 } 00256 00261 public JLinkedList getAuthenticationMechanismList() { 00262 return authenticationMechanismList; 00263 } 00264 00269 public void setAuthenticationMechanismList(JLinkedList authenticationMechanismList) { 00270 this.authenticationMechanismList = authenticationMechanismList; 00271 } 00272 00277 public void addAuthenticationMechanism(AuthenticationMechanism authenticationMechanism) { 00278 authenticationMechanismList.add(authenticationMechanism); 00279 } 00280 00285 public OutboundResourceadapter getOutboundResourceadapter() { 00286 return outboundResourceadapter; 00287 } 00288 00293 public void setOutboundResourceadapter(OutboundResourceadapter outboundResourceadapter) { 00294 this.outboundResourceadapter = outboundResourceadapter; 00295 } 00296 00301 public InboundResourceadapter getInboundResourceadapter() { 00302 return inboundResourceadapter; 00303 } 00304 00309 public void setInboundResourceadapter(InboundResourceadapter inboundResourceadapter) { 00310 this.inboundResourceadapter = inboundResourceadapter; 00311 } 00312 00317 public JLinkedList getAdminobjectList() { 00318 return adminobjectList; 00319 } 00320 00325 public void setAdminobjectList(JLinkedList adminobjectList) { 00326 this.adminobjectList = adminobjectList; 00327 } 00328 00333 public void addAdminobject(Adminobject adminobject) { 00334 adminobjectList.add(adminobject); 00335 } 00336 00341 public String getReauthenticationSupport() { 00342 return reauthenticationSupport; 00343 } 00344 00349 public void setReauthenticationSupport(String reauthenticationSupport) { 00350 this.reauthenticationSupport = reauthenticationSupport; 00351 } 00352 00357 public JLinkedList getSecurityPermissionList() { 00358 return securityPermissionList; 00359 } 00360 00365 public void setSecurityPermissionList(JLinkedList securityPermissionList) { 00366 this.securityPermissionList = securityPermissionList; 00367 } 00368 00373 public void addSecurityPermission(SecurityPermission securityPermission) { 00374 securityPermissionList.add(securityPermission); 00375 } 00376 00382 public String toXML(int indent) { 00383 StringBuffer sb = new StringBuffer(); 00384 sb.append(indent(indent)); 00385 sb.append("<resourceadapter>\n"); 00386 00387 indent += 2; 00388 00389 // resourceadapter-class 00390 sb.append(xmlElement(resourceadapterClass, "resourceadapter-class", indent)); 00391 // config-property 00392 sb.append(configPropertyList.toXML(indent)); 00393 // outbound-resourceadapter 00394 if (outboundResourceadapter != null) { 00395 sb.append(outboundResourceadapter.toXML(indent)); 00396 } 00397 // inbound-resourceadapter 00398 if (inboundResourceadapter != null) { 00399 sb.append(inboundResourceadapter.toXML(indent)); 00400 } 00401 // adminobject 00402 sb.append(adminobjectList.toXML(indent)); 00403 // security-permission 00404 sb.append(securityPermissionList.toXML(indent)); 00405 indent -= 2; 00406 sb.append(indent(indent)); 00407 sb.append("</resourceadapter>\n"); 00408 00409 return sb.toString(); 00410 } 00411 }