1 26 27 package org.objectweb.jonas_client.deployment.api; 28 29 30 import org.objectweb.jonas_client.deployment.xml.ApplicationClient; 32 import org.objectweb.jonas_client.deployment.xml.JonasClient; 33 import org.objectweb.jonas_client.deployment.xml.JonasSecurity; 34 35 import org.objectweb.jonas_lib.deployment.api.DeploymentDescException; 36 import org.objectweb.jonas_lib.deployment.api.EjbRefDesc; 37 import org.objectweb.jonas_lib.deployment.api.EnvEntryDesc; 38 import org.objectweb.jonas_lib.deployment.api.JndiEnvRefsGroupDesc; 39 import org.objectweb.jonas_lib.deployment.api.MessageDestinationRefDesc; 40 import org.objectweb.jonas_lib.deployment.api.ResourceEnvRefDesc; 41 import org.objectweb.jonas_lib.deployment.api.ResourceRefDesc; 42 43 49 public class ClientContainerDeploymentDesc extends JndiEnvRefsGroupDesc { 50 51 54 private String callbackHandler = null; 55 56 59 private String jaasFile = null; 60 61 64 private String jaasEntry = null; 65 66 69 private String username = null; 70 71 74 private String password = null; 75 76 79 private String xmlContent = ""; 80 81 84 private String jonasXmlContent = ""; 85 86 96 public ClientContainerDeploymentDesc(ClassLoader classLoader, 97 ApplicationClient applicationClient, 98 JonasClient jonasClient) 99 throws DeploymentDescException { 100 super(classLoader, applicationClient, jonasClient, null); 101 102 callbackHandler = null; 104 if (applicationClient.getCallbackHandler() != null) { 105 callbackHandler = applicationClient.getCallbackHandler(); 106 } 107 108 JonasSecurity jonasSecurity = jonasClient.getJonasSecurity(); 109 if (jonasSecurity != null) { 110 jaasFile = null; 112 if (jonasSecurity.getJaasfile() != null) { 113 jaasFile = jonasSecurity.getJaasfile(); 114 } 115 116 jaasEntry = null; 118 if (jonasSecurity.getJaasentry() != null) { 119 jaasEntry = jonasSecurity.getJaasentry(); 120 } 121 122 username = null; 124 if (jonasSecurity.getUsername() != null) { 125 username = jonasSecurity.getUsername(); 126 } 127 128 password = null; 130 if (jonasSecurity.getPassword() != null) { 131 password = jonasSecurity.getPassword(); 132 } 133 } 134 135 136 } 137 138 142 public String getJaasFile() { 143 return jaasFile; 144 } 145 146 150 public String getJaasEntry() { 151 return jaasEntry; 152 } 153 154 158 public String getUsername() { 159 return username; 160 } 161 162 166 public String getPassword() { 167 return password; 168 } 169 170 174 public String getCallbackHandler() { 175 return callbackHandler; 176 } 177 178 182 public String getXmlContent() { 183 return xmlContent; 184 } 185 186 190 public String getJOnASXmlContent() { 191 return jonasXmlContent; 192 } 193 194 197 public void setXmlContent(String xmlContent) { 198 this.xmlContent = xmlContent; 199 } 200 201 204 public void setJOnASXmlContent(String jonasXmlContent) { 205 this.jonasXmlContent = jonasXmlContent; 206 } 207 208 212 public String toString() { 213 StringBuffer ret = new StringBuffer (); 214 215 ret.append("\ngetDisplayName()=" + getDisplayName()); 217 218 ResourceEnvRefDesc[] rer = getResourceEnvRefDesc(); 220 for (int i = 0; i < rer.length; i++) { 221 ret.append("\ngetResourceEnvRefDesc(" + i + ")=" + rer[i].getClass().getName()); 222 ret.append(rer[i].toString()); 223 } 224 225 ResourceRefDesc[] resourceRefDesc = getResourceRefDesc(); 227 for (int i = 0; i < resourceRefDesc.length; i++) { 228 ret.append("\ngetResourceRefDesc(" + i + ")=" + resourceRefDesc[i].getClass().getName()); 229 ret.append(resourceRefDesc[i].toString()); 230 } 231 232 EnvEntryDesc[] envEntries = getEnvEntryDesc(); 234 for (int i = 0; i < envEntries.length; i++) { 235 ret.append("\ngetEnvEntryDesc(" + i + ")=" + envEntries[i].getClass().getName()); 236 ret.append(envEntries[i].toString()); 237 } 238 239 EjbRefDesc[] ejbRefDesc = getEjbRefDesc(); 241 for (int i = 0; i < ejbRefDesc.length; i++) { 242 ret.append("\ngetEjbRefDesc(" + i + ")=" + ejbRefDesc[i].getClass().getName()); 243 ret.append(ejbRefDesc[i].toString()); 244 } 245 246 MessageDestinationRefDesc[] mdRefDesc = getMessageDestinationRefDesc(); 248 for (int i = 0; i < mdRefDesc.length; i++) { 249 ret.append("\ngetMessageDestinationRefDesc(" + i + ")=" + mdRefDesc[i].getClass().getName()); 250 ret.append(mdRefDesc[i].toString()); 251 } 252 253 ret.append("\ngetCallbackHandler()=" + getCallbackHandler()); 255 256 return ret.toString(); 257 } 258 } 259 | Popular Tags |