00001
00027 package org.objectweb.jonas_ejb.deployment.xml;
00028
00029 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
00030 import org.objectweb.jonas_lib.deployment.xml.RunAs;
00031
00038 public class SecurityIdentity extends AbsElement {
00039
00043 private String description = null;
00044
00048 private UseCallerIdentity useCallerIdentity = null;
00049
00053 private RunAs runAs = null;
00054
00055
00059 public SecurityIdentity() {
00060 super();
00061 }
00062
00067 public String getDescription() {
00068 return description;
00069 }
00070
00075 public void setDescription(String description) {
00076 this.description = description;
00077 }
00078
00083 public UseCallerIdentity getUseCallerIdentity() {
00084 return useCallerIdentity;
00085 }
00086
00091 public void setUseCallerIdentity(UseCallerIdentity useCallerIdentity) {
00092 this.useCallerIdentity = useCallerIdentity;
00093 }
00094
00099 public RunAs getRunAs() {
00100 return runAs;
00101 }
00102
00107 public void setRunAs(RunAs runAs) {
00108 this.runAs = runAs;
00109 }
00110
00116 public String toXML(int indent) {
00117 StringBuffer sb = new StringBuffer();
00118 sb.append(indent(indent));
00119 sb.append("<security-identity>\n");
00120
00121 indent += 2;
00122
00123
00124 sb.append(xmlElement(description, "description", indent));
00125
00126 if (useCallerIdentity != null) {
00127 sb.append(useCallerIdentity.toXML(indent));
00128 }
00129
00130 if (runAs != null) {
00131 sb.append(runAs.toXML(indent));
00132 }
00133 indent -= 2;
00134 sb.append(indent(indent));
00135 sb.append("</security-identity>\n");
00136
00137 return sb.toString();
00138 }
00139 }