1 27 package org.objectweb.jonas_rar.deployment.api; 28 29 import java.io.Serializable ; 30 import java.util.List ; 31 32 import org.objectweb.jonas_rar.deployment.xml.Connector; 33 import org.objectweb.jonas_rar.deployment.xml.Resourceadapter; 34 35 40 41 public class ConnectorDesc implements Serializable { 42 43 46 private String displayName = null; 47 48 51 private List descriptionList = null; 52 53 56 private IconDesc icon = null; 57 58 61 private String vendorName = null; 62 63 66 private String specVersion = null; 67 68 71 private String eisType = null; 72 73 76 private String version = null; 77 78 81 private String resourceadapterVersion = null; 82 83 86 private LicenseDesc license = null; 87 88 91 private Resourceadapter resourceadapter = null; private ResourceadapterDesc resourceadapterDesc = null; 93 94 95 98 public ConnectorDesc(Connector conn) { 99 if (conn != null) { 100 displayName = conn.getDisplayName(); 101 icon = new IconDesc(conn.getIcon()); 102 vendorName = conn.getVendorName(); 103 specVersion = conn.getSpecVersion(); 104 eisType = conn.getEisType(); 105 version = conn.getVersion(); 106 resourceadapterVersion = conn.getResourceadapterVersion(); 107 descriptionList = conn.getDescriptionList(); 108 license = new LicenseDesc(conn.getLicense()); 109 resourceadapter = conn.getResourceadapter(); 110 resourceadapterDesc = new ResourceadapterDesc(conn.getResourceadapter()); 111 } 112 } 113 114 118 public String getDisplayName() { 119 return displayName; 120 } 121 122 126 public List getDescriptionList() { 127 return descriptionList; 128 } 129 130 134 public IconDesc getIcon() { 135 return icon; 136 } 137 138 142 public String getVendorName() { 143 return vendorName; 144 } 145 146 150 public String getSpecVersion() { 151 return specVersion; 152 } 153 154 158 public String getEisType() { 159 return eisType; 160 } 161 162 166 public String getVersion() { 167 return version; 168 } 169 170 174 public String getResourceadapterVersion() { 175 return resourceadapterVersion; 176 } 177 178 182 public LicenseDesc getLicense() { 183 return license; 184 } 185 186 190 public Resourceadapter getResourceadapter() { 191 return resourceadapter; 192 } 193 194 198 public ResourceadapterDesc getResourceadapterDesc() { 199 return resourceadapterDesc; 200 } 201 202 public String toString() { 203 StringBuffer sb = new StringBuffer (); 204 sb.append("<connector>\n"); 205 sb.append(" specVersion="+specVersion+"\n"); 206 207 if (resourceadapter != null) { 209 sb.append(""+resourceadapter+"\n"); 210 } else { 211 sb.append(" ra=null\n"); 212 } 213 214 sb.append("</connector>\n"); 215 216 return sb.toString(); 217 } 218 219 } 220 | Popular Tags |