1 13 14 package org.ejbca.core.ejb.authorization; 15 16 import javax.ejb.CreateException ; 17 18 import org.ejbca.core.ejb.BaseEntityBean; 19 import org.ejbca.core.model.authorization.AccessRule; 20 21 22 67 public abstract class AccessRulesDataBean extends BaseEntityBean 68 { 69 73 public abstract int getPrimKey(); 74 public abstract void setPrimKey(int primKey); 75 76 80 public abstract String getAccessRule(); 81 public abstract void setAccessRule(String accessrule); 82 83 87 public abstract int getRule(); 88 public abstract void setRule(int rule); 89 90 94 public abstract boolean getIsRecursive(); 95 public abstract void setIsRecursive(boolean isrecursive); 96 97 102 public AccessRule getAccessRuleObject() { 103 return new AccessRule(getAccessRule(), getRule(), getIsRecursive()); 104 } 105 106 110 public AccessRulesPK ejbCreate(String admingroupname, int caid, String accessrule, int rule, boolean isrecursive) throws CreateException { 111 AccessRulesPK ret = new AccessRulesPK(admingroupname, caid, new AccessRule(accessrule, rule, isrecursive)); 112 setPrimKey(ret.primKey); 113 setAccessRule(accessrule); 114 setRule(rule); 115 setIsRecursive(isrecursive); 116 debug("Created accessrule : "+ accessrule); 117 return ret; 118 } 119 120 public void ejbPostCreate(String admingroupname, int caid, String accessrule, int rule, boolean isrecursive) { 121 } 123 124 } 125 | Popular Tags |