1 23 24 package com.sun.enterprise.deployment; 25 26 import com.sun.enterprise.deployment.xml.ConnectorTagNames; 27 import java.util.Iterator ; 28 import java.util.Set ; 29 30 40 public class ConnectionDefDescriptor extends Descriptor 41 { 42 private boolean isDirty = false; 43 44 private String managedConnectionFactoryImpl = ""; 45 private Set configProperties; 46 private String connectionIntf = ""; 47 private String connectionImpl = ""; 48 private String connectionfactoryImpl = ""; 49 private String connectionfactoryIntf = ""; 50 51 public ConnectionDefDescriptor () 52 { 53 this.configProperties = new OrderedSet(); 54 } 55 56 59 public ConnectionDefDescriptor(ConnectionDefDescriptor other) 60 { 61 super(other); 62 managedConnectionFactoryImpl = other.managedConnectionFactoryImpl; connectionIntf = other.connectionIntf; connectionImpl = other.connectionImpl; connectionfactoryImpl = other.connectionfactoryImpl; connectionfactoryIntf = other.connectionfactoryIntf; configProperties = new OrderedSet(); 68 if (other.configProperties != null) { 69 for (Iterator i = other.configProperties.iterator(); i.hasNext();) { 70 configProperties.add(new EnvironmentProperty((EnvironmentProperty)i.next())); 71 } 72 } 73 } 74 75 78 public String getManagedConnectionFactoryImpl() 79 { 80 return managedConnectionFactoryImpl; 81 } 82 83 86 public void setManagedConnectionFactoryImpl(String managedConnectionFactoryImpl) 87 { 88 this.managedConnectionFactoryImpl = managedConnectionFactoryImpl; 89 this.setDirty(); 90 this.changed(); 91 } 92 93 96 public Set getConfigProperties() 97 { 98 return configProperties; 99 } 100 101 104 public void addConfigProperty(EnvironmentProperty configProperty) 105 { 106 this.configProperties.add(configProperty); 107 this.setDirty(); 108 this.changed(); 109 } 110 111 114 public void removeConfigProperty(EnvironmentProperty configProperty) 115 { 116 this.configProperties.remove(configProperty); 117 this.setDirty(); 118 this.changed(); 119 } 120 121 124 public String getConnectionFactoryImpl() 125 { 126 return this.connectionfactoryImpl; 127 } 128 129 132 public void setConnectionFactoryImpl(String cf) 133 { 134 this.connectionfactoryImpl = cf; 135 } 136 137 140 public String getConnectionFactoryIntf() 141 { 142 return this.connectionfactoryIntf; 143 } 144 145 148 public void setConnectionFactoryIntf(String cf) 149 { 150 this.connectionfactoryIntf = cf; 151 } 152 153 156 public String getConnectionIntf() 157 { 158 return this.connectionIntf; 159 } 160 161 164 public void setConnectionIntf(String con) 165 { 166 this.connectionIntf = con; 167 } 168 169 172 public String getConnectionImpl() 173 { 174 return this.connectionImpl; 175 } 176 177 180 public void setConnectionImpl(String con) 181 { 182 this.connectionImpl = con; 183 } 184 185 public boolean isDirty() 186 { 187 return this.isDirty; 188 } 189 190 public void changed() 191 { 192 super.changed(); 193 } 194 195 private void setDirty() { 196 this.isDirty = true; 197 } 198 199 } 200 | Popular Tags |