Class Transforms
java.lang.Object
org.apache.xml.security.utils.ElementProxy
org.apache.xml.security.utils.SignatureElementProxy
org.apache.xml.security.transforms.Transforms
Holder of the
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 algorithm- Author:
- Christian Geuer-Pollmann
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringTransform - Required base64 decodingstatic final StringCanonicalization - Required Exclusive Canonicalization (omits comments)static final StringCanonicalization - Recommended Exclusive Canonicalization with Commentsstatic final StringCanonicalization - Required Canonical XML (omits comments)static final StringCanonicalization - Recommended Canonical XML with Commentsstatic final StringTransform - Required Enveloped Signaturestatic final StringTransform - Recommended XPathstatic final StringTransform - XPath Filterstatic final StringTransform - XPath Filter v2.0static final StringTransform - XPath Filter CHGP privatestatic final StringTransform - XPointerstatic final StringTransform - Optional XSLTFields inherited from class ElementProxy
_baseURI, _constructionElement, _doc, _state, MODE_CREATE, MODE_DECRYPT, MODE_ENCRYPT, MODE_PROCESS, MODE_SIGN, MODE_UNKNOWN, MODE_VERIFY -
Constructor Summary
ConstructorsConstructorDescriptionTransforms(Document doc) ConsturctsTransformsTransforms(Element element, String BaseURI) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTransform(String transformURI) Adds theTransformwith the specifiedTransform algorithm URIvoidaddTransform(String transformURI, Element contextElement) Adds theTransformwith the specifiedTransform algorithm URIvoidaddTransform(String transformURI, NodeList contextNodes) Adds theTransformwith the specifiedTransform algorithm URIReturns the localname of the Elements of the sub-class.intReturn the nonnegative number of transformations.item(int i) Return thei th.TransformperformTransforms(XMLSignatureInput xmlSignatureInput) Applies all includedTransforms to xmlSignatureInput and returns the result of these transformations.performTransforms(XMLSignatureInput xmlSignatureInput, OutputStream os) Applies all includedTransforms to xmlSignatureInput and returns the result of these transformations.Methods inherited from class SignatureElementProxy
getBaseNamespaceMethods inherited from class ElementProxy
addBase64Element, addBase64Text, addBigIntegerElement, addText, addTextElement, createElementForFamily, getBaseURI, getBigIntegerFromChildElement, getBytesFromChildElement, getBytesFromTextChild, getDefaultPrefix, getDocument, getElement, getElementPlusReturns, getTextFromChildElement, getTextFromTextChild, guaranteeThatElementInCorrectSpace, length, setDefaultPrefix, setElement, setXPathNamespaceContext
-
Field Details
-
TRANSFORM_C14N_OMIT_COMMENTS
Canonicalization - Required Canonical XML (omits comments)- See Also:
-
TRANSFORM_C14N_WITH_COMMENTS
Canonicalization - Recommended Canonical XML with Comments- See Also:
-
TRANSFORM_C14N_EXCL_OMIT_COMMENTS
Canonicalization - Required Exclusive Canonicalization (omits comments)- See Also:
-
TRANSFORM_C14N_EXCL_WITH_COMMENTS
Canonicalization - Recommended Exclusive Canonicalization with Comments- See Also:
-
TRANSFORM_XSLT
-
TRANSFORM_BASE64_DECODE
-
TRANSFORM_XPATH
-
TRANSFORM_ENVELOPED_SIGNATURE
Transform - Required Enveloped Signature- See Also:
-
TRANSFORM_XPOINTER
-
TRANSFORM_XPATH2FILTER04
-
TRANSFORM_XPATH2FILTER
-
TRANSFORM_XPATHFILTERCHGP
Transform - XPath Filter CHGP private- See Also:
-
-
Constructor Details
-
Transforms
ConsturctsTransforms- Parameters:
doc- theDocumentin whichXMLsignaturewill be placed
-
Transforms
public Transforms(Element element, String BaseURI) throws DOMException, XMLSignatureException, InvalidTransformException, TransformationException, XMLSecurityException - Parameters:
element- isTransformselementBaseURI- the URI where the XML instance was stored- Throws:
DOMExceptionInvalidTransformExceptionTransformationExceptionXMLSecurityExceptionXMLSignatureException
-
-
Method Details
-
addTransform
Adds theTransformwith the specifiedTransform algorithm URI- Parameters:
transformURI- the URI form of transform that indicates which transformation is applied to data- Throws:
TransformationException
-
addTransform
public void addTransform(String transformURI, Element contextElement) throws TransformationException Adds theTransformwith the specifiedTransform algorithm URI- Parameters:
transformURI- the URI form of transform that indicates which transformation is applied to datacontextElement-- Throws:
TransformationException- See Also:
-
addTransform
Adds theTransformwith the specifiedTransform algorithm URI- Parameters:
transformURI- the URI form of transform that indicates which transformation is applied to datacontextNodes-- Throws:
TransformationException- See Also:
-
performTransforms
public XMLSignatureInput performTransforms(XMLSignatureInput xmlSignatureInput) throws TransformationException Applies all includedTransforms to xmlSignatureInput and returns the result of these transformations.- Parameters:
xmlSignatureInput- the input for theTransforms- Returns:
- the result of the
Transforms - Throws:
TransformationException
-
performTransforms
public XMLSignatureInput performTransforms(XMLSignatureInput xmlSignatureInput, OutputStream os) throws TransformationException Applies all includedTransforms to xmlSignatureInput and returns the result of these transformations.- Parameters:
xmlSignatureInput- the input for theTransformsos- where to output the last transformation.- Returns:
- the result of the
Transforms - Throws:
TransformationException
-
getLength
public int getLength()Return the nonnegative number of transformations.- Returns:
- the number of transformations
-
item
- Parameters:
i- index ofTransformto return- Returns:
- the
i th transforms - Throws:
TransformationException
-
getBaseLocalName
Description copied from class:ElementProxyReturns the localname of the Elements of the sub-class.- Specified by:
getBaseLocalNamein classElementProxy- Returns:
- the localname of the Elements of the sub-class.
-