- java.lang.Object
-
- javax.xml.crypto.dsig.XMLSignatureFactory
-
public abstract class XMLSignatureFactory extends Object
A factory for creatingXMLSignature
objects from scratch or for unmarshalling anXMLSignature
object from a corresponding XML representation.XMLSignatureFactory Type
Each instance of
XMLSignatureFactory
supports a specific XML mechanism type. To create anXMLSignatureFactory
, call one of the staticgetInstance
methods, passing in the XML mechanism type desired, for example:XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");
The objects that this factory produces will be based on DOM and abide by the DOM interoperability requirements as defined in the DOM Mechanism Requirements section of the API overview. See the Service Providers section of the API overview for a list of standard mechanism types.
XMLSignatureFactory
implementations are registered and loaded using theProvider
mechanism. For example, a service provider that supports the DOM mechanism would be specified in theProvider
subclass as:put("XMLSignatureFactory.DOM", "org.example.DOMXMLSignatureFactory");
An implementation MUST minimally support the default mechanism type: DOM.
Note that a caller must use the same
XMLSignatureFactory
instance to create theXMLStructure
s of a particularXMLSignature
that is to be generated. The behavior is undefined ifXMLStructure
s from different providers or different mechanism types are used together.Also, the
XMLStructure
s that are created by this factory may contain state specific to theXMLSignature
and are not intended to be reusable.Creating XMLSignatures from scratch
Once the
XMLSignatureFactory
has been created, objects can be instantiated by calling the appropriate method. For example, aReference
instance may be created by invoking one of thenewReference
methods.Unmarshalling XMLSignatures from XML
Alternatively, an
XMLSignature
may be created from an existing XML representation by invoking theunmarshalXMLSignature
method and passing it a mechanism-specificXMLValidateContext
instance containing the XML content:DOMValidateContext context = new DOMValidateContext(key, signatureElement); XMLSignature signature = factory.unmarshalXMLSignature(context);
EachXMLSignatureFactory
must support the requiredXMLValidateContext
types for that factory type, but may support others. A DOMXMLSignatureFactory
must supportDOMValidateContext
objects.Signing and marshalling XMLSignatures to XML
EachXMLSignature
created by the factory can also be marshalled to an XML representation and signed, by invoking thesign
method of theXMLSignature
object and passing it a mechanism-specificXMLSignContext
object containing the signing key and marshalling parameters (seeDOMSignContext
). For example:DOMSignContext context = new DOMSignContext(privateKey, document); signature.sign(context);
Concurrent AccessThe static methods of this class are guaranteed to be thread-safe. Multiple threads may concurrently invoke the static methods defined in this class with no ill effects.
However, this is not true for the non-static methods defined by this class. Unless otherwise documented by a specific provider, threads that need to access a single
XMLSignatureFactory
instance concurrently should synchronize amongst themselves and provide the necessary locking. Multiple threads each manipulating a differentXMLSignatureFactory
instance need not synchronize.- Since:
- 1.6
-
-
Constructor Summary
Constructors Modifier Constructor and Description protected
XMLSignatureFactory()
Default constructor, for invocation by subclasses.
-
Method Summary
Methods Modifier and Type Method and Description static XMLSignatureFactory
getInstance()
Returns anXMLSignatureFactory
that supports the default XML processing mechanism and representation type ("DOM").static XMLSignatureFactory
getInstance(String mechanismType)
Returns anXMLSignatureFactory
that supports the specified XML processing mechanism and representation type (ex: "DOM").static XMLSignatureFactory
getInstance(String mechanismType, Provider provider)
Returns anXMLSignatureFactory
that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider.static XMLSignatureFactory
getInstance(String mechanismType, String provider)
Returns anXMLSignatureFactory
that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider.KeyInfoFactory
getKeyInfoFactory()
Returns aKeyInfoFactory
that createsKeyInfo
objects.String
getMechanismType()
Returns the type of the XML processing mechanism and representation supported by thisXMLSignatureFactory
(ex: "DOM").Provider
getProvider()
Returns the provider of thisXMLSignatureFactory
.abstract URIDereferencer
getURIDereferencer()
Returns a reference to theURIDereferencer
that is used by default to dereference URIs inReference
objects.abstract boolean
isFeatureSupported(String feature)
Indicates whether a specified feature is supported.abstract CanonicalizationMethod
newCanonicalizationMethod(String algorithm, C14NMethodParameterSpec params)
Creates aCanonicalizationMethod
for the specified algorithm URI and parameters.abstract CanonicalizationMethod
newCanonicalizationMethod(String algorithm, XMLStructure params)
Creates aCanonicalizationMethod
for the specified algorithm URI and parameters.abstract DigestMethod
newDigestMethod(String algorithm, DigestMethodParameterSpec params)
Creates aDigestMethod
for the specified algorithm URI and parameters.abstract Manifest
newManifest(List references)
Creates aManifest
containing the specified list ofReference
s.abstract Manifest
newManifest(List references, String id)
Creates aManifest
containing the specified list ofReference
s and optional id.abstract Reference
newReference(String uri, DigestMethod dm)
Creates aReference
with the specified URI and digest method.abstract Reference
newReference(String uri, DigestMethod dm, List appliedTransforms, Data result, List transforms, String type, String id)
Creates aReference
with the specified parameters.abstract Reference
newReference(String uri, DigestMethod dm, List transforms, String type, String id)
Creates aReference
with the specified parameters.abstract Reference
newReference(String uri, DigestMethod dm, List transforms, String type, String id, byte[] digestValue)
Creates aReference
with the specified parameters and pre-calculated digest value.abstract SignatureMethod
newSignatureMethod(String algorithm, SignatureMethodParameterSpec params)
Creates aSignatureMethod
for the specified algorithm URI and parameters.abstract SignatureProperties
newSignatureProperties(List properties, String id)
Creates aSignatureProperties
containing the specified list ofSignatureProperty
s and optional id.abstract SignatureProperty
newSignatureProperty(List content, String target, String id)
Creates aSignatureProperty
containing the specified list ofXMLStructure
s, target URI and optional id.abstract SignedInfo
newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references)
Creates aSignedInfo
with the specified canonicalization and signature methods, and list of one or more references.abstract SignedInfo
newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references, String id)
Creates aSignedInfo
with the specified parameters.abstract Transform
newTransform(String algorithm, TransformParameterSpec params)
Creates aTransform
for the specified algorithm URI and parameters.abstract Transform
newTransform(String algorithm, XMLStructure params)
Creates aTransform
for the specified algorithm URI and parameters.abstract XMLObject
newXMLObject(List content, String id, String mimeType, String encoding)
Creates anXMLObject
from the specified parameters.abstract XMLSignature
newXMLSignature(SignedInfo si, KeyInfo ki)
Creates anXMLSignature
and initializes it with the contents of the specifiedSignedInfo
andKeyInfo
objects.abstract XMLSignature
newXMLSignature(SignedInfo si, KeyInfo ki, List objects, String id, String signatureValueId)
Creates anXMLSignature
and initializes it with the specified parameters.abstract XMLSignature
unmarshalXMLSignature(XMLStructure xmlStructure)
Unmarshals a newXMLSignature
instance from a mechanism-specificXMLStructure
instance.abstract XMLSignature
unmarshalXMLSignature(XMLValidateContext context)
Unmarshals a newXMLSignature
instance from a mechanism-specificXMLValidateContext
instance.
-
-
-
Constructor Detail
-
XMLSignatureFactory
protected XMLSignatureFactory()
Default constructor, for invocation by subclasses.
-
-
Method Detail
-
getInstance
public static XMLSignatureFactory getInstance(String mechanismType)
Returns anXMLSignatureFactory
that supports the specified XML processing mechanism and representation type (ex: "DOM").This method uses the standard JCA provider lookup mechanism to locate and instantiate an
XMLSignatureFactory
implementation of the desired mechanism type. It traverses the list of registered securityProvider
s, starting with the most preferredProvider
. A newXMLSignatureFactory
object from the firstProvider
that supports the specified mechanism is returned.Note that the list of registered providers may be retrieved via the
Security.getProviders()
method.- Parameters:
mechanismType
- the type of the XML processing mechanism and representation. See the Service Providers section of the API overview for a list of standard mechanism types.- Returns:
- a new
XMLSignatureFactory
- Throws:
NullPointerException
- ifmechanismType
isnull
NoSuchMechanismException
- if noProvider
supports anXMLSignatureFactory
implementation for the specified mechanism- See Also:
Provider
-
getInstance
public static XMLSignatureFactory getInstance(String mechanismType, Provider provider)
Returns anXMLSignatureFactory
that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider. Note that the specifiedProvider
object does not have to be registered in the provider list.- Parameters:
mechanismType
- the type of the XML processing mechanism and representation. See the Service Providers section of the API overview for a list of standard mechanism types.provider
- theProvider
object- Returns:
- a new
XMLSignatureFactory
- Throws:
NullPointerException
- ifprovider
ormechanismType
isnull
NoSuchMechanismException
- if anXMLSignatureFactory
implementation for the specified mechanism is not available from the specifiedProvider
object- See Also:
Provider
-
getInstance
public static XMLSignatureFactory getInstance(String mechanismType, String provider) throws NoSuchProviderException
Returns anXMLSignatureFactory
that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider. The specified provider must be registered in the security provider list.Note that the list of registered providers may be retrieved via the
Security.getProviders()
method.- Parameters:
mechanismType
- the type of the XML processing mechanism and representation. See the Service Providers section of the API overview for a list of standard mechanism types.provider
- the string name of the provider- Returns:
- a new
XMLSignatureFactory
- Throws:
NoSuchProviderException
- if the specified provider is not registered in the security provider listNullPointerException
- ifprovider
ormechanismType
isnull
NoSuchMechanismException
- if anXMLSignatureFactory
implementation for the specified mechanism is not available from the specified provider- See Also:
Provider
-
getInstance
public static XMLSignatureFactory getInstance()
Returns anXMLSignatureFactory
that supports the default XML processing mechanism and representation type ("DOM").This method uses the standard JCA provider lookup mechanism to locate and instantiate an
XMLSignatureFactory
implementation of the default mechanism type. It traverses the list of registered securityProvider
s, starting with the most preferredProvider
. A newXMLSignatureFactory
object from the firstProvider
that supports the DOM mechanism is returned.Note that the list of registered providers may be retrieved via the
Security.getProviders()
method.- Returns:
- a new
XMLSignatureFactory
- Throws:
NoSuchMechanismException
- if noProvider
supports anXMLSignatureFactory
implementation for the DOM mechanism- See Also:
Provider
-
getMechanismType
public final String getMechanismType()
Returns the type of the XML processing mechanism and representation supported by thisXMLSignatureFactory
(ex: "DOM").- Returns:
- the XML processing mechanism type supported by this
XMLSignatureFactory
-
getProvider
public final Provider getProvider()
Returns the provider of thisXMLSignatureFactory
.- Returns:
- the provider of this
XMLSignatureFactory
-
newXMLSignature
public abstract XMLSignature newXMLSignature(SignedInfo si, KeyInfo ki)
Creates anXMLSignature
and initializes it with the contents of the specifiedSignedInfo
andKeyInfo
objects.- Parameters:
si
- the signed infoki
- the key info (may benull
)- Returns:
- an
XMLSignature
- Throws:
NullPointerException
- ifsi
isnull
-
newXMLSignature
public abstract XMLSignature newXMLSignature(SignedInfo si, KeyInfo ki, List objects, String id, String signatureValueId)
Creates anXMLSignature
and initializes it with the specified parameters.- Parameters:
si
- the signed infoki
- the key info (may benull
)objects
- a list ofXMLObject
s (may be empty ornull
)id
- the Id (may benull
)signatureValueId
- the SignatureValue Id (may benull
)- Returns:
- an
XMLSignature
- Throws:
NullPointerException
- ifsi
isnull
ClassCastException
- if any of theobjects
are not of typeXMLObject
-
newReference
public abstract Reference newReference(String uri, DigestMethod dm)
Creates aReference
with the specified URI and digest method.- Parameters:
uri
- the reference URI (may benull
)dm
- the digest method- Returns:
- a
Reference
- Throws:
IllegalArgumentException
- ifuri
is not RFC 2396 compliantNullPointerException
- ifdm
isnull
-
newReference
public abstract Reference newReference(String uri, DigestMethod dm, List transforms, String type, String id)
Creates aReference
with the specified parameters.- Parameters:
uri
- the reference URI (may benull
)dm
- the digest methodtransforms
- a list ofTransform
s. The list is defensively copied to protect against subsequent modification. May benull
or empty.type
- the reference type, as a URI (may benull
)id
- the reference ID (may benull
)- Returns:
- a
Reference
- Throws:
ClassCastException
- if any of thetransforms
are not of typeTransform
IllegalArgumentException
- ifuri
is not RFC 2396 compliantNullPointerException
- ifdm
isnull
-
newReference
public abstract Reference newReference(String uri, DigestMethod dm, List transforms, String type, String id, byte[] digestValue)
Creates aReference
with the specified parameters and pre-calculated digest value.This method is useful when the digest value of a
Reference
has been previously computed. See for example, the OASIS-DSS (Digital Signature Services) specification.- Parameters:
uri
- the reference URI (may benull
)dm
- the digest methodtransforms
- a list ofTransform
s. The list is defensively copied to protect against subsequent modification. May benull
or empty.type
- the reference type, as a URI (may benull
)id
- the reference ID (may benull
)digestValue
- the digest value. The array is cloned to protect against subsequent modification.- Returns:
- a
Reference
- Throws:
ClassCastException
- if any of thetransforms
are not of typeTransform
IllegalArgumentException
- ifuri
is not RFC 2396 compliantNullPointerException
- ifdm
ordigestValue
isnull
-
newReference
public abstract Reference newReference(String uri, DigestMethod dm, List appliedTransforms, Data result, List transforms, String type, String id)
Creates aReference
with the specified parameters.This method is useful when a list of transforms have already been applied to the
Reference
. See for example, the OASIS-DSS (Digital Signature Services) specification.When an
XMLSignature
containing this reference is generated, the specifiedtransforms
(if non-null) are applied to the specifiedresult
. TheTransforms
element of the resultingReference
element is set to the concatenation of theappliedTransforms
andtransforms
.- Parameters:
uri
- the reference URI (may benull
)dm
- the digest methodappliedTransforms
- a list ofTransform
s that have already been applied. The list is defensively copied to protect against subsequent modification. The list must contain at least one entry.result
- the result of processing the sequence ofappliedTransforms
transforms
- a list ofTransform
s that are to be applied when generating the signature. The list is defensively copied to protect against subsequent modification. May benull
or empty.type
- the reference type, as a URI (may benull
)id
- the reference ID (may benull
)- Returns:
- a
Reference
- Throws:
ClassCastException
- if any of the transforms (in either list) are not of typeTransform
IllegalArgumentException
- ifuri
is not RFC 2396 compliant orappliedTransforms
is emptyNullPointerException
- ifdm
,appliedTransforms
orresult
isnull
-
newSignedInfo
public abstract SignedInfo newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references)
Creates aSignedInfo
with the specified canonicalization and signature methods, and list of one or more references.- Parameters:
cm
- the canonicalization methodsm
- the signature methodreferences
- a list of one or moreReference
s. The list is defensively copied to protect against subsequent modification.- Returns:
- a
SignedInfo
- Throws:
ClassCastException
- if any of the references are not of typeReference
IllegalArgumentException
- ifreferences
is emptyNullPointerException
- if any of the parameters arenull
-
newSignedInfo
public abstract SignedInfo newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references, String id)
Creates aSignedInfo
with the specified parameters.- Parameters:
cm
- the canonicalization methodsm
- the signature methodreferences
- a list of one or moreReference
s. The list is defensively copied to protect against subsequent modification.id
- the id (may benull
)- Returns:
- a
SignedInfo
- Throws:
ClassCastException
- if any of the references are not of typeReference
IllegalArgumentException
- ifreferences
is emptyNullPointerException
- ifcm
,sm
, orreferences
arenull
-
newXMLObject
public abstract XMLObject newXMLObject(List content, String id, String mimeType, String encoding)
Creates anXMLObject
from the specified parameters.- Parameters:
content
- a list ofXMLStructure
s. The list is defensively copied to protect against subsequent modification. May benull
or empty.id
- the Id (may benull
)mimeType
- the mime type (may benull
)encoding
- the encoding (may benull
)- Returns:
- an
XMLObject
- Throws:
ClassCastException
- ifcontent
contains any entries that are not of typeXMLStructure
-
newManifest
public abstract Manifest newManifest(List references)
Creates aManifest
containing the specified list ofReference
s.- Parameters:
references
- a list of one or moreReference
s. The list is defensively copied to protect against subsequent modification.- Returns:
- a
Manifest
- Throws:
NullPointerException
- ifreferences
isnull
IllegalArgumentException
- ifreferences
is emptyClassCastException
- ifreferences
contains any entries that are not of typeReference
-
newManifest
public abstract Manifest newManifest(List references, String id)
Creates aManifest
containing the specified list ofReference
s and optional id.- Parameters:
references
- a list of one or moreReference
s. The list is defensively copied to protect against subsequent modification.id
- the id (may benull
)- Returns:
- a
Manifest
- Throws:
NullPointerException
- ifreferences
isnull
IllegalArgumentException
- ifreferences
is emptyClassCastException
- ifreferences
contains any entries that are not of typeReference
-
newSignatureProperty
public abstract SignatureProperty newSignatureProperty(List content, String target, String id)
Creates aSignatureProperty
containing the specified list ofXMLStructure
s, target URI and optional id.- Parameters:
content
- a list of one or moreXMLStructure
s. The list is defensively copied to protect against subsequent modification.target
- the target URI of the Signature that this property applies toid
- the id (may benull
)- Returns:
- a
SignatureProperty
- Throws:
NullPointerException
- ifcontent
ortarget
isnull
IllegalArgumentException
- ifcontent
is emptyClassCastException
- ifcontent
contains any entries that are not of typeXMLStructure
-
newSignatureProperties
public abstract SignatureProperties newSignatureProperties(List properties, String id)
Creates aSignatureProperties
containing the specified list ofSignatureProperty
s and optional id.- Parameters:
properties
- a list of one or moreSignatureProperty
s. The list is defensively copied to protect against subsequent modification.id
- the id (may benull
)- Returns:
- a
SignatureProperties
- Throws:
NullPointerException
- ifproperties
isnull
IllegalArgumentException
- ifproperties
is emptyClassCastException
- ifproperties
contains any entries that are not of typeSignatureProperty
-
newDigestMethod
public abstract DigestMethod newDigestMethod(String algorithm, DigestMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
Creates aDigestMethod
for the specified algorithm URI and parameters.- Parameters:
algorithm
- the URI identifying the digest algorithmparams
- algorithm-specific digest parameters (may benull
)- Returns:
- the
DigestMethod
- Throws:
InvalidAlgorithmParameterException
- if the specified parameters are inappropriate for the requested algorithmNoSuchAlgorithmException
- if an implementation of the specified algorithm cannot be foundNullPointerException
- ifalgorithm
isnull
-
newSignatureMethod
public abstract SignatureMethod newSignatureMethod(String algorithm, SignatureMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
Creates aSignatureMethod
for the specified algorithm URI and parameters.- Parameters:
algorithm
- the URI identifying the signature algorithmparams
- algorithm-specific signature parameters (may benull
)- Returns:
- the
SignatureMethod
- Throws:
InvalidAlgorithmParameterException
- if the specified parameters are inappropriate for the requested algorithmNoSuchAlgorithmException
- if an implementation of the specified algorithm cannot be foundNullPointerException
- ifalgorithm
isnull
-
newTransform
public abstract Transform newTransform(String algorithm, TransformParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
Creates aTransform
for the specified algorithm URI and parameters.- Parameters:
algorithm
- the URI identifying the transform algorithmparams
- algorithm-specific transform parameters (may benull
)- Returns:
- the
Transform
- Throws:
InvalidAlgorithmParameterException
- if the specified parameters are inappropriate for the requested algorithmNoSuchAlgorithmException
- if an implementation of the specified algorithm cannot be foundNullPointerException
- ifalgorithm
isnull
-
newTransform
public abstract Transform newTransform(String algorithm, XMLStructure params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
Creates aTransform
for the specified algorithm URI and parameters. The parameters are specified as a mechanism-specificXMLStructure
(ex:DOMStructure
). This method is useful when the parameters are in XML form or there is no standard class for specifying the parameters.- Parameters:
algorithm
- the URI identifying the transform algorithmparams
- a mechanism-specific XML structure from which to unmarshal the parameters from (may benull
if not required or optional)- Returns:
- the
Transform
- Throws:
ClassCastException
- if the type ofparams
is inappropriate for thisXMLSignatureFactory
InvalidAlgorithmParameterException
- if the specified parameters are inappropriate for the requested algorithmNoSuchAlgorithmException
- if an implementation of the specified algorithm cannot be foundNullPointerException
- ifalgorithm
isnull
-
newCanonicalizationMethod
public abstract CanonicalizationMethod newCanonicalizationMethod(String algorithm, C14NMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
Creates aCanonicalizationMethod
for the specified algorithm URI and parameters.- Parameters:
algorithm
- the URI identifying the canonicalization algorithmparams
- algorithm-specific canonicalization parameters (may benull
)- Returns:
- the
CanonicalizationMethod
- Throws:
InvalidAlgorithmParameterException
- if the specified parameters are inappropriate for the requested algorithmNoSuchAlgorithmException
- if an implementation of the specified algorithm cannot be foundNullPointerException
- ifalgorithm
isnull
-
newCanonicalizationMethod
public abstract CanonicalizationMethod newCanonicalizationMethod(String algorithm, XMLStructure params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
Creates aCanonicalizationMethod
for the specified algorithm URI and parameters. The parameters are specified as a mechanism-specificXMLStructure
(ex:DOMStructure
). This method is useful when the parameters are in XML form or there is no standard class for specifying the parameters.- Parameters:
algorithm
- the URI identifying the canonicalization algorithmparams
- a mechanism-specific XML structure from which to unmarshal the parameters from (may benull
if not required or optional)- Returns:
- the
CanonicalizationMethod
- Throws:
ClassCastException
- if the type ofparams
is inappropriate for thisXMLSignatureFactory
InvalidAlgorithmParameterException
- if the specified parameters are inappropriate for the requested algorithmNoSuchAlgorithmException
- if an implementation of the specified algorithm cannot be foundNullPointerException
- ifalgorithm
isnull
-
getKeyInfoFactory
public final KeyInfoFactory getKeyInfoFactory()
Returns aKeyInfoFactory
that createsKeyInfo
objects. The returnedKeyInfoFactory
has the same mechanism type and provider as thisXMLSignatureFactory
.- Returns:
- a
KeyInfoFactory
- Throws:
NoSuchMechanismException
- if aKeyFactory
implementation with the same mechanism type and provider is not available
-
unmarshalXMLSignature
public abstract XMLSignature unmarshalXMLSignature(XMLValidateContext context) throws MarshalException
Unmarshals a newXMLSignature
instance from a mechanism-specificXMLValidateContext
instance.- Parameters:
context
- a mechanism-specific context from which to unmarshal the signature from- Returns:
- the
XMLSignature
- Throws:
NullPointerException
- ifcontext
isnull
ClassCastException
- if the type ofcontext
is inappropriate for this factoryMarshalException
- if an unrecoverable exception occurs during unmarshalling
-
unmarshalXMLSignature
public abstract XMLSignature unmarshalXMLSignature(XMLStructure xmlStructure) throws MarshalException
Unmarshals a newXMLSignature
instance from a mechanism-specificXMLStructure
instance. This method is useful if you only want to unmarshal (and not validate) anXMLSignature
.- Parameters:
xmlStructure
- a mechanism-specific XML structure from which to unmarshal the signature from- Returns:
- the
XMLSignature
- Throws:
NullPointerException
- ifxmlStructure
isnull
ClassCastException
- if the type ofxmlStructure
is inappropriate for this factoryMarshalException
- if an unrecoverable exception occurs during unmarshalling
-
isFeatureSupported
public abstract boolean isFeatureSupported(String feature)
Indicates whether a specified feature is supported.- Parameters:
feature
- the feature name (as an absolute URI)- Returns:
true
if the specified feature is supported,false
otherwise- Throws:
NullPointerException
- iffeature
isnull
-
getURIDereferencer
public abstract URIDereferencer getURIDereferencer()
Returns a reference to theURIDereferencer
that is used by default to dereference URIs inReference
objects.- Returns:
- a reference to the default
URIDereferencer
(nevernull
)
-
-
Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-javax/xml/crypto/dsig/XMLSignatureFactory.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.