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 intThe 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 aReferencefrom 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 aDOMReferencefrom an element. -
Method Summary
Modifier and TypeMethodDescriptionvoiddigest(XMLSignContext signContext) booleanbyte[]byte[]getHere()getId()getType()getURI()inthashCode()voidmarshal(Node parent, String dsPrefix, DOMCryptoContext context) booleanvalidate(XMLValidateContext validateContext) Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.DOMStructure
isFeatureSupportedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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 aReferencefrom the specified parameters.- Parameters:
uri- the URI (may be null)type- the type (may be null)dm- the digest methodtransforms- a list ofTransforms. The list is defensively copied to protect against subsequent modification. May benullor empty.id- the reference ID (may benull)- Throws:
NullPointerException- ifdmisnullClassCastException- if any of thetransformsare not of typeTransform
-
DOMReference
-
DOMReference
-
DOMReference
public DOMReference(Element refElem, XMLCryptoContext context, Provider provider) throws MarshalException Creates aDOMReferencefrom an element.- Parameters:
refElem- a Reference element- Throws:
MarshalException
-
-
Method Details
-
getDigestMethod
- Specified by:
getDigestMethodin interfaceReference
-
getId
-
getURI
- Specified by:
getURIin interfaceURIReference
-
getType
- Specified by:
getTypein interfaceURIReference
-
getTransforms
- Specified by:
getTransformsin interfaceReference
-
getDigestValue
public byte[] getDigestValue()- Specified by:
getDigestValuein interfaceReference
-
getCalculatedDigestValue
public byte[] getCalculatedDigestValue()- Specified by:
getCalculatedDigestValuein interfaceReference
-
marshal
- Specified by:
marshalin classDOMStructure- Throws:
MarshalException
-
digest
- Throws:
XMLSignatureException
-
validate
- Specified by:
validatein interfaceReference- Throws:
XMLSignatureException
-
getDereferencedData
- Specified by:
getDereferencedDatain interfaceReference
-
getDigestInputStream
- Specified by:
getDigestInputStreamin interfaceReference
-
getHere
- Specified by:
getHerein interfaceDOMURIReference
-
equals
-
hashCode
public int hashCode()
-