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.EndEntityProfile; 23 24 25 26 27 75 public abstract class EndEntityProfileDataBean extends BaseEntityBean implements java.io.Serializable { 76 private static final Logger log = Logger.getLogger(EndEntityProfileDataBean.class); 77 78 83 public abstract Integer getId(); 84 85 87 public abstract void setId(Integer id); 88 89 93 public abstract String getProfileName(); 94 95 98 public abstract void setProfileName(String profilename); 99 100 104 public abstract HashMap getData(); 105 106 108 public abstract void setData(HashMap data); 109 110 116 public EndEntityProfile getProfile() { 117 EndEntityProfile returnval = new EndEntityProfile(); 118 returnval.loadData(getData()); 119 120 return returnval; 121 } 122 123 129 public void setProfile(EndEntityProfile profile) { 130 setData((HashMap ) profile.saveData()); 131 } 132 133 137 147 public Integer ejbCreate(Integer id, String profilename, EndEntityProfile profile) 148 throws CreateException { 149 setId(id); 150 setProfileName(profilename); 151 setProfile(profile); 152 log.debug("Created profile " + profilename); 153 154 return id; 155 } 156 157 164 public void ejbPostCreate(Integer id, String profilename, EndEntityProfile profile) { 165 } 167 } 168 | Popular Tags |