public final class PublicationsHandlerBuilder extends Object
Obtaining and configuring the PublicationsHandler
object(s).
Constructor and Description |
---|
PublicationsHandlerBuilder() |
Modifier and Type | Method and Description |
---|---|
PublicationsHandler |
build()
Builds the
PublicationsHandler instance. |
PublicationsHandlerBuilder |
setKsiProtocolPublicationsFileClient(KSIPublicationsFileClient publicationsFileClient)
Sets the publications file client to be used to download publications file.
|
PublicationsHandlerBuilder |
setPublicationsFileCacheExpirationTime(long expirationTime)
Sets the publications file expiration time.
|
PublicationsHandlerBuilder |
setPublicationsFileCertificateConstraints(CertSelector certSelector)
Sets the
CertSelector to be used to verify the certificate that was used to sign
the publications file. |
PublicationsHandlerBuilder |
setPublicationsFilePkiTrustStore(File file,
String password)
|
PublicationsHandlerBuilder |
setPublicationsFilePkiTrustStore(KeyStore trustStore)
Sets the
KeyStore to be used as truststore to verify the certificate that was used to sign the
publications file. |
public PublicationsHandlerBuilder setKsiProtocolPublicationsFileClient(KSIPublicationsFileClient publicationsFileClient)
publicationsFileClient
- instance of KSIPublicationsFileClient
.PublicationsHandlerBuilder
.public PublicationsHandlerBuilder setPublicationsFilePkiTrustStore(KeyStore trustStore) throws KSIException
KeyStore
to be used as truststore to verify the certificate that was used to sign the
publications file. If not set, the default Java keystore is used.trustStore
- truststore to be used to verify certificates.PublicationsHandlerBuilder
.KSIException
- when any error occurs.public PublicationsHandlerBuilder setPublicationsFilePkiTrustStore(File file, String password) throws KSIException
KeyStore
from the file system and sets the KeyStore
to be used as truststore to verify
the certificate that was used to sign the publications file.file
- keystore file on disk, not null.password
- password of the keystore, null if keystore isn't protected by password.PublicationsHandlerBuilder
.KSIException
- when any error occurs.public PublicationsHandlerBuilder setPublicationsFileCertificateConstraints(CertSelector certSelector)
CertSelector
to be used to verify the certificate that was used to sign
the publications file. X509CertSelector
can be used instead of X509CertificateSubjectRdnSelector
certSelector
- instance of CertSelector
.PublicationsHandlerBuilder
.X509CertSelector
public PublicationsHandlerBuilder setPublicationsFileCacheExpirationTime(long expirationTime)
public PublicationsHandler build() throws KSIException
PublicationsHandler
instance. Checks that publications file client and
KSI publications file trusted certificate selector are set. If not configured, NullPointerException
is thrown.PublicationsHandler
).KSIException
- will be thrown when errors occur on PublicationsHandler
class initialization.Copyright © 2024 Guardtime. All rights reserved.