1 25 package org.objectweb.jonas.security.rules; 26 27 import org.apache.commons.digester.Digester; 28 29 import org.objectweb.jonas_lib.deployment.rules.JRuleSetBase; 30 31 32 37 public class JMemoryRuleSet extends JRuleSetBase { 38 39 43 public JMemoryRuleSet(String prefix) { 44 super(prefix); 45 } 46 50 public void addRuleInstances(Digester digester) { 51 digester.addObjectCreate(prefix + "memoryrealm", 53 "org.objectweb.jonas.security.realm.factory.JResourceMemory"); 54 55 digester.addSetProperties(prefix + "memoryrealm"); 56 digester.addSetNext(prefix + "memoryrealm", 57 "addJResource", 58 "org.objectweb.jonas.security.realm.factory.JResource"); 59 60 digester.addObjectCreate(prefix + "memoryrealm/roles/role", 61 "org.objectweb.jonas.security.realm.principals.Role"); 62 digester.addSetProperties(prefix + "memoryrealm/roles/role"); 63 digester.addSetNext("memoryrealm/roles/role", 64 "addRole", 65 "org.objectweb.jonas.security.realm.principals.Role"); 66 67 digester.addObjectCreate(prefix + "memoryrealm/groups/group", 68 "org.objectweb.jonas.security.realm.principals.Group"); 69 digester.addSetProperties(prefix + "memoryrealm/groups/group"); 70 digester.addSetNext(prefix + "memoryrealm/groups/group", 71 "addGroup", 72 "org.objectweb.jonas.security.realm.principals.Group"); 73 74 digester.addObjectCreate(prefix + "memoryrealm/users/user", 75 "org.objectweb.jonas.security.realm.principals.User"); 76 digester.addSetProperties(prefix + "memoryrealm/users/user"); 77 digester.addSetNext(prefix + "memoryrealm/users/user", 78 "addUser", 79 "org.objectweb.jonas.security.realm.principals.User"); 80 } 81 82 } 83 | Popular Tags |