ClientContainerDeploymentDesc.java

00001 
00027 package org.objectweb.jonas_client.deployment.api;
00028 
00029 
00030 // import java
00031 import org.objectweb.jonas_client.deployment.xml.ApplicationClient;
00032 import org.objectweb.jonas_client.deployment.xml.JonasClient;
00033 import org.objectweb.jonas_client.deployment.xml.JonasSecurity;
00034 
00035 import org.objectweb.jonas_lib.deployment.api.DeploymentDescException;
00036 import org.objectweb.jonas_lib.deployment.api.EjbRefDesc;
00037 import org.objectweb.jonas_lib.deployment.api.EnvEntryDesc;
00038 import org.objectweb.jonas_lib.deployment.api.JndiEnvRefsGroupDesc;
00039 import org.objectweb.jonas_lib.deployment.api.MessageDestinationRefDesc;
00040 import org.objectweb.jonas_lib.deployment.api.ResourceEnvRefDesc;
00041 import org.objectweb.jonas_lib.deployment.api.ResourceRefDesc;
00042 
00049 public class ClientContainerDeploymentDesc extends JndiEnvRefsGroupDesc {
00050 
00054     private String callbackHandler = null;
00055 
00059     private String jaasFile = null;
00060 
00064     private String jaasEntry = null;
00065 
00069     private String username = null;
00070 
00074     private String password = null;
00075 
00079     private String xmlContent = "";
00080 
00084     private String jonasXmlContent = "";
00085 
00096     public ClientContainerDeploymentDesc(ClassLoader classLoader,
00097                                           ApplicationClient applicationClient,
00098                                           JonasClient jonasClient)
00099         throws DeploymentDescException {
00100         super(classLoader, applicationClient, jonasClient, null);
00101 
00102         // callbackHandler
00103         callbackHandler = null;
00104         if (applicationClient.getCallbackHandler() != null) {
00105             callbackHandler = applicationClient.getCallbackHandler();
00106         }
00107 
00108         JonasSecurity jonasSecurity = jonasClient.getJonasSecurity();
00109         if (jonasSecurity != null) {
00110             // jaas config file
00111             jaasFile = null;
00112             if (jonasSecurity.getJaasfile() != null) {
00113                 jaasFile = jonasSecurity.getJaasfile();
00114             }
00115 
00116             // jaas entry
00117             jaasEntry = null;
00118             if (jonasSecurity.getJaasentry() != null) {
00119                 jaasEntry = jonasSecurity.getJaasentry();
00120             }
00121 
00122             // username
00123             username = null;
00124             if (jonasSecurity.getUsername() != null) {
00125                 username = jonasSecurity.getUsername();
00126             }
00127 
00128             // password
00129             password = null;
00130             if (jonasSecurity.getPassword() != null) {
00131                 password = jonasSecurity.getPassword();
00132             }
00133         }
00134 
00135 
00136     }
00137 
00142     public String getJaasFile() {
00143         return jaasFile;
00144     }
00145 
00150     public String getJaasEntry() {
00151         return jaasEntry;
00152     }
00153 
00158     public String getUsername() {
00159         return username;
00160     }
00161 
00166     public String getPassword() {
00167         return password;
00168     }
00169 
00174     public String getCallbackHandler() {
00175         return callbackHandler;
00176     }
00177 
00182     public String getXmlContent() {
00183         return xmlContent;
00184     }
00185 
00190     public String getJOnASXmlContent() {
00191         return jonasXmlContent;
00192     }
00193 
00197     public void setXmlContent(String xmlContent) {
00198         this.xmlContent = xmlContent;
00199     }
00200 
00204     public void setJOnASXmlContent(String jonasXmlContent) {
00205         this.jonasXmlContent = jonasXmlContent;
00206     }
00207 
00212     public String toString() {
00213         StringBuffer ret = new StringBuffer();
00214 
00215         // Return the displayName
00216         ret.append("\ngetDisplayName()=" + getDisplayName());
00217 
00218         // Return the resource-env-ref
00219         ResourceEnvRefDesc[] rer = getResourceEnvRefDesc();
00220         for (int i = 0; i < rer.length; i++) {
00221             ret.append("\ngetResourceEnvRefDesc(" + i + ")=" + rer[i].getClass().getName());
00222             ret.append(rer[i].toString());
00223         }
00224 
00225         // Return the resource-ref
00226         ResourceRefDesc[] resourceRefDesc = getResourceRefDesc();
00227         for (int i = 0; i < resourceRefDesc.length; i++) {
00228             ret.append("\ngetResourceRefDesc(" + i + ")=" + resourceRefDesc[i].getClass().getName());
00229             ret.append(resourceRefDesc[i].toString());
00230         }
00231 
00232         // Return the env-entry
00233         EnvEntryDesc[] envEntries = getEnvEntryDesc();
00234         for (int i = 0; i < envEntries.length; i++) {
00235             ret.append("\ngetEnvEntryDesc(" + i + ")=" + envEntries[i].getClass().getName());
00236             ret.append(envEntries[i].toString());
00237         }
00238 
00239         // Return the ejb-ref
00240         EjbRefDesc[] ejbRefDesc = getEjbRefDesc();
00241         for (int i = 0; i < ejbRefDesc.length; i++) {
00242             ret.append("\ngetEjbRefDesc(" + i + ")=" + ejbRefDesc[i].getClass().getName());
00243             ret.append(ejbRefDesc[i].toString());
00244         }
00245 
00246         // Return the message-destination-ref
00247         MessageDestinationRefDesc[] mdRefDesc = getMessageDestinationRefDesc();
00248         for (int i = 0; i < mdRefDesc.length; i++) {
00249             ret.append("\ngetMessageDestinationRefDesc(" + i + ")=" + mdRefDesc[i].getClass().getName());
00250             ret.append(mdRefDesc[i].toString());
00251         }
00252 
00253         // Return the callbackHandler
00254         ret.append("\ngetCallbackHandler()=" + getCallbackHandler());
00255 
00256         return ret.toString();
00257     }
00258 }

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