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> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,,PROTOTYPE> ConfigBuilderSupport.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 ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
Keys.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
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 all certChain.Clear all certs.Clear existing value of keystore.clearPem()Clear existing value of pem.Clear existing value of privateKey.Clear existing value of publicCert.Clear existing value of publicKey.config()Configuration used to configure this instance.Deprecated.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.keystore(Supplier<? extends KeystoreKeys> supplier) 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).Configure keys from pem file(s).protected voidHandles 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 voidValidates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
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
Deprecated.Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.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
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.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 keystore.- 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- consumer of builder of 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:
supplier- supplier of keystore configuration- Returns:
- updated builder instance
- See Also:
-
clearPem
Clear existing value of pem.- 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- consumer of builder of 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:
supplier- supplier of pem based definition- Returns:
- updated builder instance
- See Also:
-
clearPublicKey
Clear existing value of publicKey.- 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 privateKey.- 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 publicCert.- 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:
-
clearCertChain
Clear all certChain.- 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- add single the certificate chain or empty list if not configured- Returns:
- updated builder instance
- See Also:
-
clearCerts
Clear all certs.- 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- add single 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:
- keystore configuration
-
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:
- pem based definition
-
publicKey
The public key of this config if configured.- Returns:
- the public key of this config or empty if not configured
-
privateKey
The private key of this config if configured.- Returns:
- the private key of this config or empty if not configured
-
publicCert
The public X.509 Certificate if configured.- Returns:
- the public certificate of this config or empty if not configured
-
certChain
The X.509 Certificate Chain.- Returns:
- the certificate chain or empty list if not configured
-
certs
The X.509 Certificates.- Returns:
- the certificates configured or empty list if none configured
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties. -
config
Configuration used to configure this instance.- Returns:
- config instance
-
config(io.helidon.config.Config)