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> Prototype.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 Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
KeystoreKeys
.-
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 TypeMethodDescriptionaddCertAlias
(String certAlias) List of aliases used to generate a trusted set of certificates.addCertAliases
(List<? extends 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<? extends 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 this property.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).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 keystoreConfig) Keystore resource definition.keystore
(Consumer<ResourceConfig.Builder> consumer) Keystore resource definition.Keystore resource definition.keystorePassphrase
(String passphrase) Deprecated.Optional
<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 void
Handles providers and decorators.toString()
boolean
If 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 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
-
keystorePassphrase
Deprecated.usepassphrase(String)
insteadKeystore passphrase.- Parameters:
passphrase
- new keystore passphrase- 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 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:
keystoreConfig
- keystore resource, from file path, classpath, URL etc.- Returns:
- updated builder instance
- See Also:
-
keystore
Keystore resource definition.- Parameters:
consumer
- consumer of builder for 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 this property.- 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 this property.- 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 this property.- 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 this property.- 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 this property.- 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:
-
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
- 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:
- the keystore
-
type
Set type of keystore. Defaults to "PKCS12", expected are other keystore types supported by java then can store keys under aliases.- Returns:
- the type
-
passphrase
Pass-phrase of the keystore (supported with JKS and PKCS12 keystores).- Returns:
- the passphrase
-
keyAlias
Alias of the private key in the keystore.- Returns:
- the key alias
-
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:
- the key passphrase
-
certAlias
Alias of X.509 certificate of public key. Used to load both the certificate and public key.- Returns:
- the cert alias
-
certChainAlias
Alias of an X.509 chain.- Returns:
- the cert chain alias
-
certAliases
List of aliases used to generate a trusted set of certificates.- Returns:
- the cert aliases
-
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:
- the trust store
-
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.
-
passphrase(String)
instead