Session.java

00001 
00027 package org.objectweb.jonas_ejb.deployment.xml;
00028 
00029 
00036 public class Session extends CommonEjb {
00037 
00041     private String sessionType = null;
00042 
00046     private String serviceEndpoint = null;
00047 
00051     private IorSecurityConfigMapping iorSecurityConfigMapping = null;
00052 
00056     public Session() {
00057         super();
00058 
00059     }
00060 
00065     public String getSessionType() {
00066         return sessionType;
00067     }
00068 
00073     public void setSessionType(String sessionType) {
00074         this.sessionType = sessionType;
00075     }
00076 
00077 
00082     public String getServiceEndpoint() {
00083         return serviceEndpoint;
00084     }
00085 
00090     public void setServiceEndpoint(String serviceEndpoint) {
00091         this.serviceEndpoint = serviceEndpoint;
00092     }
00093 
00097     public IorSecurityConfigMapping getIorSecurityConfigMapping() {
00098         return iorSecurityConfigMapping;
00099     }
00100 
00104     public void setIorSecurityConfigMapping(IorSecurityConfigMapping iorSecurityConfigMapping) {
00105         this.iorSecurityConfigMapping = iorSecurityConfigMapping;
00106     }
00112     public String toXML(int indent) {
00113         StringBuffer sb = new StringBuffer();
00114         sb.append(indent(indent));
00115         sb.append("<session>\n");
00116 
00117         indent += 2;
00118 
00119         // description
00120         sb.append(xmlElement(getDescription(), "description", indent));
00121         // display-name
00122         sb.append(xmlElement(getDisplayName(), "display-name", indent));
00123         // small-icon
00124         sb.append(xmlElement(getIcon().getSmallIcon(), "small-icon", indent));
00125         // large-icon
00126         sb.append(xmlElement(getIcon().getLargeIcon(), "large-icon", indent));
00127         // ejb-name
00128         sb.append(xmlElement(getEjbName(), "ejb-name", indent));
00129         // home
00130         sb.append(xmlElement(getHome(), "home", indent));
00131         // remote
00132         sb.append(xmlElement(getRemote(), "remote", indent));
00133         // local-home
00134         sb.append(xmlElement(getLocalHome(), "local-home", indent));
00135         // local
00136         sb.append(xmlElement(getLocal(), "local", indent));
00137         // service-endpoint
00138         sb.append(xmlElement(getLocal(), "service-endpoint", indent));
00139         // ejb-class
00140         sb.append(xmlElement(getEjbClass(), "ejb-class", indent));
00141         // session-type
00142         sb.append(xmlElement(sessionType, "session-type", indent));
00143         // transaction-type
00144         sb.append(xmlElement(getTransactionType(), "transaction-type", indent));
00145         // env-entry
00146         sb.append(getEnvEntryList().toXML(indent));
00147         // ejb-ref
00148         sb.append(getEjbRefList().toXML(indent));
00149         // ejb-local-ref
00150         sb.append(getEjbLocalRefList().toXML(indent));
00151         // resource-ref
00152         sb.append(getResourceRefList().toXML(indent));
00153         // resource-env-ref
00154         sb.append(getResourceEnvRefList().toXML(indent));
00155         // service-ref
00156         sb.append(getServiceRefList().toXML(indent));
00157         // message-destination-ref
00158         sb.append(getMessageDestinationRefList().toXML(indent));
00159         // security-role-ref
00160         sb.append(getSecurityRoleRefList().toXML(indent));
00161         // security-identity
00162         if (getSecurityIdentity() != null) {
00163             sb.append(getSecurityIdentity().toXML(indent));
00164         }
00165         // ior-security-config
00166         if (getIorSecurityConfigMapping() != null) {
00167             sb.append(indent(indent));
00168             sb.append("<ior-security-config>\n");
00169             indent += 2;
00170             sb.append(iorSecurityConfigMapping.toXML());
00171             indent -= 2;
00172             sb.append(indent(indent));
00173             sb.append("</ior-security-config>\n");
00174         }
00175 
00176         indent -= 2;
00177         sb.append(indent(indent));
00178         sb.append("</session>\n");
00179 
00180         return sb.toString();
00181     }
00182 }

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