Module io.helidon.common.pki
Package io.helidon.common.pki
Class KeystoreKeys.BuilderBase<BUILDER extends KeystoreKeys.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends KeystoreKeys>
java.lang.Object
io.helidon.common.pki.KeystoreKeys.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:
KeystoreKeys.Builder
- Enclosing interface:
KeystoreKeys
public abstract static class KeystoreKeys.BuilderBase<BUILDER extends KeystoreKeys.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends KeystoreKeys>
extends Object
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
KeystoreKeys.-
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 TypeMethodDescriptionaddCertAlias(String certAlias) List of aliases used to generate a trusted set of certificates.addCertAliases(List<String> certAliases) List of aliases used to generate a trusted set of certificates.Alias of X.509 certificate of public key.Alias of X.509 certificate of public key.List of aliases used to generate a trusted set of certificates.certAliases(List<String> certAliases) List of aliases used to generate a trusted set of certificates.Alias of an X.509 chain.certChainAlias(String certChainAlias) Alias of an X.509 chain.Clear existing value of certAlias.Clear all certAliases.Clear existing value of certChainAlias.Clear existing value of keyAlias.Clear existing value of keyPassphrase.Clear existing value of passphrase.config()Configuration used to configure this instance.Deprecated.Update builder from configuration (node of this type).from(KeystoreKeys prototype) Update this builder from an existing prototype instance.from(KeystoreKeys.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.keyAlias()Alias of the private key in the keystore.Alias of the private key in the keystore.Optional<char[]> Pass-phrase of the key in the keystore (used for private keys).keyPassphrase(char[] keyPassphrase) Pass-phrase of the key in the keystore (used for private keys).keyPassphrase(String keyPassphrase) Pass-phrase of the key in the keystore (used for private keys).keystore()Keystore resource definition.Keystore resource definition.keystore(ResourceConfig keystore) Keystore resource definition.keystore(Consumer<ResourceConfig.Builder> consumer) Keystore resource definition.Keystore resource definition.keystorePassphrase(String passphrase) Deprecated.usepassphrase(String)insteadOptional<char[]> Pass-phrase of the keystore (supported with JKS and PKCS12 keystores).passphrase(char[] passphrase) Pass-phrase of the keystore (supported with JKS and PKCS12 keystores).passphrase(String passphrase) Pass-phrase of the keystore (supported with JKS and PKCS12 keystores).protected voidHandles providers and decorators.toString()booleanIf you want to build a trust store, call this method to add all certificates present in the keystore to certificate list.trustStore(boolean trustStore) If you want to build a trust store, call this method to add all certificates present in the keystore to certificate list.type()Set type of keystore.Set type of keystore.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
-
keystorePassphrase
Deprecated.usepassphrase(String)insteadKeystore passphrase.- Parameters:
passphrase- new keystore passphrase- 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 KeystoreKeys.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends KeystoreKeys> - 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 KeystoreKeys.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends KeystoreKeys> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
keystore
Keystore resource definition.- Parameters:
keystore- keystore resource, from file path, classpath, URL etc.- Returns:
- updated builder instance
- See Also:
-
keystore
Keystore resource definition.- Parameters:
keystore- prototype of keystore resource, from file path, classpath, URL etc.- Returns:
- updated builder instance
- See Also:
-
keystore
Keystore resource definition.- Parameters:
consumer- consumer of builder of keystore resource, from file path, classpath, URL etc.- Returns:
- updated builder instance
- See Also:
-
keystore
Keystore resource definition.- Parameters:
supplier- supplier of keystore resource, from file path, classpath, URL etc.- Returns:
- updated builder instance
- See Also:
-
type
Set type of keystore. Defaults to "PKCS12", expected are other keystore types supported by java then can store keys under aliases.- Parameters:
type- keystore type to load the key- Returns:
- updated builder instance
- See Also:
-
clearPassphrase
Clear existing value of passphrase.- Returns:
- updated builder instance
- See Also:
-
passphrase
Pass-phrase of the keystore (supported with JKS and PKCS12 keystores).- Parameters:
passphrase- keystore password to use- Returns:
- updated builder instance
- See Also:
-
passphrase
Pass-phrase of the keystore (supported with JKS and PKCS12 keystores).- Parameters:
passphrase- keystore password to use- Returns:
- updated builder instance
- See Also:
-
clearKeyAlias
Clear existing value of keyAlias.- Returns:
- updated builder instance
- See Also:
-
keyAlias
Alias of the private key in the keystore.- Parameters:
keyAlias- alias of the key in the keystore- Returns:
- updated builder instance
- See Also:
-
clearKeyPassphrase
Clear existing value of keyPassphrase.- Returns:
- updated builder instance
- See Also:
-
keyPassphrase
Pass-phrase of the key in the keystore (used for private keys). This is (by default) the same as keystore passphrase - only configure if it differs from keystore passphrase.- Parameters:
keyPassphrase- pass-phrase of the key- Returns:
- updated builder instance
- See Also:
-
keyPassphrase
Pass-phrase of the key in the keystore (used for private keys). This is (by default) the same as keystore passphrase - only configure if it differs from keystore passphrase.- Parameters:
keyPassphrase- pass-phrase of the key- Returns:
- updated builder instance
- See Also:
-
clearCertAlias
Clear existing value of certAlias.- Returns:
- updated builder instance
- See Also:
-
certAlias
Alias of X.509 certificate of public key. Used to load both the certificate and public key.- Parameters:
certAlias- alias under which the certificate is stored in the keystore- Returns:
- updated builder instance
- See Also:
-
clearCertChainAlias
Clear existing value of certChainAlias.- Returns:
- updated builder instance
- See Also:
-
certChainAlias
Alias of an X.509 chain.- Parameters:
certChainAlias- alias of certificate chain in the keystore- Returns:
- updated builder instance
- See Also:
-
clearCertAliases
Clear all certAliases.- Returns:
- updated builder instance
- See Also:
-
certAliases
List of aliases used to generate a trusted set of certificates.- Parameters:
certAliases- aliases of certificates- Returns:
- updated builder instance
- See Also:
-
addCertAliases
List of aliases used to generate a trusted set of certificates.- Parameters:
certAliases- aliases of certificates- Returns:
- updated builder instance
- See Also:
-
addCertAlias
List of aliases used to generate a trusted set of certificates.- Parameters:
certAlias- add single aliases of certificates- Returns:
- updated builder instance
- See Also:
-
trustStore
If you want to build a trust store, call this method to add all certificates present in the keystore to certificate list.- Parameters:
trustStore- whether this is a trust store- Returns:
- updated builder instance
- See Also:
-
keystore
Keystore resource definition.- Returns:
- keystore resource, from file path, classpath, URL etc.
-
type
Set type of keystore. Defaults to "PKCS12", expected are other keystore types supported by java then can store keys under aliases.- Returns:
- keystore type to load the key
-
passphrase
Pass-phrase of the keystore (supported with JKS and PKCS12 keystores).- Returns:
- keystore password to use
-
keyAlias
Alias of the private key in the keystore.- Returns:
- alias of the key in the keystore
-
keyPassphrase
Pass-phrase of the key in the keystore (used for private keys). This is (by default) the same as keystore passphrase - only configure if it differs from keystore passphrase.- Returns:
- pass-phrase of the key
-
certAlias
Alias of X.509 certificate of public key. Used to load both the certificate and public key.- Returns:
- alias under which the certificate is stored in the keystore
-
certChainAlias
Alias of an X.509 chain.- Returns:
- alias of certificate chain in the keystore
-
certAliases
List of aliases used to generate a trusted set of certificates.- Returns:
- aliases of certificates
-
trustStore
public boolean trustStore()If you want to build a trust store, call this method to add all certificates present in the keystore to certificate list.- Returns:
- whether this is a trust store
-
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)