Package org.xipki.ca.api.publisher
Class CertPublisher
- java.lang.Object
-
- org.xipki.ca.api.publisher.CertPublisher
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public abstract class CertPublisher extends Object implements Closeable
Defines 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 Deprecated 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, 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(String conf, org.xipki.password.PasswordResolver passwordResolver, Map<String,org.xipki.util.FileOrValue> datasourceConfs)Initializes me.booleanisAsyn()Deprecated.abstract booleanisHealthy()abstract booleanpublishsGoodCert()
-
-
-
Method Detail
-
initialize
public abstract void initialize(String conf, org.xipki.password.PasswordResolver passwordResolver, Map<String,org.xipki.util.FileOrValue> datasourceConfs) throws CertPublisherException
Initializes 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 interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
publishsGoodCert
public abstract boolean publishsGoodCert()
-
isAsyn
@Deprecated public boolean isAsyn()
Deprecated.Will not be considered.- Returns:
- whether data will be published asynchronously.
-
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, 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()
-
-