public class Transforms extends SignatureElementProxy
Transform steps to
be performed on the data.
The input to the first Transform is the result of dereferencing the
URI attribute of the Reference element.
The output from the last Transform is the input for the
DigestMethod algorithmTransform,
org.docx4j.org.apache.xml.security.signature.Reference| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TRANSFORM_BASE64_DECODE
Transform - Required base64 decoding
|
static java.lang.String |
TRANSFORM_C14N_EXCL_OMIT_COMMENTS
Canonicalization - Required Exclusive Canonicalization (omits comments)
|
static java.lang.String |
TRANSFORM_C14N_EXCL_WITH_COMMENTS
Canonicalization - Recommended Exclusive Canonicalization with Comments
|
static java.lang.String |
TRANSFORM_C14N_OMIT_COMMENTS
Canonicalization - Required Canonical XML (omits comments)
|
static java.lang.String |
TRANSFORM_C14N_WITH_COMMENTS
Canonicalization - Recommended Canonical XML with Comments
|
static java.lang.String |
TRANSFORM_C14N11_OMIT_COMMENTS
Canonicalization - Required Canonical XML 1.1 (omits comments)
|
static java.lang.String |
TRANSFORM_C14N11_WITH_COMMENTS
Canonicalization - Recommended Canonical XML 1.1 with Comments
|
static java.lang.String |
TRANSFORM_ENVELOPED_SIGNATURE
Transform - Required Enveloped Signature
|
static java.lang.String |
TRANSFORM_XPATH
Transform - Recommended XPath
|
static java.lang.String |
TRANSFORM_XPATH2FILTER
Transform - XPath Filter
|
static java.lang.String |
TRANSFORM_XPOINTER
Transform - XPointer
|
static java.lang.String |
TRANSFORM_XSLT
Transform - Optional XSLT
|
baseURI| Modifier | Constructor and Description |
|---|---|
protected |
Transforms() |
|
Transforms(org.w3c.dom.Document doc)
Constructs
Transforms. |
|
Transforms(org.w3c.dom.Element element,
java.lang.String baseURI)
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTransform(java.lang.String transformURI)
Adds the
Transform with the specified Transform
algorithm URI |
void |
addTransform(java.lang.String transformURI,
org.w3c.dom.Element contextElement)
Adds the
Transform with the specified Transform
algorithm URI |
void |
addTransform(java.lang.String transformURI,
org.w3c.dom.NodeList contextNodes)
Adds the
Transform with the specified Transform
algorithm URI. |
java.lang.String |
getBaseLocalName()
Returns the localname of the Elements of the sub-class.
|
int |
getLength()
Return the nonnegative number of transformations.
|
Transform |
item(int i)
Return the
. |
XMLSignatureInput |
performTransforms(XMLSignatureInput xmlSignatureInput)
Applies all included
Transforms to xmlSignatureInput and
returns the result of these transformations. |
XMLSignatureInput |
performTransforms(XMLSignatureInput xmlSignatureInput,
java.io.OutputStream os)
Applies all included
Transforms to xmlSignatureInput and
returns the result of these transformations. |
void |
setSecureValidation(boolean secureValidation)
Set whether secure validation is enabled or not.
|
getBaseNamespaceaddBase64Element, addBase64Text, addBigIntegerElement, addReturnToSelf, addText, addTextElement, appendOther, appendSelf, appendSelf, createElementForFamily, createElementForFamilyLocal, createText, getBaseURI, getBigIntegerFromChildElement, getBytesFromTextChild, getDefaultPrefix, getDocument, getElement, getElementPlusReturns, getFirstChild, getLocalAttribute, getTextFromChildElement, getTextFromTextChild, length, registerDefaultPrefixes, setDefaultPrefix, setDocument, setElement, setElement, setLocalAttribute, setLocalIdAttribute, setXPathNamespaceContextpublic static final java.lang.String TRANSFORM_C14N_OMIT_COMMENTS
public static final java.lang.String TRANSFORM_C14N_WITH_COMMENTS
public static final java.lang.String TRANSFORM_C14N11_OMIT_COMMENTS
public static final java.lang.String TRANSFORM_C14N11_WITH_COMMENTS
public static final java.lang.String TRANSFORM_C14N_EXCL_OMIT_COMMENTS
public static final java.lang.String TRANSFORM_C14N_EXCL_WITH_COMMENTS
public static final java.lang.String TRANSFORM_XSLT
public static final java.lang.String TRANSFORM_BASE64_DECODE
public static final java.lang.String TRANSFORM_XPATH
public static final java.lang.String TRANSFORM_ENVELOPED_SIGNATURE
public static final java.lang.String TRANSFORM_XPOINTER
public static final java.lang.String TRANSFORM_XPATH2FILTER
protected Transforms()
public Transforms(org.w3c.dom.Document doc)
Transforms.doc - the Document in which XMLSignature will
be placedpublic Transforms(org.w3c.dom.Element element,
java.lang.String baseURI)
throws org.w3c.dom.DOMException,
XMLSignatureException,
InvalidTransformException,
TransformationException,
XMLSecurityException
element - is Transforms elementbaseURI - the URI where the XML instance was storedorg.w3c.dom.DOMExceptionInvalidTransformExceptionTransformationExceptionXMLSecurityExceptionXMLSignatureExceptionpublic void setSecureValidation(boolean secureValidation)
public void addTransform(java.lang.String transformURI)
throws TransformationException
Transform with the specified Transform
algorithm URItransformURI - the URI form of transform that indicates which
transformation is applied to dataTransformationExceptionpublic void addTransform(java.lang.String transformURI,
org.w3c.dom.Element contextElement)
throws TransformationException
Transform with the specified Transform
algorithm URItransformURI - the URI form of transform that indicates which
transformation is applied to datacontextElement - TransformationExceptionpublic void addTransform(java.lang.String transformURI,
org.w3c.dom.NodeList contextNodes)
throws TransformationException
Transform with the specified Transform
algorithm URI.transformURI - the URI form of transform that indicates which
transformation is applied to datacontextNodes - TransformationExceptionpublic XMLSignatureInput performTransforms(XMLSignatureInput xmlSignatureInput) throws TransformationException
Transforms to xmlSignatureInput and
returns the result of these transformations.xmlSignatureInput - the input for the TransformsTransformsTransformationExceptionpublic XMLSignatureInput performTransforms(XMLSignatureInput xmlSignatureInput, java.io.OutputStream os) throws TransformationException
Transforms to xmlSignatureInput and
returns the result of these transformations.xmlSignatureInput - the input for the Transformsos - where to output the last transformation.TransformsTransformationExceptionpublic int getLength()
public Transform item(int i) throws TransformationException
i - index of Transform to returnTransformationExceptionpublic java.lang.String getBaseLocalName()
ElementProxygetBaseLocalName in class ElementProxyCopyright © 2007–2023. All rights reserved.