Package org.xipki.ca.api.publisher
Class CertPublisher
- java.lang.Object
-
- org.xipki.ca.api.publisher.CertPublisher
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public abstract class CertPublisher extends java.lang.Object implements java.io.CloseableDefines how to publish the certificates and CRLs. All CertPublisher classes must extend this class.- Since:
- 2.0.0
- Author:
- Lijun Liao (xipki)
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCertPublisher()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleancaAdded(org.xipki.security.X509Cert caCert)Publishes the certificate of the CA.abstract booleancaRevoked(org.xipki.security.X509Cert caCert, org.xipki.security.CertRevocationInfo revInfo)Publishes the revocation of a CA.abstract booleancaUnrevoked(org.xipki.security.X509Cert caCert)Publishes the unrevocation of a CA.abstract booleancertificateAdded(CertificateInfo certInfo)Publishes a certificate.abstract booleancertificateRemoved(org.xipki.security.X509Cert caCert, CertWithDbId cert)Publishes the remove of a certificate.abstract booleancertificateRevoked(org.xipki.security.X509Cert caCert, CertWithDbId cert, java.lang.String certprofile, org.xipki.security.CertRevocationInfo revInfo)Publishes the revocation of a certificate.abstract booleancertificateUnrevoked(org.xipki.security.X509Cert caCert, CertWithDbId cert)Publishes the unrevocation of a certificate.voidclose()abstract booleancrlAdded(org.xipki.security.X509Cert caCert, org.bouncycastle.cert.X509CRLHolder crl)Publishes a CRL.abstract voidinitialize(java.lang.String conf, org.xipki.password.PasswordResolver passwordResolver, java.util.Map<java.lang.String,org.xipki.datasource.DataSourceWrapper> datasourceConfs)Initializes me.abstract booleanisHealthy()abstract booleanpublishsGoodCert()
-
-
-
Method Detail
-
initialize
public abstract void initialize(java.lang.String conf, org.xipki.password.PasswordResolver passwordResolver, java.util.Map<java.lang.String,org.xipki.datasource.DataSourceWrapper> datasourceConfs) throws CertPublisherExceptionInitializes me.- Parameters:
conf- Configuration. Could benull.passwordResolver- Password resolver. Could benull.datasourceConfs- Datasource name to configuration map. Must not benull.- Throws:
CertPublisherException- If error during the initialization occurs.
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
publishsGoodCert
public abstract boolean publishsGoodCert()
-
caAdded
public abstract boolean caAdded(org.xipki.security.X509Cert caCert)
Publishes the certificate of the CA.- Parameters:
caCert- CA certificate to be published. Must not benull.- Returns:
- whether the CA is published.
-
certificateAdded
public abstract boolean certificateAdded(CertificateInfo certInfo)
Publishes a certificate.- Parameters:
certInfo- Certificate to be published.- Returns:
- whether the certificate is published.
-
certificateRevoked
public abstract boolean certificateRevoked(org.xipki.security.X509Cert caCert, CertWithDbId cert, java.lang.String certprofile, org.xipki.security.CertRevocationInfo revInfo)Publishes the revocation of a certificate.- Parameters:
caCert- CA certificate. Must not benull.cert- Target certificate. Must not benull.certprofile- Certificate profile. Could benull.revInfo- Revocation information. Must not benull.- Returns:
- whether the revocation is published.
-
certificateUnrevoked
public abstract boolean certificateUnrevoked(org.xipki.security.X509Cert caCert, CertWithDbId cert)Publishes the unrevocation of a certificate.- Parameters:
caCert- CA certificate. Must not benull.cert- Target certificate. Must not benull.- Returns:
- whether the unrevocation is published.
-
certificateRemoved
public abstract boolean certificateRemoved(org.xipki.security.X509Cert caCert, CertWithDbId cert)Publishes the remove of a certificate.- Parameters:
caCert- CA certificate. Must not benull.cert- Target certificate. Must not benull.- Returns:
- whether the remove is published.
-
crlAdded
public abstract boolean crlAdded(org.xipki.security.X509Cert caCert, org.bouncycastle.cert.X509CRLHolder crl)Publishes a CRL.- Parameters:
caCert- CA certificate. Must not benull.crl- CRL to be published. Must not benull.- Returns:
- whether the CRL is published.
-
caRevoked
public abstract boolean caRevoked(org.xipki.security.X509Cert caCert, org.xipki.security.CertRevocationInfo revInfo)Publishes the revocation of a CA.- Parameters:
caCert- CA certificate. Must not benull.revInfo- Revocation information. Must not benull.- Returns:
- whether the CA revocation is published.
-
caUnrevoked
public abstract boolean caUnrevoked(org.xipki.security.X509Cert caCert)
Publishes the unrevocation of a CA.- Parameters:
caCert- CA certificate. Must not benull.- Returns:
- whether the CA unrevocation is published.
-
isHealthy
public abstract boolean isHealthy()
-
-