Provide the method expected by the digester for adding security-role-ref elements
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 22 Mar 2010 21:00:24 +0000 (21:00 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 22 Mar 2010 21:00:24 +0000 (21:00 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@926332 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/deploy/ServletDef.java

index 38b44c6..a6d3997 100644 (file)
@@ -212,6 +212,17 @@ public class ServletDef implements Serializable {
         securityRoleRefs.add(securityRoleRef);
     }
 
+    /**
+     * Add a security-role-ref to the set of security-role-refs associated
+     * with this servlet.
+     */
+    public void addSecurityRoleRef(String roleName, String roleLink) {
+        SecurityRoleRef srr = new SecurityRoleRef();
+        srr.setName(roleName);
+        srr.setLink(roleLink);
+        securityRoleRefs.add(srr);
+    }
+
     
     /**
      * The multipart configuration, if any, for this servlet