- java.lang.Object
- 
- javax.xml.crypto.dsig.XMLSignatureFactory
 
- 
 
 public abstract class XMLSignatureFactory extends Object A factory for creatingXMLSignatureobjects from scratch or for unmarshalling anXMLSignatureobject from a corresponding XML representation.XMLSignatureFactory TypeEach instance of XMLSignatureFactorysupports a specific XML mechanism type. To create anXMLSignatureFactory, call one of the staticgetInstancemethods, 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. XMLSignatureFactoryimplementations are registered and loaded using theProvidermechanism. For example, a service provider that supports the DOM mechanism would be specified in theProvidersubclass 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 XMLSignatureFactoryinstance to create theXMLStructures of a particularXMLSignaturethat is to be generated. The behavior is undefined ifXMLStructures from different providers or different mechanism types are used together.Also, the XMLStructures that are created by this factory may contain state specific to theXMLSignatureand are not intended to be reusable.Creating XMLSignatures from scratchOnce the XMLSignatureFactoryhas been created, objects can be instantiated by calling the appropriate method. For example, aReferenceinstance may be created by invoking one of thenewReferencemethods.Unmarshalling XMLSignatures from XMLAlternatively, an XMLSignaturemay be created from an existing XML representation by invoking theunmarshalXMLSignaturemethod and passing it a mechanism-specificXMLValidateContextinstance containing the XML content:DOMValidateContext context = new DOMValidateContext(key, signatureElement); XMLSignature signature = factory.unmarshalXMLSignature(context); EachXMLSignatureFactorymust support the requiredXMLValidateContexttypes for that factory type, but may support others. A DOMXMLSignatureFactorymust supportDOMValidateContextobjects.Signing and marshalling XMLSignatures to XMLEachXMLSignaturecreated by the factory can also be marshalled to an XML representation and signed, by invoking thesignmethod of theXMLSignatureobject and passing it a mechanism-specificXMLSignContextobject 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 XMLSignatureFactoryinstance concurrently should synchronize amongst themselves and provide the necessary locking. Multiple threads each manipulating a differentXMLSignatureFactoryinstance need not synchronize.- Since:
- 1.6
 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedXMLSignatureFactory()Default constructor, for invocation by subclasses.
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static XMLSignatureFactorygetInstance()Returns anXMLSignatureFactorythat supports the default XML processing mechanism and representation type ("DOM").static XMLSignatureFactorygetInstance(String mechanismType)Returns anXMLSignatureFactorythat supports the specified XML processing mechanism and representation type (ex: "DOM").static XMLSignatureFactorygetInstance(String mechanismType, String provider)Returns anXMLSignatureFactorythat supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider.static XMLSignatureFactorygetInstance(String mechanismType, Provider provider)Returns anXMLSignatureFactorythat supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider.KeyInfoFactorygetKeyInfoFactory()Returns aKeyInfoFactorythat createsKeyInfoobjects.StringgetMechanismType()Returns the type of the XML processing mechanism and representation supported by thisXMLSignatureFactory(ex: "DOM").ProvidergetProvider()Returns the provider of thisXMLSignatureFactory.abstract URIDereferencergetURIDereferencer()Returns a reference to theURIDereferencerthat is used by default to dereference URIs inReferenceobjects.abstract booleanisFeatureSupported(String feature)Indicates whether a specified feature is supported.abstract CanonicalizationMethodnewCanonicalizationMethod(String algorithm, C14NMethodParameterSpec params)Creates aCanonicalizationMethodfor the specified algorithm URI and parameters.abstract CanonicalizationMethodnewCanonicalizationMethod(String algorithm, XMLStructure params)Creates aCanonicalizationMethodfor the specified algorithm URI and parameters.abstract DigestMethodnewDigestMethod(String algorithm, DigestMethodParameterSpec params)Creates aDigestMethodfor the specified algorithm URI and parameters.abstract ManifestnewManifest(List<? extends Reference> references)Creates aManifestcontaining the specified list ofReferences.abstract ManifestnewManifest(List<? extends Reference> references, String id)Creates aManifestcontaining the specified list ofReferences and optional id.abstract ReferencenewReference(String uri, DigestMethod dm)Creates aReferencewith the specified URI and digest method.abstract ReferencenewReference(String uri, DigestMethod dm, List<? extends Transform> transforms, String type, String id)Creates aReferencewith the specified parameters.abstract ReferencenewReference(String uri, DigestMethod dm, List<? extends Transform> transforms, String type, String id, byte[] digestValue)Creates aReferencewith the specified parameters and pre-calculated digest value.abstract ReferencenewReference(String uri, DigestMethod dm, List<? extends Transform> appliedTransforms, Data result, List<? extends Transform> transforms, String type, String id)Creates aReferencewith the specified parameters.abstract SignatureMethodnewSignatureMethod(String algorithm, SignatureMethodParameterSpec params)Creates aSignatureMethodfor the specified algorithm URI and parameters.abstract SignaturePropertiesnewSignatureProperties(List<? extends SignatureProperty> properties, String id)Creates aSignaturePropertiescontaining the specified list ofSignaturePropertys and optional id.abstract SignaturePropertynewSignatureProperty(List<? extends XMLStructure> content, String target, String id)Creates aSignaturePropertycontaining the specified list ofXMLStructures, target URI and optional id.abstract SignedInfonewSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List<? extends Reference> references)Creates aSignedInfowith the specified canonicalization and signature methods, and list of one or more references.abstract SignedInfonewSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List<? extends Reference> references, String id)Creates aSignedInfowith the specified parameters.abstract TransformnewTransform(String algorithm, TransformParameterSpec params)Creates aTransformfor the specified algorithm URI and parameters.abstract TransformnewTransform(String algorithm, XMLStructure params)Creates aTransformfor the specified algorithm URI and parameters.abstract XMLObjectnewXMLObject(List<? extends XMLStructure> content, String id, String mimeType, String encoding)Creates anXMLObjectfrom the specified parameters.abstract XMLSignaturenewXMLSignature(SignedInfo si, KeyInfo ki)Creates anXMLSignatureand initializes it with the contents of the specifiedSignedInfoandKeyInfoobjects.abstract XMLSignaturenewXMLSignature(SignedInfo si, KeyInfo ki, List<? extends XMLObject> objects, String id, String signatureValueId)Creates anXMLSignatureand initializes it with the specified parameters.abstract XMLSignatureunmarshalXMLSignature(XMLValidateContext context)Unmarshals a newXMLSignatureinstance from a mechanism-specificXMLValidateContextinstance.abstract XMLSignatureunmarshalXMLSignature(XMLStructure xmlStructure)Unmarshals a newXMLSignatureinstance from a mechanism-specificXMLStructureinstance.
 
- 
- 
- 
Method Detail- 
getInstancepublic static XMLSignatureFactory getInstance(String mechanismType) Returns anXMLSignatureFactorythat 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 XMLSignatureFactoryimplementation of the desired mechanism type. It traverses the list of registered securityProviders, starting with the most preferredProvider. A newXMLSignatureFactoryobject from the firstProviderthat supports the specified mechanism is returned.Note that the list of registered providers may be retrieved via the Security.getProviders()method.- Implementation Note:
- The JDK Reference Implementation additionally uses the
 jdk.security.provider.preferredSecurityproperty to determine the preferred provider order for the specified algorithm. This may be different than the order of providers returned bySecurity.getProviders().
- 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- if- mechanismTypeis- null
- NoSuchMechanismException- if no- Providersupports an- XMLSignatureFactoryimplementation for the specified mechanism
- See Also:
- Provider
 
 - 
getInstancepublic static XMLSignatureFactory getInstance(String mechanismType, Provider provider) Returns anXMLSignatureFactorythat supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider. Note that the specifiedProviderobject 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- the- Providerobject
- Returns:
- a new XMLSignatureFactory
- Throws:
- NullPointerException- if- provideror- mechanismTypeis- null
- NoSuchMechanismException- if an- XMLSignatureFactoryimplementation for the specified mechanism is not available from the specified- Providerobject
- See Also:
- Provider
 
 - 
getInstancepublic static XMLSignatureFactory getInstance(String mechanismType, String provider) throws NoSuchProviderException Returns anXMLSignatureFactorythat 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 list
- NullPointerException- if- provideror- mechanismTypeis- null
- NoSuchMechanismException- if an- XMLSignatureFactoryimplementation for the specified mechanism is not available from the specified provider
- See Also:
- Provider
 
 - 
getInstancepublic static XMLSignatureFactory getInstance() Returns anXMLSignatureFactorythat supports the default XML processing mechanism and representation type ("DOM").This method uses the standard JCA provider lookup mechanism to locate and instantiate an XMLSignatureFactoryimplementation of the default mechanism type. It traverses the list of registered securityProviders, starting with the most preferredProvider. A newXMLSignatureFactoryobject from the firstProviderthat 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 no- Providersupports an- XMLSignatureFactoryimplementation for the DOM mechanism
- See Also:
- Provider
 
 - 
getMechanismTypepublic 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
 
 - 
getProviderpublic final Provider getProvider() Returns the provider of thisXMLSignatureFactory.- Returns:
- the provider of this XMLSignatureFactory
 
 - 
newXMLSignaturepublic abstract XMLSignature newXMLSignature(SignedInfo si, KeyInfo ki) Creates anXMLSignatureand initializes it with the contents of the specifiedSignedInfoandKeyInfoobjects.- Parameters:
- si- the signed info
- ki- the key info (may be- null)
- Returns:
- an XMLSignature
- Throws:
- NullPointerException- if- siis- null
 
 - 
newXMLSignaturepublic abstract XMLSignature newXMLSignature(SignedInfo si, KeyInfo ki, List<? extends XMLObject> objects, String id, String signatureValueId) Creates anXMLSignatureand initializes it with the specified parameters.- Parameters:
- si- the signed info
- ki- the key info (may be- null)
- objects- a list of- XMLObjects (may be empty or- null)
- id- the Id (may be- null)
- signatureValueId- the SignatureValue Id (may be- null)
- Returns:
- an XMLSignature
- Throws:
- NullPointerException- if- siis- null
- ClassCastException- if any of the- objectsare not of type- XMLObject
 
 - 
newReferencepublic abstract Reference newReference(String uri, DigestMethod dm) Creates aReferencewith the specified URI and digest method.- Parameters:
- uri- the reference URI (may be- null)
- dm- the digest method
- Returns:
- a Reference
- Throws:
- IllegalArgumentException- if- uriis not RFC 2396 compliant
- NullPointerException- if- dmis- null
 
 - 
newReferencepublic abstract Reference newReference(String uri, DigestMethod dm, List<? extends Transform> transforms, String type, String id) Creates aReferencewith the specified parameters.- Parameters:
- uri- the reference URI (may be- null)
- dm- the digest method
- transforms- a list of- Transforms. The list is defensively copied to protect against subsequent modification. May be- nullor empty.
- type- the reference type, as a URI (may be- null)
- id- the reference ID (may be- null)
- Returns:
- a Reference
- Throws:
- ClassCastException- if any of the- transformsare not of type- Transform
- IllegalArgumentException- if- uriis not RFC 2396 compliant
- NullPointerException- if- dmis- null
 
 - 
newReferencepublic abstract Reference newReference(String uri, DigestMethod dm, List<? extends Transform> transforms, String type, String id, byte[] digestValue) Creates aReferencewith the specified parameters and pre-calculated digest value.This method is useful when the digest value of a Referencehas been previously computed. See for example, the OASIS-DSS (Digital Signature Services) specification.- Parameters:
- uri- the reference URI (may be- null)
- dm- the digest method
- transforms- a list of- Transforms. The list is defensively copied to protect against subsequent modification. May be- nullor empty.
- type- the reference type, as a URI (may be- null)
- id- the reference ID (may be- null)
- digestValue- the digest value. The array is cloned to protect against subsequent modification.
- Returns:
- a Reference
- Throws:
- ClassCastException- if any of the- transformsare not of type- Transform
- IllegalArgumentException- if- uriis not RFC 2396 compliant
- NullPointerException- if- dmor- digestValueis- null
 
 - 
newReferencepublic abstract Reference newReference(String uri, DigestMethod dm, List<? extends Transform> appliedTransforms, Data result, List<? extends Transform> transforms, String type, String id) Creates aReferencewith 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 XMLSignaturecontaining this reference is generated, the specifiedtransforms(if non-null) are applied to the specifiedresult. TheTransformselement of the resultingReferenceelement is set to the concatenation of theappliedTransformsandtransforms.- Parameters:
- uri- the reference URI (may be- null)
- dm- the digest method
- appliedTransforms- a list of- Transforms 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 of- appliedTransforms
- transforms- a list of- Transforms that are to be applied when generating the signature. The list is defensively copied to protect against subsequent modification. May be- nullor empty.
- type- the reference type, as a URI (may be- null)
- id- the reference ID (may be- null)
- Returns:
- a Reference
- Throws:
- ClassCastException- if any of the transforms (in either list) are not of type- Transform
- IllegalArgumentException- if- uriis not RFC 2396 compliant or- appliedTransformsis empty
- NullPointerException- if- dm,- appliedTransformsor- resultis- null
 
 - 
newSignedInfopublic abstract SignedInfo newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List<? extends Reference> references) Creates aSignedInfowith the specified canonicalization and signature methods, and list of one or more references.- Parameters:
- cm- the canonicalization method
- sm- the signature method
- references- a list of one or more- References. The list is defensively copied to protect against subsequent modification.
- Returns:
- a SignedInfo
- Throws:
- ClassCastException- if any of the references are not of type- Reference
- IllegalArgumentException- if- referencesis empty
- NullPointerException- if any of the parameters are- null
 
 - 
newSignedInfopublic abstract SignedInfo newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List<? extends Reference> references, String id) Creates aSignedInfowith the specified parameters.- Parameters:
- cm- the canonicalization method
- sm- the signature method
- references- a list of one or more- References. The list is defensively copied to protect against subsequent modification.
- id- the id (may be- null)
- Returns:
- a SignedInfo
- Throws:
- ClassCastException- if any of the references are not of type- Reference
- IllegalArgumentException- if- referencesis empty
- NullPointerException- if- cm,- sm, or- referencesare- null
 
 - 
newXMLObjectpublic abstract XMLObject newXMLObject(List<? extends XMLStructure> content, String id, String mimeType, String encoding) Creates anXMLObjectfrom the specified parameters.- Parameters:
- content- a list of- XMLStructures. The list is defensively copied to protect against subsequent modification. May be- nullor empty.
- id- the Id (may be- null)
- mimeType- the mime type (may be- null)
- encoding- the encoding (may be- null)
- Returns:
- an XMLObject
- Throws:
- ClassCastException- if- contentcontains any entries that are not of type- XMLStructure
 
 - 
newManifestpublic abstract Manifest newManifest(List<? extends Reference> references) Creates aManifestcontaining the specified list ofReferences.- Parameters:
- references- a list of one or more- References. The list is defensively copied to protect against subsequent modification.
- Returns:
- a Manifest
- Throws:
- NullPointerException- if- referencesis- null
- IllegalArgumentException- if- referencesis empty
- ClassCastException- if- referencescontains any entries that are not of type- Reference
 
 - 
newManifestpublic abstract Manifest newManifest(List<? extends Reference> references, String id) Creates aManifestcontaining the specified list ofReferences and optional id.- Parameters:
- references- a list of one or more- References. The list is defensively copied to protect against subsequent modification.
- id- the id (may be- null)
- Returns:
- a Manifest
- Throws:
- NullPointerException- if- referencesis- null
- IllegalArgumentException- if- referencesis empty
- ClassCastException- if- referencescontains any entries that are not of type- Reference
 
 - 
newSignaturePropertypublic abstract SignatureProperty newSignatureProperty(List<? extends XMLStructure> content, String target, String id) Creates aSignaturePropertycontaining the specified list ofXMLStructures, target URI and optional id.- Parameters:
- content- a list of one or more- XMLStructures. The list is defensively copied to protect against subsequent modification.
- target- the target URI of the Signature that this property applies to
- id- the id (may be- null)
- Returns:
- a SignatureProperty
- Throws:
- NullPointerException- if- contentor- targetis- null
- IllegalArgumentException- if- contentis empty
- ClassCastException- if- contentcontains any entries that are not of type- XMLStructure
 
 - 
newSignaturePropertiespublic abstract SignatureProperties newSignatureProperties(List<? extends SignatureProperty> properties, String id) Creates aSignaturePropertiescontaining the specified list ofSignaturePropertys and optional id.- Parameters:
- properties- a list of one or more- SignaturePropertys. The list is defensively copied to protect against subsequent modification.
- id- the id (may be- null)
- Returns:
- a SignatureProperties
- Throws:
- NullPointerException- if- propertiesis- null
- IllegalArgumentException- if- propertiesis empty
- ClassCastException- if- propertiescontains any entries that are not of type- SignatureProperty
 
 - 
newDigestMethodpublic abstract DigestMethod newDigestMethod(String algorithm, DigestMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException Creates aDigestMethodfor the specified algorithm URI and parameters.- Parameters:
- algorithm- the URI identifying the digest algorithm
- params- algorithm-specific digest parameters (may be- null)
- Returns:
- the DigestMethod
- Throws:
- InvalidAlgorithmParameterException- if the specified parameters are inappropriate for the requested algorithm
- NoSuchAlgorithmException- if an implementation of the specified algorithm cannot be found
- NullPointerException- if- algorithmis- null
 
 - 
newSignatureMethodpublic abstract SignatureMethod newSignatureMethod(String algorithm, SignatureMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException Creates aSignatureMethodfor the specified algorithm URI and parameters.- Parameters:
- algorithm- the URI identifying the signature algorithm
- params- algorithm-specific signature parameters (may be- null)
- Returns:
- the SignatureMethod
- Throws:
- InvalidAlgorithmParameterException- if the specified parameters are inappropriate for the requested algorithm
- NoSuchAlgorithmException- if an implementation of the specified algorithm cannot be found
- NullPointerException- if- algorithmis- null
 
 - 
newTransformpublic abstract Transform newTransform(String algorithm, TransformParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException Creates aTransformfor the specified algorithm URI and parameters.- Parameters:
- algorithm- the URI identifying the transform algorithm
- params- algorithm-specific transform parameters (may be- null)
- Returns:
- the Transform
- Throws:
- InvalidAlgorithmParameterException- if the specified parameters are inappropriate for the requested algorithm
- NoSuchAlgorithmException- if an implementation of the specified algorithm cannot be found
- NullPointerException- if- algorithmis- null
 
 - 
newTransformpublic abstract Transform newTransform(String algorithm, XMLStructure params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException Creates aTransformfor 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 algorithm
- params- a mechanism-specific XML structure from which to unmarshal the parameters from (may be- nullif not required or optional)
- Returns:
- the Transform
- Throws:
- ClassCastException- if the type of- paramsis inappropriate for this- XMLSignatureFactory
- InvalidAlgorithmParameterException- if the specified parameters are inappropriate for the requested algorithm
- NoSuchAlgorithmException- if an implementation of the specified algorithm cannot be found
- NullPointerException- if- algorithmis- null
 
 - 
newCanonicalizationMethodpublic abstract CanonicalizationMethod newCanonicalizationMethod(String algorithm, C14NMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException Creates aCanonicalizationMethodfor the specified algorithm URI and parameters.- Parameters:
- algorithm- the URI identifying the canonicalization algorithm
- params- algorithm-specific canonicalization parameters (may be- null)
- Returns:
- the CanonicalizationMethod
- Throws:
- InvalidAlgorithmParameterException- if the specified parameters are inappropriate for the requested algorithm
- NoSuchAlgorithmException- if an implementation of the specified algorithm cannot be found
- NullPointerException- if- algorithmis- null
 
 - 
newCanonicalizationMethodpublic abstract CanonicalizationMethod newCanonicalizationMethod(String algorithm, XMLStructure params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException Creates aCanonicalizationMethodfor 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 algorithm
- params- a mechanism-specific XML structure from which to unmarshal the parameters from (may be- nullif not required or optional)
- Returns:
- the CanonicalizationMethod
- Throws:
- ClassCastException- if the type of- paramsis inappropriate for this- XMLSignatureFactory
- InvalidAlgorithmParameterException- if the specified parameters are inappropriate for the requested algorithm
- NoSuchAlgorithmException- if an implementation of the specified algorithm cannot be found
- NullPointerException- if- algorithmis- null
 
 - 
getKeyInfoFactorypublic final KeyInfoFactory getKeyInfoFactory() Returns aKeyInfoFactorythat createsKeyInfoobjects. The returnedKeyInfoFactoryhas the same mechanism type and provider as thisXMLSignatureFactory.- Returns:
- a KeyInfoFactory
- Throws:
- NoSuchMechanismException- if a- KeyFactoryimplementation with the same mechanism type and provider is not available
 
 - 
unmarshalXMLSignaturepublic abstract XMLSignature unmarshalXMLSignature(XMLValidateContext context) throws MarshalException Unmarshals a newXMLSignatureinstance from a mechanism-specificXMLValidateContextinstance.- Parameters:
- context- a mechanism-specific context from which to unmarshal the signature from
- Returns:
- the XMLSignature
- Throws:
- NullPointerException- if- contextis- null
- ClassCastException- if the type of- contextis inappropriate for this factory
- MarshalException- if an unrecoverable exception occurs during unmarshalling
 
 - 
unmarshalXMLSignaturepublic abstract XMLSignature unmarshalXMLSignature(XMLStructure xmlStructure) throws MarshalException Unmarshals a newXMLSignatureinstance from a mechanism-specificXMLStructureinstance. 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- if- xmlStructureis- null
- ClassCastException- if the type of- xmlStructureis inappropriate for this factory
- MarshalException- if an unrecoverable exception occurs during unmarshalling
 
 - 
isFeatureSupportedpublic abstract boolean isFeatureSupported(String feature) Indicates whether a specified feature is supported.- Parameters:
- feature- the feature name (as an absolute URI)
- Returns:
- trueif the specified feature is supported,- falseotherwise
- Throws:
- NullPointerException- if- featureis- null
 
 - 
getURIDereferencerpublic abstract URIDereferencer getURIDereferencer() Returns a reference to theURIDereferencerthat is used by default to dereference URIs inReferenceobjects.- Returns:
- a reference to the default URIDereferencer(nevernull)
 
 
- 
 
-