Class DOMReference
java.lang.Object
org.apache.jcp.xml.dsig.internal.dom.DOMStructure
org.apache.jcp.xml.dsig.internal.dom.DOMReference
- All Implemented Interfaces:
DOMURIReference
,Reference
,URIReference
,XMLStructure
DOM-based implementation of Reference.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The maximum number of transforms per reference, if secure validation is enabled. -
Constructor Summary
ConstructorsConstructorDescriptionDOMReference
(String uri, String type, DigestMethod dm, List<? extends Transform> transforms, String id, Provider provider) Creates aReference
from the specified parameters.DOMReference
(String uri, String type, DigestMethod dm, List<? extends Transform> appliedTransforms, Data result, List<? extends Transform> transforms, String id, byte[] digestValue, Provider provider) DOMReference
(String uri, String type, DigestMethod dm, List<? extends Transform> appliedTransforms, Data result, List<? extends Transform> transforms, String id, Provider provider) DOMReference
(Element refElem, XMLCryptoContext context, Provider provider) Creates aDOMReference
from an element. -
Method Summary
Modifier and TypeMethodDescriptionvoid
digest
(XMLSignContext signContext) boolean
byte[]
byte[]
getHere()
getId()
getType()
getURI()
int
hashCode()
void
marshal
(Node parent, String dsPrefix, DOMCryptoContext context) boolean
validate
(XMLValidateContext validateContext) Methods inherited from class org.apache.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
-
Field Details
-
MAXIMUM_TRANSFORM_COUNT
public static final int MAXIMUM_TRANSFORM_COUNTThe maximum number of transforms per reference, if secure validation is enabled.- See Also:
-
-
Constructor Details
-
DOMReference
public DOMReference(String uri, String type, DigestMethod dm, List<? extends Transform> transforms, String id, Provider provider) Creates aReference
from the specified parameters.- Parameters:
uri
- the URI (may be null)type
- the type (may be null)dm
- the digest methodtransforms
- a list ofTransform
s. The list is defensively copied to protect against subsequent modification. May benull
or empty.id
- the reference ID (may benull
)- Throws:
NullPointerException
- ifdm
isnull
ClassCastException
- if any of thetransforms
are not of typeTransform
-
DOMReference
-
DOMReference
-
DOMReference
public DOMReference(Element refElem, XMLCryptoContext context, Provider provider) throws MarshalException Creates aDOMReference
from an element.- Parameters:
refElem
- a Reference element- Throws:
MarshalException
-
-
Method Details
-
getDigestMethod
- Specified by:
getDigestMethod
in interfaceReference
-
getId
-
getURI
- Specified by:
getURI
in interfaceURIReference
-
getType
- Specified by:
getType
in interfaceURIReference
-
getTransforms
- Specified by:
getTransforms
in interfaceReference
-
getDigestValue
public byte[] getDigestValue()- Specified by:
getDigestValue
in interfaceReference
-
getCalculatedDigestValue
public byte[] getCalculatedDigestValue()- Specified by:
getCalculatedDigestValue
in interfaceReference
-
marshal
- Specified by:
marshal
in classDOMStructure
- Throws:
MarshalException
-
digest
- Throws:
XMLSignatureException
-
validate
- Specified by:
validate
in interfaceReference
- Throws:
XMLSignatureException
-
getDereferencedData
- Specified by:
getDereferencedData
in interfaceReference
-
getDigestInputStream
- Specified by:
getDigestInputStream
in interfaceReference
-
getHere
- Specified by:
getHere
in interfaceDOMURIReference
-
equals
-
hashCode
public int hashCode()
-