1 13 14 package org.ejbca.core.ejb.authorization; 15 16 import javax.ejb.CreateException ; 17 import org.apache.log4j.Logger; 18 import org.ejbca.core.ejb.BaseEntityBean; 19 import org.ejbca.core.model.authorization.AdminEntity; 20 21 22 65 public abstract class AdminEntityDataBean extends BaseEntityBean { 66 67 private static final Logger log = Logger.getLogger(AdminEntityDataBean.class); 68 69 73 public abstract int getPrimKey(); 74 75 77 public abstract void setPrimKey(int primKey); 78 79 83 public abstract int getMatchWith(); 84 85 89 public abstract int getMatchType(); 90 91 95 public abstract String getMatchValue(); 96 97 99 public abstract void setMatchWith(int matchwith); 100 101 103 public abstract void setMatchType(int matchtype); 104 105 107 public abstract void setMatchValue(String matchvalue); 108 109 110 113 public AdminEntity getAdminEntity(int caid){ 114 return new AdminEntity(getMatchWith(), getMatchType(), getMatchValue(), caid); 115 } 116 117 118 122 public AdminEntityPK ejbCreate(String admingroupname, int caid, int matchwith, int matchtype, String matchvalue) throws CreateException { 123 AdminEntityPK ret = new AdminEntityPK(admingroupname, caid, matchwith, matchtype, matchvalue); 124 setPrimKey(ret.primKey); 125 setMatchWith(matchwith); 126 setMatchType(matchtype); 127 setMatchValue(matchvalue); 128 log.debug("Created admin entity "+ matchvalue); 129 return ret; 130 } 131 132 public void ejbPostCreate(String admingroupname, int caid, int matchwith, int matchtype, String matchvalue) { 133 } 135 } 136 | Popular Tags |