1 13 14 package org.ejbca.core.model.ca.publisher; 15 16 import java.security.cert.Certificate ; 17 import java.util.Properties ; 18 19 import org.apache.log4j.Logger; 20 import org.ejbca.core.ejb.ca.store.CertificateDataBean; 21 import org.ejbca.core.model.log.Admin; 22 import org.ejbca.core.model.ra.ExtendedInformation; 23 24 25 32 public class DummyCustomPublisher implements ICustomPublisher{ 33 34 private static Logger log = Logger.getLogger(DummyCustomPublisher.class); 35 36 39 public DummyCustomPublisher() {} 40 41 44 public void init(Properties properties) { 45 47 log.debug("Initializing DummyCustomPublisher"); 48 } 49 50 53 public boolean storeCertificate(Admin admin, Certificate incert, String username, String password, String cafp, int status, int type, long revocationDate, int revocationReason, ExtendedInformation extendedinformation) throws PublisherException { 54 log.debug("DummyCustomPublisher, Storing Certificate for user: " + username); 55 if (status != CertificateDataBean.CERT_ACTIVE) { 57 return true; 58 } 59 return true; 60 } 61 62 65 public boolean storeCRL(Admin admin, byte[] incrl, String cafp, int number) throws PublisherException { 66 log.debug("DummyCustomPublisher, Storing CRL"); 67 return true; 68 } 69 70 73 public void revokeCertificate(Admin admin, Certificate cert, int reason) throws PublisherException { 74 log.debug("DummyCustomPublisher, Rekoving Certificate"); 75 76 } 77 78 81 public void testConnection(Admin admin) throws PublisherConnectionException { 82 log.debug("DummyCustomPublisher, Testing connection"); 83 } 84 85 86 protected void finalize() throws Throwable { 87 log.debug("DummyCustomPublisher, closing connection"); 88 90 super.finalize(); 91 } 92 93 } 94 | Popular Tags |