1 27 package org.objectweb.jonas_ejb.deployment.xml; 28 29 import org.objectweb.jonas_lib.deployment.xml.AbsElement; 30 import org.objectweb.jonas_lib.deployment.xml.RunAs; 31 32 37 38 public class SecurityIdentity extends AbsElement { 39 40 43 private String description = null; 44 45 48 private UseCallerIdentity useCallerIdentity = null; 49 50 53 private RunAs runAs = null; 54 55 56 59 public SecurityIdentity() { 60 super(); 61 } 62 63 67 public String getDescription() { 68 return description; 69 } 70 71 75 public void setDescription(String description) { 76 this.description = description; 77 } 78 79 83 public UseCallerIdentity getUseCallerIdentity() { 84 return useCallerIdentity; 85 } 86 87 91 public void setUseCallerIdentity(UseCallerIdentity useCallerIdentity) { 92 this.useCallerIdentity = useCallerIdentity; 93 } 94 95 99 public RunAs getRunAs() { 100 return runAs; 101 } 102 103 107 public void setRunAs(RunAs runAs) { 108 this.runAs = runAs; 109 } 110 111 116 public String toXML(int indent) { 117 StringBuffer sb = new StringBuffer (); 118 sb.append(indent(indent)); 119 sb.append("<security-identity>\n"); 120 121 indent += 2; 122 123 sb.append(xmlElement(description, "description", indent)); 125 if (useCallerIdentity != null) { 127 sb.append(useCallerIdentity.toXML(indent)); 128 } 129 if (runAs != null) { 131 sb.append(runAs.toXML(indent)); 132 } 133 indent -= 2; 134 sb.append(indent(indent)); 135 sb.append("</security-identity>\n"); 136 137 return sb.toString(); 138 } 139 } 140 | Popular Tags |