Class XMLSecurityDataFormat.Builder
- java.lang.Object
-
- org.apache.camel.model.dataformat.XMLSecurityDataFormat.Builder
-
- All Implemented Interfaces:
DataFormatBuilder<XMLSecurityDataFormat>
- Enclosing class:
- XMLSecurityDataFormat
public static class XMLSecurityDataFormat.Builder extends Object implements DataFormatBuilder<XMLSecurityDataFormat>
Builder
is a specific builder forXMLSecurityDataFormat
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XMLSecurityDataFormat.Builder
addKeyValueForEncryptedKey(boolean addKeyValueForEncryptedKey)
Whether to add the public key used to encrypt the session key as a KeyValue in the EncryptedKey structure or not.XMLSecurityDataFormat.Builder
addKeyValueForEncryptedKey(String addKeyValueForEncryptedKey)
Whether to add the public key used to encrypt the session key as a KeyValue in the EncryptedKey structure or not.XMLSecurityDataFormat.Builder
digestAlgorithm(String digestAlgorithm)
The digest algorithm to use with the RSA OAEP algorithm.XMLSecurityDataFormat
end()
Ends the build of the data format.XMLSecurityDataFormat.Builder
keyCipherAlgorithm(String keyCipherAlgorithm)
The cipher algorithm to be used for encryption/decryption of the asymmetric key.XMLSecurityDataFormat.Builder
keyOrTrustStoreParameters(org.apache.camel.support.jsse.KeyStoreParameters keyOrTrustStoreParameters)
Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore.XMLSecurityDataFormat.Builder
keyOrTrustStoreParametersRef(String keyOrTrustStoreParametersRef)
Refers to a KeyStore instance to lookup in the registry, which is used for configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore.XMLSecurityDataFormat.Builder
keyPassword(String keyPassword)
The password to be used for retrieving the private key from the KeyStore.XMLSecurityDataFormat.Builder
mgfAlgorithm(String mgfAlgorithm)
The MGF Algorithm to use with the RSA OAEP algorithm.XMLSecurityDataFormat.Builder
namespaces(Map<String,String> namespaces)
Injects the XML Namespaces of prefix -> uri mappingsXMLSecurityDataFormat.Builder
passPhrase(String passPhrase)
A String used as passPhrase to encrypt/decrypt content.XMLSecurityDataFormat.Builder
passPhraseByte(byte[] passPhraseByte)
A byte[] used as passPhrase to encrypt/decrypt content.XMLSecurityDataFormat.Builder
recipientKeyAlias(String recipientKeyAlias)
The key alias to be used when retrieving the recipient's public or private key from a KeyStore when performing asymmetric key encryption or decryption.XMLSecurityDataFormat.Builder
secureTag(String secureTag)
The XPath reference to the XML Element selected for encryption/decryption.XMLSecurityDataFormat.Builder
secureTagContents(boolean secureTagContents)
A boolean value to specify whether the XML Element is to be encrypted or the contents of the XML Element.XMLSecurityDataFormat.Builder
secureTagContents(String secureTagContents)
A boolean value to specify whether the XML Element is to be encrypted or the contents of the XML Element.XMLSecurityDataFormat.Builder
xmlCipherAlgorithm(String xmlCipherAlgorithm)
The cipher algorithm to be used for encryption/decryption of the XML message content.
-
-
-
Method Detail
-
xmlCipherAlgorithm
public XMLSecurityDataFormat.Builder xmlCipherAlgorithm(String xmlCipherAlgorithm)
The cipher algorithm to be used for encryption/decryption of the XML message content. The available choices are:- XMLCipher.TRIPLEDES
- XMLCipher.AES_128
- XMLCipher.AES_128_GCM
- XMLCipher.AES_192
- XMLCipher.AES_192_GCM
- XMLCipher.AES_256
- XMLCipher.AES_256_GCM
- XMLCipher.SEED_128
- XMLCipher.CAMELLIA_128
- XMLCipher.CAMELLIA_192
- XMLCipher.CAMELLIA_256
-
passPhrase
public XMLSecurityDataFormat.Builder passPhrase(String passPhrase)
A String used as passPhrase to encrypt/decrypt content. The passPhrase has to be provided. The passPhrase needs to be put together in conjunction with the appropriate encryption algorithm. For example using TRIPLEDES the passPhase can be a "Only another 24 Byte key"
-
passPhraseByte
public XMLSecurityDataFormat.Builder passPhraseByte(byte[] passPhraseByte)
A byte[] used as passPhrase to encrypt/decrypt content. The passPhrase has to be provided. The passPhrase needs to be put together in conjunction with the appropriate encryption algorithm. For example using TRIPLEDES the passPhase can be a "Only another 24 Byte key"
-
secureTag
public XMLSecurityDataFormat.Builder secureTag(String secureTag)
The XPath reference to the XML Element selected for encryption/decryption. If no tag is specified, the entire payload is encrypted/decrypted.
-
secureTagContents
public XMLSecurityDataFormat.Builder secureTagContents(String secureTagContents)
A boolean value to specify whether the XML Element is to be encrypted or the contents of the XML Element. false = Element Level. true = Element Content Level.
-
secureTagContents
public XMLSecurityDataFormat.Builder secureTagContents(boolean secureTagContents)
A boolean value to specify whether the XML Element is to be encrypted or the contents of the XML Element. false = Element Level. true = Element Content Level.
-
keyCipherAlgorithm
public XMLSecurityDataFormat.Builder keyCipherAlgorithm(String keyCipherAlgorithm)
The cipher algorithm to be used for encryption/decryption of the asymmetric key. The available choices are:- XMLCipher.RSA_v1dot5
- XMLCipher.RSA_OAEP
- XMLCipher.RSA_OAEP_11
-
recipientKeyAlias
public XMLSecurityDataFormat.Builder recipientKeyAlias(String recipientKeyAlias)
The key alias to be used when retrieving the recipient's public or private key from a KeyStore when performing asymmetric key encryption or decryption.
-
keyOrTrustStoreParametersRef
public XMLSecurityDataFormat.Builder keyOrTrustStoreParametersRef(String keyOrTrustStoreParametersRef)
Refers to a KeyStore instance to lookup in the registry, which is used for configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore.
-
keyOrTrustStoreParameters
public XMLSecurityDataFormat.Builder keyOrTrustStoreParameters(org.apache.camel.support.jsse.KeyStoreParameters keyOrTrustStoreParameters)
Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore.
-
keyPassword
public XMLSecurityDataFormat.Builder keyPassword(String keyPassword)
The password to be used for retrieving the private key from the KeyStore. This key is used for asymmetric decryption.
-
digestAlgorithm
public XMLSecurityDataFormat.Builder digestAlgorithm(String digestAlgorithm)
The digest algorithm to use with the RSA OAEP algorithm. The available choices are:- XMLCipher.SHA1
- XMLCipher.SHA256
- XMLCipher.SHA512
-
mgfAlgorithm
public XMLSecurityDataFormat.Builder mgfAlgorithm(String mgfAlgorithm)
The MGF Algorithm to use with the RSA OAEP algorithm. The available choices are:- EncryptionConstants.MGF1_SHA1
- EncryptionConstants.MGF1_SHA256
- EncryptionConstants.MGF1_SHA512
-
addKeyValueForEncryptedKey
public XMLSecurityDataFormat.Builder addKeyValueForEncryptedKey(String addKeyValueForEncryptedKey)
Whether to add the public key used to encrypt the session key as a KeyValue in the EncryptedKey structure or not.
-
addKeyValueForEncryptedKey
public XMLSecurityDataFormat.Builder addKeyValueForEncryptedKey(boolean addKeyValueForEncryptedKey)
Whether to add the public key used to encrypt the session key as a KeyValue in the EncryptedKey structure or not.
-
namespaces
public XMLSecurityDataFormat.Builder namespaces(Map<String,String> namespaces)
Injects the XML Namespaces of prefix -> uri mappings- Parameters:
namespaces
- the XML namespaces with the key of prefixes and the value the URIs
-
end
public XMLSecurityDataFormat end()
Description copied from interface:DataFormatBuilder
Ends the build of the data format.- Specified by:
end
in interfaceDataFormatBuilder<XMLSecurityDataFormat>
- Returns:
- the data format fully built.
-
-