1 13 14 package org.ejbca.core.ejb.ra.raadmin; 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.ra.raadmin.AdminPreference; 23 24 25 26 27 65 public abstract class AdminPreferencesDataBean extends BaseEntityBean { 66 private static final Logger log = Logger.getLogger(AdminPreferencesDataBean.class); 67 68 73 public abstract String getId(); 74 75 77 public abstract void setId(String id); 78 79 83 public abstract HashMap getData(); 84 86 public abstract void setData(HashMap data); 87 88 94 public AdminPreference getAdminPreference() { 95 AdminPreference returnval = new AdminPreference(); 96 returnval.loadData(getData()); 97 98 return returnval; 99 } 100 101 107 public void setAdminPreference(AdminPreference adminpreference) { 108 setData((HashMap ) adminpreference.saveData()); 109 } 110 111 115 124 public String ejbCreate(String id, AdminPreference adminpreference) 125 throws CreateException { 126 setId(id); 127 setAdminPreference(adminpreference); 128 129 log.debug("Created admin preference " + id); 130 131 return id; 132 } 133 134 140 public void ejbPostCreate(String id, AdminPreference adminpreference) { 141 } 143 } 144 | Popular Tags |