public final class DomainLoadStoreParameter extends Object implements KeyStore.LoadStoreParameter
KeyStore
load
and
store
operations.
The following syntax is supported for configuration data:
___domain <domainName> [<property> ...] {
keystore <keystoreName> [<property> ...] ;
...
};
...
where domainName
and keystoreName
are identifiers
and property
is a key/value pairing. The key and value are
separated by an 'equals' symbol and the value is enclosed in double
quotes. A property value may be either a printable string or a binary
string of colon-separated pairs of hexadecimal digits. Multi-valued
properties are represented as a comma-separated list of values,
enclosed in square brackets.
See Arrays.toString(java.lang.Object[])
.
To ensure that keystore entries are uniquely identified, each
entry's alias is prefixed by its keystoreName
followed
by the entry name separator and each keystoreName
must be
unique within its ___domain. Entry name prefixes are omitted when
storing a keystore.
Properties are context-sensitive: properties that apply to all the keystores in a ___domain are located in the ___domain clause, and properties that apply only to a specific keystore are located in that keystore's clause. Unless otherwise specified, a property in a keystore clause overrides a property of the same name in the ___domain clause. All property names are case-insensitive. The following properties are supported:
keystoreType="<type>"
keystoreURI="<url>"
keystoreProviderName="<name>"
keystorePasswordEnv="<environment-variable>"
Map<String, ProtectionParameter>
. entryNameSeparator="<separator>"
For example, configuration data for a simple keystore ___domain comprising three keystores is shown below:
___domain app1 { keystore app1-truststore keystoreURI="file:///app1/etc/truststore.jks"; keystore system-truststore keystoreURI="${java.home}/lib/security/cacerts"; keystore app1-keystore keystoreType="PKCS12" keystoreURI="file:///app1/etc/keystore.p12"; };
Constructor | Description |
---|---|
DomainLoadStoreParameter(URI configuration,
Map<String,KeyStore.ProtectionParameter> protectionParams) |
Constructs a DomainLoadStoreParameter for a keystore ___domain with
the parameters used to protect keystore data.
|
Modifier and Type | Method | Description |
---|---|---|
URI |
getConfiguration() |
Gets the identifier for the ___domain configuration data.
|
KeyStore.ProtectionParameter |
getProtectionParameter() |
Gets the keystore protection parameters for this ___domain.
|
Map<String,KeyStore.ProtectionParameter> |
getProtectionParams() |
Gets the keystore protection parameters for keystores in this
___domain.
|
public DomainLoadStoreParameter(URI configuration, Map<String,KeyStore.ProtectionParameter> protectionParams)
configuration
- identifier for the ___domain configuration data.
The name of the target ___domain should be specified in the
java.net.URI
fragment component when it is necessary
to distinguish between several ___domain configurations at the
same ___location.protectionParams
- the map from keystore name to the parameter
used to protect keystore data.
A java.util.Collections.EMPTY_MAP
should be used
when protection parameters are not required or when they have
been specified by properties in the ___domain configuration data.
It is cloned to prevent subsequent modification.NullPointerException
- if configuration
or
protectionParams
is null
public URI getConfiguration()
public Map<String,KeyStore.ProtectionParameter> getProtectionParams()
public KeyStore.ProtectionParameter getProtectionParameter()
getProtectionParameter
in interface KeyStore.LoadStoreParameter
null
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.