1 27 28 package org.objectweb.jonas_ws.wsgen.ddmodifier; 29 30 import org.w3c.dom.Document ; 31 import org.w3c.dom.Element ; 32 33 38 public class ContextDDModifier extends DeploymentDescModifier { 39 40 41 44 private static final String REALM_CLASS_NAME = "org.objectweb.jonas.security.realm.web.catalina55.JACC"; 45 46 47 52 public ContextDDModifier(Document doc) { 53 super(doc.getDocumentElement(), doc); 54 } 55 56 61 public void addContextRealm(String realm) { 62 Element contextElement = getElement(); 63 64 contextElement.appendChild (setRealm(realm)); 65 } 66 67 73 private Element setRealm (String realm) { 74 Element realmElement = newElement("Realm"); 75 realmElement.setAttribute("className", REALM_CLASS_NAME); 76 realmElement.setAttribute("resourceName", realm); 77 78 return realmElement; 79 } 80 81 } | Popular Tags |