1 13 14 package org.ejbca.core.ejb.hardtoken; 15 16 import java.util.HashMap ; 17 18 import javax.ejb.CreateException ; 19 20 import org.apache.log4j.Logger; 21 import org.ejbca.core.ejb.BaseEntityBean; 22 import org.ejbca.core.model.hardtoken.HardTokenIssuer; 23 24 25 26 83 public abstract class HardTokenIssuerDataBean extends BaseEntityBean { 84 85 private static final Logger log = Logger.getLogger(HardTokenIssuerDataBean.class); 86 87 92 public abstract Integer getId(); 93 94 96 public abstract void setId(Integer id); 97 98 102 public abstract String getAlias(); 103 104 107 public abstract void setAlias(String alias); 108 109 113 public abstract int getAdminGroupId(); 114 115 118 public abstract void setAdminGroupId(int groupid); 119 120 124 public abstract HashMap getData(); 125 126 128 public abstract void setData(HashMap data); 129 130 131 135 public HardTokenIssuer getHardTokenIssuer(){ 136 HardTokenIssuer returnval = new HardTokenIssuer(); 137 returnval.loadData(getData()); 138 return returnval; 139 } 140 141 145 public void setHardTokenIssuer(HardTokenIssuer hardtokenissuer){ 146 setData((HashMap ) hardtokenissuer.saveData()); 147 } 148 149 150 154 160 public Integer ejbCreate(Integer id, String alias, int admingroupid, HardTokenIssuer issuerdata) throws CreateException { 161 setId(id); 162 setAlias(alias); 163 setAdminGroupId(admingroupid); 164 setHardTokenIssuer(issuerdata); 165 166 log.debug("Created Hard Token Issuer "+ alias ); 167 return id; 168 } 169 170 public void ejbPostCreate(Integer id, String alias, int admingroupid, HardTokenIssuer issuerdata) { 171 } 173 } 174 | Popular Tags |