1 27 package org.objectweb.jonas_ejb.deployment.xml; 28 29 30 35 36 public class Session extends CommonEjb { 37 38 41 private String sessionType = null; 42 43 46 private String serviceEndpoint = null; 47 48 51 private IorSecurityConfigMapping iorSecurityConfigMapping = null; 52 53 56 public Session() { 57 super(); 58 59 } 60 61 65 public String getSessionType() { 66 return sessionType; 67 } 68 69 73 public void setSessionType(String sessionType) { 74 this.sessionType = sessionType; 75 } 76 77 78 82 public String getServiceEndpoint() { 83 return serviceEndpoint; 84 } 85 86 90 public void setServiceEndpoint(String serviceEndpoint) { 91 this.serviceEndpoint = serviceEndpoint; 92 } 93 94 97 public IorSecurityConfigMapping getIorSecurityConfigMapping() { 98 return iorSecurityConfigMapping; 99 } 100 101 104 public void setIorSecurityConfigMapping(IorSecurityConfigMapping iorSecurityConfigMapping) { 105 this.iorSecurityConfigMapping = iorSecurityConfigMapping; 106 } 107 112 public String toXML(int indent) { 113 StringBuffer sb = new StringBuffer (); 114 sb.append(indent(indent)); 115 sb.append("<session>\n"); 116 117 indent += 2; 118 119 sb.append(xmlElement(getDescription(), "description", indent)); 121 sb.append(xmlElement(getDisplayName(), "display-name", indent)); 123 sb.append(xmlElement(getIcon().getSmallIcon(), "small-icon", indent)); 125 sb.append(xmlElement(getIcon().getLargeIcon(), "large-icon", indent)); 127 sb.append(xmlElement(getEjbName(), "ejb-name", indent)); 129 sb.append(xmlElement(getHome(), "home", indent)); 131 sb.append(xmlElement(getRemote(), "remote", indent)); 133 sb.append(xmlElement(getLocalHome(), "local-home", indent)); 135 sb.append(xmlElement(getLocal(), "local", indent)); 137 sb.append(xmlElement(getLocal(), "service-endpoint", indent)); 139 sb.append(xmlElement(getEjbClass(), "ejb-class", indent)); 141 sb.append(xmlElement(sessionType, "session-type", indent)); 143 sb.append(xmlElement(getTransactionType(), "transaction-type", indent)); 145 sb.append(getEnvEntryList().toXML(indent)); 147 sb.append(getEjbRefList().toXML(indent)); 149 sb.append(getEjbLocalRefList().toXML(indent)); 151 sb.append(getResourceRefList().toXML(indent)); 153 sb.append(getResourceEnvRefList().toXML(indent)); 155 sb.append(getServiceRefList().toXML(indent)); 157 sb.append(getMessageDestinationRefList().toXML(indent)); 159 sb.append(getSecurityRoleRefList().toXML(indent)); 161 if (getSecurityIdentity() != null) { 163 sb.append(getSecurityIdentity().toXML(indent)); 164 } 165 if (getIorSecurityConfigMapping() != null) { 167 sb.append(indent(indent)); 168 sb.append("<ior-security-config>\n"); 169 indent += 2; 170 sb.append(iorSecurityConfigMapping.toXML()); 171 indent -= 2; 172 sb.append(indent(indent)); 173 sb.append("</ior-security-config>\n"); 174 } 175 176 indent -= 2; 177 sb.append(indent(indent)); 178 sb.append("</session>\n"); 179 180 return sb.toString(); 181 } 182 } 183 | Popular Tags |