Module io.helidon.common.pki
Package io.helidon.common.pki
Class Keys.BuilderBase<BUILDER extends Keys.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Keys>
java.lang.Object
io.helidon.common.pki.Keys.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER
- type of the builder extending this abstract builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,
,PROTOTYPE> Prototype.ConfiguredBuilder<BUILDER,
PROTOTYPE>
- Direct Known Subclasses:
Keys.Builder
- Enclosing interface:
Keys
public abstract static class Keys.BuilderBase<BUILDER extends Keys.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Keys>
extends Object
implements Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
Keys
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddCert
(X509Certificate cert) The X.509 Certificates.addCertChain
(X509Certificate certChain) The X.509 Certificate Chain.addCertChain
(List<? extends X509Certificate> certChain) The X.509 Certificate Chain.addCerts
(List<? extends X509Certificate> certs) The X.509 Certificates.The X.509 Certificate Chain.certChain
(List<? extends X509Certificate> certChain) The X.509 Certificate Chain.certs()
The X.509 Certificates.certs
(List<? extends X509Certificate> certs) The X.509 Certificates.Clear existing value of this property.clearPem()
Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.config()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).Update this builder from an existing prototype instance.from
(Keys.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.keystore()
Configure keys from a keystore.keystore
(KeystoreKeys keystore) Configure keys from a keystore.keystore
(Consumer<KeystoreKeys.Builder> consumer) Configure keys from a keystore.pem()
Configure keys from pem file(s).Configure keys from pem file(s).pem
(Consumer<PemKeys.Builder> consumer) Configure keys from pem file(s).protected void
Handles providers and decorators.The private key of this config if configured.privateKey
(PrivateKey privateKey) The private key of this config if configured.The public X.509 Certificate if configured.publicCert
(X509Certificate publicCert) The public X.509 Certificate if configured.The public key of this config if configured.The public key of this config if configured.toString()
protected void
Validates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
Methods inherited from interface io.helidon.builder.api.Prototype.ConfiguredBuilder
discoverService, discoverServices
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype
- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfacePrototype.ConfiguredBuilder<BUILDER extends Keys.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends Keys> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
clearKeystore
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
keystore
Configure keys from a keystore. Once the config object is built, this option will ALWAYS be empty. All keys from the keystore will be populated toprivateKey()
,publicKey()
,publicCert()
etc.- Parameters:
keystore
- keystore configuration- Returns:
- updated builder instance
- See Also:
-
keystore
Configure keys from a keystore. Once the config object is built, this option will ALWAYS be empty. All keys from the keystore will be populated toprivateKey()
,publicKey()
,publicCert()
etc.- Parameters:
consumer
- keystore configuration- Returns:
- updated builder instance
- See Also:
-
clearPem
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
pem
Configure keys from pem file(s). Once the config object is built, this option will ALWAYS be empty. All keys from the keystore will be populated toprivateKey()
,publicKey()
,publicCert()
etc.- Parameters:
pem
- pem based definition- Returns:
- updated builder instance
- See Also:
-
pem
Configure keys from pem file(s). Once the config object is built, this option will ALWAYS be empty. All keys from the keystore will be populated toprivateKey()
,publicKey()
,publicCert()
etc.- Parameters:
consumer
- pem based definition- Returns:
- updated builder instance
- See Also:
-
clearPublicKey
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
publicKey
The public key of this config if configured.- Parameters:
publicKey
- the public key of this config or empty if not configured- Returns:
- updated builder instance
- See Also:
-
clearPrivateKey
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
privateKey
The private key of this config if configured.- Parameters:
privateKey
- the private key of this config or empty if not configured- Returns:
- updated builder instance
- See Also:
-
clearPublicCert
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
publicCert
The public X.509 Certificate if configured.- Parameters:
publicCert
- the public certificate of this config or empty if not configured- Returns:
- updated builder instance
- See Also:
-
certChain
The X.509 Certificate Chain.- Parameters:
certChain
- the certificate chain or empty list if not configured- Returns:
- updated builder instance
- See Also:
-
addCertChain
The X.509 Certificate Chain.- Parameters:
certChain
- the certificate chain or empty list if not configured- Returns:
- updated builder instance
- See Also:
-
addCertChain
The X.509 Certificate Chain.- Parameters:
certChain
- the certificate chain or empty list if not configured- Returns:
- updated builder instance
- See Also:
-
certs
The X.509 Certificates.- Parameters:
certs
- the certificates configured or empty list if none configured- Returns:
- updated builder instance
- See Also:
-
addCerts
The X.509 Certificates.- Parameters:
certs
- the certificates configured or empty list if none configured- Returns:
- updated builder instance
- See Also:
-
addCert
The X.509 Certificates.- Parameters:
cert
- the certificates configured or empty list if none configured- Returns:
- updated builder instance
- See Also:
-
keystore
Configure keys from a keystore. Once the config object is built, this option will ALWAYS be empty. All keys from the keystore will be populated toprivateKey()
,publicKey()
,publicCert()
etc.- Returns:
- the keystore
-
pem
Configure keys from pem file(s). Once the config object is built, this option will ALWAYS be empty. All keys from the keystore will be populated toprivateKey()
,publicKey()
,publicCert()
etc.- Returns:
- the pem
-
publicKey
The public key of this config if configured.- Returns:
- the public key
-
privateKey
The private key of this config if configured.- Returns:
- the private key
-
publicCert
The public X.509 Certificate if configured.- Returns:
- the public cert
-
certChain
The X.509 Certificate Chain.- Returns:
- the cert chain
-
certs
The X.509 Certificates.- Returns:
- the certs
-
config
If this instance was configured, this would be the config instance used.- Returns:
- config node used to configure this builder, or empty if not configured
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-