1 27 package org.objectweb.jonas_rar.deployment.xml; 28 29 import org.objectweb.jonas_lib.deployment.xml.AbsElement; 30 import org.objectweb.jonas_lib.deployment.xml.JLinkedList; 31 32 37 38 public class AuthenticationMechanism extends AbsElement { 39 40 43 private JLinkedList descriptionList = null; 44 45 48 private String authenticationMechanismType = null; 49 50 53 private String credentialInterface = null; 54 55 56 59 public AuthenticationMechanism() { 60 super(); 61 descriptionList = new JLinkedList("description"); 62 } 63 64 68 public JLinkedList getDescriptionList() { 69 return descriptionList; 70 } 71 72 76 public void setDescriptionList(JLinkedList descriptionList) { 77 this.descriptionList = descriptionList; 78 } 79 80 84 public void addDescription(String description) { 85 descriptionList.add(description); 86 } 87 88 92 public String getAuthenticationMechanismType() { 93 return authenticationMechanismType; 94 } 95 96 100 public void setAuthenticationMechanismType(String authenticationMechanismType) { 101 this.authenticationMechanismType = authenticationMechanismType; 102 } 103 104 108 public String getCredentialInterface() { 109 return credentialInterface; 110 } 111 112 116 public void setCredentialInterface(String credentialInterface) { 117 this.credentialInterface = credentialInterface; 118 } 119 120 125 public String toXML(int indent) { 126 StringBuffer sb = new StringBuffer (); 127 sb.append(indent(indent)); 128 sb.append("<authentication-mechanism>\n"); 129 130 indent += 2; 131 132 sb.append(descriptionList.toXML(indent)); 134 sb.append(xmlElement(authenticationMechanismType, "authentication-mechanism-type", indent)); 136 sb.append(xmlElement(credentialInterface, "credential-interface", indent)); 138 indent -= 2; 139 sb.append(indent(indent)); 140 sb.append("</authentication-mechanism>\n"); 141 142 return sb.toString(); 143 } 144 } 145 | Popular Tags |