|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcp.xml.dsig.internal.dom.DOMStructure
org.jcp.xml.dsig.internal.dom.DOMReference
public final class DOMReference
DOM-based implementation of Reference.
| Constructor Summary | |
|---|---|
DOMReference(org.w3c.dom.Element refElem,
XMLCryptoContext context,
java.security.Provider provider)
Creates a DOMReference from an element. |
|
DOMReference(java.lang.String uri,
java.lang.String type,
DigestMethod dm,
java.util.List appliedTransforms,
Data result,
java.util.List transforms,
java.lang.String id,
byte[] digestValue,
java.security.Provider provider)
|
|
DOMReference(java.lang.String uri,
java.lang.String type,
DigestMethod dm,
java.util.List appliedTransforms,
Data result,
java.util.List transforms,
java.lang.String id,
java.security.Provider provider)
|
|
DOMReference(java.lang.String uri,
java.lang.String type,
DigestMethod dm,
java.util.List transforms,
java.lang.String id,
java.security.Provider provider)
Creates a Reference from the specified parameters. |
|
| Method Summary | |
|---|---|
void |
digest(XMLSignContext signContext)
|
boolean |
equals(java.lang.Object o)
|
byte[] |
getCalculatedDigestValue()
Returns the calculated digest value of this Reference
after a validation operation. |
Data |
getDereferencedData()
Returns the dereferenced data, if reference caching is enabled. |
java.io.InputStream |
getDigestInputStream()
Returns the pre-digested input stream, if reference caching is enabled. |
DigestMethod |
getDigestMethod()
Returns the digest method of this Reference. |
byte[] |
getDigestValue()
Returns the digest value of this Reference. |
org.w3c.dom.Node |
getHere()
Returns the here node. |
java.lang.String |
getId()
Returns the optional Id attribute of this
Reference, which permits this reference to be
referenced from elsewhere. |
java.util.List |
getTransforms()
Returns an unmodifiable
list of Transforms that are contained in this
Reference. |
java.lang.String |
getType()
Returns the type of data referenced by this URI. |
java.lang.String |
getURI()
Returns the URI of the referenced data object. |
int |
hashCode()
|
void |
marshal(org.w3c.dom.Node parent,
java.lang.String dsPrefix,
DOMCryptoContext context)
|
boolean |
validate(XMLValidateContext validateContext)
Validates this reference. |
| Methods inherited from class org.jcp.xml.dsig.internal.dom.DOMStructure |
|---|
isFeatureSupported |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.xml.crypto.XMLStructure |
|---|
isFeatureSupported |
| Constructor Detail |
|---|
public DOMReference(java.lang.String uri,
java.lang.String type,
DigestMethod dm,
java.util.List transforms,
java.lang.String id,
java.security.Provider provider)
Reference from the specified parameters.
uri - the URI (may be null)type - the type (may be null)dm - the digest methodtransforms - a list of Transforms. The list
is defensively copied to protect against subsequent modification.
May be null or empty.id - the reference ID (may be null)
java.lang.NullPointerException - if dm is null
java.lang.ClassCastException - if any of the transforms are
not of type Transform
public DOMReference(java.lang.String uri,
java.lang.String type,
DigestMethod dm,
java.util.List appliedTransforms,
Data result,
java.util.List transforms,
java.lang.String id,
java.security.Provider provider)
public DOMReference(java.lang.String uri,
java.lang.String type,
DigestMethod dm,
java.util.List appliedTransforms,
Data result,
java.util.List transforms,
java.lang.String id,
byte[] digestValue,
java.security.Provider provider)
public DOMReference(org.w3c.dom.Element refElem,
XMLCryptoContext context,
java.security.Provider provider)
throws MarshalException
DOMReference from an element.
refElem - a Reference element
MarshalException| Method Detail |
|---|
public DigestMethod getDigestMethod()
ReferenceReference.
getDigestMethod in interface Referencepublic java.lang.String getId()
ReferenceId attribute of this
Reference, which permits this reference to be
referenced from elsewhere.
getId in interface ReferenceId attribute (may be null if not
specified)public java.lang.String getURI()
URIReference
getURI in interface URIReferencenull if not specified)public java.lang.String getType()
URIReference
getType in interface URIReferencenull
if not specified)public java.util.List getTransforms()
Referenceunmodifiable
list of Transforms that are contained in this
Reference.
getTransforms in interface ReferenceTransforms
(may be empty but never null)public byte[] getDigestValue()
ReferenceReference.
getDigestValue in interface Referencenull if this reference has
not been digested yet. Each invocation of this method returns a new
clone to protect against subsequent modification.public byte[] getCalculatedDigestValue()
ReferenceReference
after a validation operation. This method is useful for debugging if
the reference fails to validate.
getCalculatedDigestValue in interface Referencenull if this
reference has not been validated yet. Each invocation of this method
returns a new clone to protect against subsequent modification.
public void marshal(org.w3c.dom.Node parent,
java.lang.String dsPrefix,
DOMCryptoContext context)
throws MarshalException
marshal in class DOMStructureMarshalException
public void digest(XMLSignContext signContext)
throws XMLSignatureException
XMLSignatureException
public boolean validate(XMLValidateContext validateContext)
throws XMLSignatureException
ReferenceThis method only validates the reference the first time it is invoked. On subsequent invocations, it returns a cached result.
validate in interface ReferencevalidateContext - the validating context
true if this reference was validated successfully;
false otherwise
XMLSignatureException - if an unexpected exception occurs while
validating the referencepublic Data getDereferencedData()
Reference
getDereferencedData in interface Referencenull if reference
caching is not enabled or this reference has not been generated or
validatedpublic java.io.InputStream getDigestInputStream()
Reference
getDigestInputStream in interface Referencenull if reference caching is not enabled or this
reference has not been generated or validatedpublic org.w3c.dom.Node getHere()
DOMURIReference
getHere in interface DOMURIReferencepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||