public class XmlEncryptionFactory extends XmlEncFactory
If using this factory, then the document to be encrypted is expected to already be an XML document. This means that any
EncryptedData that are generated, will have an attribute
Type="http://www.w3.org/2001/04/xmlenc#Element". This may of course break some JSR106 implementations. If testing
reveals that to be the case then you should use the RawXmlEncryptionFactory in preference which allows you to set
the Type and MimeType respectively.
THis is a pure XML Encryption implementation, any attempt to do signing will cause a UnsupportedOperationException to be thrown.
The underlying encryption facility only allows for the following types of (the key length is implicit in the algorithm type and does not need to be specified) :
RawXmlEncryptionFactoryIn the adapter configuration file this class is aliased as xml-encryption-factory. which is the preferred alternative to the fully qualified classname when building your configuration.
License Required: STANDARD
log| Constructor and Description |
|---|
XmlEncryptionFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected SecurityService |
build() |
KeyValuePairSet |
getNamespaceContext() |
java.lang.String |
getXpath() |
void |
setNamespaceContext(KeyValuePairSet kvps)
Set the namespace context for resolving namespaces.
|
void |
setXpath(java.lang.String xpath)
Set the XPATH that will be used to extract the Elements that will be
encrypted.
|
createService, getIdGenerator, isEnabled, setIdGeneratordefaultInstanceprotected SecurityService build() throws AdaptrisSecurityException
build in class XmlEncFactoryAdaptrisSecurityExceptionSecurityServiceFactory.createService()public java.lang.String getXpath()
public void setXpath(java.lang.String xpath)
If the specifed XPath does not resolve to a NodeList of Elements, then an exception will be thrown by the underyling encryption implementation.
Setting this has no effect when attempting decryption, all
EncryptedData elements will be iteratively decrypted.
xpath - the xpath to setpublic KeyValuePairSet getNamespaceContext()
public void setNamespaceContext(KeyValuePairSet kvps)
kvps - the namespace contextSimpleNamespaceContext.create(KeyValuePairSet)