00001
00027 package org.objectweb.jonas_rar.deployment.xml;
00028
00029 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
00030 import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
00031
00038 public class AuthenticationMechanism extends AbsElement {
00039
00043 private JLinkedList descriptionList = null;
00044
00048 private String authenticationMechanismType = null;
00049
00053 private String credentialInterface = null;
00054
00055
00059 public AuthenticationMechanism() {
00060 super();
00061 descriptionList = new JLinkedList("description");
00062 }
00063
00068 public JLinkedList getDescriptionList() {
00069 return descriptionList;
00070 }
00071
00076 public void setDescriptionList(JLinkedList descriptionList) {
00077 this.descriptionList = descriptionList;
00078 }
00079
00084 public void addDescription(String description) {
00085 descriptionList.add(description);
00086 }
00087
00092 public String getAuthenticationMechanismType() {
00093 return authenticationMechanismType;
00094 }
00095
00100 public void setAuthenticationMechanismType(String authenticationMechanismType) {
00101 this.authenticationMechanismType = authenticationMechanismType;
00102 }
00103
00108 public String getCredentialInterface() {
00109 return credentialInterface;
00110 }
00111
00116 public void setCredentialInterface(String credentialInterface) {
00117 this.credentialInterface = credentialInterface;
00118 }
00119
00125 public String toXML(int indent) {
00126 StringBuffer sb = new StringBuffer();
00127 sb.append(indent(indent));
00128 sb.append("<authentication-mechanism>\n");
00129
00130 indent += 2;
00131
00132
00133 sb.append(descriptionList.toXML(indent));
00134
00135 sb.append(xmlElement(authenticationMechanismType, "authentication-mechanism-type", indent));
00136
00137 sb.append(xmlElement(credentialInterface, "credential-interface", indent));
00138 indent -= 2;
00139 sb.append(indent(indent));
00140 sb.append("</authentication-mechanism>\n");
00141
00142 return sb.toString();
00143 }
00144 }