org.jcp.xml.dsig.internal.dom
Class DOMXMLSignatureFactory

java.lang.Object
  extended by javax.xml.crypto.dsig.XMLSignatureFactory
      extended by org.jcp.xml.dsig.internal.dom.DOMXMLSignatureFactory

public final class DOMXMLSignatureFactory
extends XMLSignatureFactory

Disabled: no SafeJ information.

DOM-based implementation of XMLSignatureFactory.


Constructor Summary
DOMXMLSignatureFactory()
          Initializes a new instance of this class.
 
Method Summary
 URIDereferencer getURIDereferencer()
          Returns a reference to the URIDereferencer that is used by default to dereference URIs in Reference objects.
 boolean isFeatureSupported(String feature)
          Indicates whether a specified feature is supported.
 CanonicalizationMethod newCanonicalizationMethod(String algorithm, C14NMethodParameterSpec params)
          Creates a CanonicalizationMethod for the specified algorithm URI and parameters.
 CanonicalizationMethod newCanonicalizationMethod(String algorithm, XMLStructure params)
          Creates a CanonicalizationMethod for the specified algorithm URI and parameters.
 DigestMethod newDigestMethod(String algorithm, DigestMethodParameterSpec params)
          Creates a DigestMethod for the specified algorithm URI and parameters.
 Manifest newManifest(List references)
          Creates a Manifest containing the specified list of References.
 Manifest newManifest(List references, String id)
          Creates a Manifest containing the specified list of References and optional id.
 Reference newReference(String uri, DigestMethod dm)
          Creates a Reference with the specified URI and digest method.
 Reference newReference(String uri, DigestMethod dm, List appliedTransforms, Data result, List transforms, String type, String id)
          Creates a Reference with the specified parameters.
 Reference newReference(String uri, DigestMethod dm, List transforms, String type, String id)
          Creates a Reference with the specified parameters.
 Reference newReference(String uri, DigestMethod dm, List transforms, String type, String id, byte[] digestValue)
          Creates a Reference with the specified parameters and pre-calculated digest value.
 SignatureMethod newSignatureMethod(String algorithm, SignatureMethodParameterSpec params)
          Creates a SignatureMethod for the specified algorithm URI and parameters.
 SignatureProperties newSignatureProperties(List props, String id)
          Creates a SignatureProperties containing the specified list of SignaturePropertys and optional id.
 SignatureProperty newSignatureProperty(List info, String target, String id)
          Creates a SignatureProperty containing the specified list of XMLStructures, target URI and optional id.
 SignedInfo newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references)
          Creates a SignedInfo with the specified canonicalization and signature methods, and list of one or more references.
 SignedInfo newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references, String id)
          Creates a SignedInfo with the specified parameters.
 Transform newTransform(String algorithm, TransformParameterSpec params)
          Creates a Transform for the specified algorithm URI and parameters.
 Transform newTransform(String algorithm, XMLStructure params)
          Creates a Transform for the specified algorithm URI and parameters.
 XMLObject newXMLObject(List content, String id, String mimeType, String encoding)
          Creates an XMLObject from the specified parameters.
 XMLSignature newXMLSignature(SignedInfo si, KeyInfo ki)
          Creates an XMLSignature and initializes it with the contents of the specified SignedInfo and KeyInfo objects.
 XMLSignature newXMLSignature(SignedInfo si, KeyInfo ki, List objects, String id, String signatureValueId)
          Creates an XMLSignature and initializes it with the specified parameters.
 XMLSignature unmarshalXMLSignature(XMLStructure xmlStructure)
          Unmarshals a new XMLSignature instance from a mechanism-specific XMLStructure instance.
 XMLSignature unmarshalXMLSignature(XMLValidateContext context)
          Unmarshals a new XMLSignature instance from a mechanism-specific XMLValidateContext instance.
 
Methods inherited from class javax.xml.crypto.dsig.XMLSignatureFactory
getInstance, getInstance, getInstance, getInstance, getKeyInfoFactory, getMechanismType, getProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMXMLSignatureFactory

public DOMXMLSignatureFactory()
Class is disabled.

Initializes a new instance of this class.

Method Detail

newXMLSignature

public XMLSignature newXMLSignature(SignedInfo si,
                                    KeyInfo ki)
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates an XMLSignature and initializes it with the contents of the specified SignedInfo and KeyInfo objects.

Specified by:
newXMLSignature in class XMLSignatureFactory
Parameters:
si - the signed info
ki - the key info (may be null)
Returns:
an XMLSignature

newXMLSignature

public XMLSignature newXMLSignature(SignedInfo si,
                                    KeyInfo ki,
                                    List objects,
                                    String id,
                                    String signatureValueId)
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates an XMLSignature and initializes it with the specified parameters.

Specified by:
newXMLSignature in class XMLSignatureFactory
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

newReference

public Reference newReference(String uri,
                              DigestMethod dm)
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a Reference with the specified URI and digest method.

Specified by:
newReference in class XMLSignatureFactory
Parameters:
uri - the reference URI (may be null)
dm - the digest method
Returns:
a Reference

newReference

public Reference newReference(String uri,
                              DigestMethod dm,
                              List transforms,
                              String type,
                              String id)
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a Reference with the specified parameters.

Specified by:
newReference in class XMLSignatureFactory
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 null or empty.
type - the reference type, as a URI (may be null)
id - the reference ID (may be null)
Returns:
a Reference

newReference

public Reference newReference(String uri,
                              DigestMethod dm,
                              List appliedTransforms,
                              Data result,
                              List transforms,
                              String type,
                              String id)
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a Reference 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 specified transforms (if non-null) are applied to the specified result. The Transforms element of the resulting Reference element is set to the concatenation of the appliedTransforms and transforms.

Specified by:
newReference in class XMLSignatureFactory
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 null or empty.
type - the reference type, as a URI (may be null)
id - the reference ID (may be null)
Returns:
a Reference

newReference

public Reference newReference(String uri,
                              DigestMethod dm,
                              List transforms,
                              String type,
                              String id,
                              byte[] digestValue)
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a Reference 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.

Specified by:
newReference in class XMLSignatureFactory
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 null or 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

newSignedInfo

public SignedInfo newSignedInfo(CanonicalizationMethod cm,
                                SignatureMethod sm,
                                List references)
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a SignedInfo with the specified canonicalization and signature methods, and list of one or more references.

Specified by:
newSignedInfo in class XMLSignatureFactory
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

newSignedInfo

public SignedInfo newSignedInfo(CanonicalizationMethod cm,
                                SignatureMethod sm,
                                List references,
                                String id)
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a SignedInfo with the specified parameters.

Specified by:
newSignedInfo in class XMLSignatureFactory
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

newXMLObject

public XMLObject newXMLObject(List content,
                              String id,
                              String mimeType,
                              String encoding)
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates an XMLObject from the specified parameters.

Specified by:
newXMLObject in class XMLSignatureFactory
Parameters:
content - a list of XMLStructures. The list is defensively copied to protect against subsequent modification. May be null or empty.
id - the Id (may be null)
mimeType - the mime type (may be null)
encoding - the encoding (may be null)
Returns:
an XMLObject

newManifest

public Manifest newManifest(List references)
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a Manifest containing the specified list of References.

Specified by:
newManifest in class XMLSignatureFactory
Parameters:
references - a list of one or more References. The list is defensively copied to protect against subsequent modification.
Returns:
a Manifest

newManifest

public Manifest newManifest(List references,
                            String id)
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a Manifest containing the specified list of References and optional id.

Specified by:
newManifest in class XMLSignatureFactory
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

newSignatureProperties

public SignatureProperties newSignatureProperties(List props,
                                                  String id)
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a SignatureProperties containing the specified list of SignaturePropertys and optional id.

Specified by:
newSignatureProperties in class XMLSignatureFactory
Parameters:
props - 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

newSignatureProperty

public SignatureProperty newSignatureProperty(List info,
                                              String target,
                                              String id)
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a SignatureProperty containing the specified list of XMLStructures, target URI and optional id.

Specified by:
newSignatureProperty in class XMLSignatureFactory
Parameters:
info - 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

unmarshalXMLSignature

public XMLSignature unmarshalXMLSignature(XMLValidateContext context)
                                   throws MarshalException
Class is disabled.

Description copied from class: XMLSignatureFactory
Unmarshals a new XMLSignature instance from a mechanism-specific XMLValidateContext instance.

Specified by:
unmarshalXMLSignature in class XMLSignatureFactory
Parameters:
context - a mechanism-specific context from which to unmarshal the signature from
Returns:
the XMLSignature
Throws:
MarshalException - if an unrecoverable exception occurs during unmarshalling

unmarshalXMLSignature

public XMLSignature unmarshalXMLSignature(XMLStructure xmlStructure)
                                   throws MarshalException
Class is disabled.

Description copied from class: XMLSignatureFactory
Unmarshals a new XMLSignature instance from a mechanism-specific XMLStructure instance. This method is useful if you only want to unmarshal (and not validate) an XMLSignature.

Specified by:
unmarshalXMLSignature in class XMLSignatureFactory
Parameters:
xmlStructure - a mechanism-specific XML structure from which to unmarshal the signature from
Returns:
the XMLSignature
Throws:
MarshalException - if an unrecoverable exception occurs during unmarshalling

isFeatureSupported

public boolean isFeatureSupported(String feature)
Class is disabled.

Description copied from class: XMLSignatureFactory
Indicates whether a specified feature is supported.

Specified by:
isFeatureSupported in class XMLSignatureFactory
Parameters:
feature - the feature name (as an absolute URI)
Returns:
true if the specified feature is supported, false otherwise

newDigestMethod

public DigestMethod newDigestMethod(String algorithm,
                                    DigestMethodParameterSpec params)
                             throws NoSuchAlgorithmException,
                                    InvalidAlgorithmParameterException
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a DigestMethod for the specified algorithm URI and parameters.

Specified by:
newDigestMethod in class XMLSignatureFactory
Parameters:
algorithm - the URI identifying the digest algorithm
params - algorithm-specific digest parameters (may be null)
Returns:
the DigestMethod
Throws:
NoSuchAlgorithmException - if an implementation of the specified algorithm cannot be found
InvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested algorithm

newSignatureMethod

public SignatureMethod newSignatureMethod(String algorithm,
                                          SignatureMethodParameterSpec params)
                                   throws NoSuchAlgorithmException,
                                          InvalidAlgorithmParameterException
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a SignatureMethod for the specified algorithm URI and parameters.

Specified by:
newSignatureMethod in class XMLSignatureFactory
Parameters:
algorithm - the URI identifying the signature algorithm
params - algorithm-specific signature parameters (may be null)
Returns:
the SignatureMethod
Throws:
NoSuchAlgorithmException - if an implementation of the specified algorithm cannot be found
InvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested algorithm

newTransform

public Transform newTransform(String algorithm,
                              TransformParameterSpec params)
                       throws NoSuchAlgorithmException,
                              InvalidAlgorithmParameterException
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a Transform for the specified algorithm URI and parameters.

Specified by:
newTransform in class XMLSignatureFactory
Parameters:
algorithm - the URI identifying the transform algorithm
params - algorithm-specific transform parameters (may be null)
Returns:
the Transform
Throws:
NoSuchAlgorithmException - if an implementation of the specified algorithm cannot be found
InvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested algorithm

newTransform

public Transform newTransform(String algorithm,
                              XMLStructure params)
                       throws NoSuchAlgorithmException,
                              InvalidAlgorithmParameterException
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a Transform for the specified algorithm URI and parameters. The parameters are specified as a mechanism-specific XMLStructure (ex: DOMStructure). This method is useful when the parameters are in XML form or there is no standard class for specifying the parameters.

Specified by:
newTransform in class XMLSignatureFactory
Parameters:
algorithm - the URI identifying the transform algorithm
params - a mechanism-specific XML structure from which to unmarshal the parameters from (may be null if not required or optional)
Returns:
the Transform
Throws:
NoSuchAlgorithmException - if an implementation of the specified algorithm cannot be found
InvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested algorithm

newCanonicalizationMethod

public CanonicalizationMethod newCanonicalizationMethod(String algorithm,
                                                        C14NMethodParameterSpec params)
                                                 throws NoSuchAlgorithmException,
                                                        InvalidAlgorithmParameterException
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a CanonicalizationMethod for the specified algorithm URI and parameters.

Specified by:
newCanonicalizationMethod in class XMLSignatureFactory
Parameters:
algorithm - the URI identifying the canonicalization algorithm
params - algorithm-specific canonicalization parameters (may be null)
Returns:
the CanonicalizationMethod
Throws:
NoSuchAlgorithmException - if an implementation of the specified algorithm cannot be found
InvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested algorithm

newCanonicalizationMethod

public CanonicalizationMethod newCanonicalizationMethod(String algorithm,
                                                        XMLStructure params)
                                                 throws NoSuchAlgorithmException,
                                                        InvalidAlgorithmParameterException
Class is disabled.

Description copied from class: XMLSignatureFactory
Creates a CanonicalizationMethod for the specified algorithm URI and parameters. The parameters are specified as a mechanism-specific XMLStructure (ex: DOMStructure). This method is useful when the parameters are in XML form or there is no standard class for specifying the parameters.

Specified by:
newCanonicalizationMethod in class XMLSignatureFactory
Parameters:
algorithm - the URI identifying the canonicalization algorithm
params - a mechanism-specific XML structure from which to unmarshal the parameters from (may be null if not required or optional)
Returns:
the CanonicalizationMethod
Throws:
NoSuchAlgorithmException - if an implementation of the specified algorithm cannot be found
InvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested algorithm

getURIDereferencer

public URIDereferencer getURIDereferencer()
Class is disabled.

Description copied from class: XMLSignatureFactory
Returns a reference to the URIDereferencer that is used by default to dereference URIs in Reference objects.

Specified by:
getURIDereferencer in class XMLSignatureFactory
Returns:
a reference to the default URIDereferencer (never null)