1 27 package org.objectweb.jonas_ejb.deployment.rules; 28 29 import org.apache.commons.digester.Digester; 30 31 import org.objectweb.jonas_lib.deployment.rules.EnvironmentRuleSet; 32 import org.objectweb.jonas_lib.deployment.rules.JRuleSetBase; 33 import org.objectweb.jonas_lib.deployment.rules.SecurityRoleRefRuleSet; 34 35 40 41 public class EntityRuleSet extends JRuleSetBase { 42 43 47 public EntityRuleSet(String prefix) { 48 super(prefix); 49 } 50 54 55 public void addRuleInstances(Digester digester) { 56 digester.addObjectCreate(prefix + "entity", 57 "org.objectweb.jonas_ejb.deployment.xml.Entity"); 58 digester.addSetNext(prefix + "entity", 59 "addEntity", 60 "org.objectweb.jonas_ejb.deployment.xml.Entity"); 61 digester.addCallMethod(prefix + "entity/description", 62 "setDescription", 0); 63 digester.addCallMethod(prefix + "entity/display-name", 64 "setDisplayName", 0); 65 digester.addCallMethod(prefix + "entity/small-icon", 66 "setSmallIcon", 0); 67 digester.addCallMethod(prefix + "entity/large-icon", 68 "setLargeIcon", 0); 69 digester.addCallMethod(prefix + "entity/ejb-name", 70 "setEjbName", 0); 71 digester.addCallMethod(prefix + "entity/home", 72 "setHome", 0); 73 digester.addCallMethod(prefix + "entity/remote", 74 "setRemote", 0); 75 digester.addCallMethod(prefix + "entity/local-home", 76 "setLocalHome", 0); 77 digester.addCallMethod(prefix + "entity/local", 78 "setLocal", 0); 79 digester.addCallMethod(prefix + "entity/ejb-class", 80 "setEjbClass", 0); 81 digester.addCallMethod(prefix + "entity/persistence-type", 82 "setPersistenceType", 0); 83 digester.addCallMethod(prefix + "entity/prim-key-class", 84 "setPrimKeyClass", 0); 85 digester.addCallMethod(prefix + "entity/reentrant", 86 "setReentrant", 0); 87 digester.addCallMethod(prefix + "entity/cmp-version", 88 "setCmpVersion", 0); 89 digester.addCallMethod(prefix + "entity/abstract-schema-name", 90 "setAbstractSchemaName", 0); 91 digester.addRuleSet(new CmpFieldRuleSet(prefix + "entity/")); 92 digester.addCallMethod(prefix + "entity/primkey-field", 93 "setPrimkeyField", 0); 94 digester.addRuleSet(new EnvironmentRuleSet(prefix + "entity/")); 95 digester.addRuleSet(new SecurityRoleRefRuleSet(prefix + "entity/")); 96 digester.addRuleSet(new SecurityIdentityRuleSet(prefix + "entity/")); 97 digester.addRuleSet(new QueryRuleSet(prefix + "entity/")); 98 } 99 } 100 | Popular Tags |