public final class Transform extends SignatureElementProxy
ds:Transform
element.
This Transform
(Factory) class acts as the Factory and Proxy of
the implementing class that supports the functionality of a Transform
algorithm.
Implements the Factory and Proxy pattern for ds:Transform algorithms.Transforms
,
TransformSpi
baseURI
Constructor and Description |
---|
Transform(Document doc,
String algorithmURI)
Generates a Transform object that implements the specified
Transform algorithm URI. |
Transform(Document doc,
String algorithmURI,
Element contextChild)
Generates a Transform object that implements the specified
Transform algorithm URI. |
Transform(Document doc,
String algorithmURI,
NodeList contextNodes)
Constructs
Transform |
Transform(Element element,
String baseURI) |
Modifier and Type | Method and Description |
---|---|
String |
getBaseLocalName()
Returns the localname of the Elements of the sub-class.
|
String |
getURI()
Returns the URI representation of Transformation algorithm
|
XMLSignatureInput |
performTransform(XMLSignatureInput input,
boolean secureValidation)
Transforms the input, and generates
XMLSignatureInput as output. |
XMLSignatureInput |
performTransform(XMLSignatureInput input,
OutputStream os,
boolean secureValidation)
Transforms the input, and generates
XMLSignatureInput as output. |
static void |
register(String algorithmURI,
Class<? extends TransformSpi> implementingClass)
Registers implementing class of the Transform algorithm with algorithmURI
|
static void |
register(String algorithmURI,
String implementingClass)
Registers implementing class of the Transform algorithm with algorithmURI
|
static void |
registerDefaultAlgorithms()
This method registers the default algorithms.
|
getBaseNamespace
addBase64Element, 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, setXPathNamespaceContext
public Transform(Document doc, String algorithmURI) throws InvalidTransformException
Transform algorithm
URI.doc
- the proxy Document
algorithmURI
- Transform algorithm
URI representation,
such as specified in
Transform algorithm InvalidTransformException
public Transform(Document doc, String algorithmURI, Element contextChild) throws InvalidTransformException
Transform algorithm
URI.algorithmURI
- Transform algorithm
URI representation,
such as specified in
Transform algorithm contextChild
- the child element of Transform
elementdoc
- the proxy Document
InvalidTransformException
public Transform(Document doc, String algorithmURI, NodeList contextNodes) throws InvalidTransformException
Transform
doc
- the Document
in which Transform
will be
placedalgorithmURI
- URI representation of Transform algorithm
contextNodes
- the child node list of Transform
elementInvalidTransformException
public Transform(Element element, String baseURI) throws InvalidTransformException, TransformationException, XMLSecurityException
element
- ds:Transform
elementbaseURI
- the URI of the resource where the XML instance was storedInvalidTransformException
TransformationException
XMLSecurityException
public static void register(String algorithmURI, String implementingClass) throws AlgorithmAlreadyRegisteredException, ClassNotFoundException, InvalidTransformException
algorithmURI
- algorithmURI URI representation of Transform algorithm
implementingClass
- implementingClass
the implementing
class of TransformSpi
AlgorithmAlreadyRegisteredException
- if specified algorithmURI
is already registeredClassNotFoundException
- if the implementing Class cannot be foundInvalidTransformException
- if the implementing Class cannot be instantiatedSecurityException
- if a security manager is installed and the
caller does not have permission to register the transformpublic static void register(String algorithmURI, Class<? extends TransformSpi> implementingClass) throws AlgorithmAlreadyRegisteredException, InvalidTransformException
algorithmURI
- algorithmURI URI representation of Transform algorithm
implementingClass
- implementingClass
the implementing
class of TransformSpi
AlgorithmAlreadyRegisteredException
- if specified algorithmURI
is already registeredInvalidTransformException
- if the implementing Class cannot be instantiatedSecurityException
- if a security manager is installed and the
caller does not have permission to register the transformpublic static void registerDefaultAlgorithms()
public String getURI()
public XMLSignatureInput performTransform(XMLSignatureInput input, boolean secureValidation) throws IOException, CanonicalizationException, InvalidCanonicalizerException, TransformationException
XMLSignatureInput
as output.input
- input XMLSignatureInput
which can supplied Octet
Stream and NodeSet as Input of TransformationsecureValidation
- Whether secure validation is enabledXMLSignatureInput
class as the result of
transformationCanonicalizationException
IOException
InvalidCanonicalizerException
TransformationException
public XMLSignatureInput performTransform(XMLSignatureInput input, OutputStream os, boolean secureValidation) throws IOException, CanonicalizationException, InvalidCanonicalizerException, TransformationException
XMLSignatureInput
as output.input
- input XMLSignatureInput
which can supplied Octect
Stream and NodeSet as Input of Transformationos
- where to output the result of the last transformationsecureValidation
- Whether secure validation is enabledXMLSignatureInput
class as the result of
transformationCanonicalizationException
IOException
InvalidCanonicalizerException
TransformationException
public String getBaseLocalName()
getBaseLocalName
in class ElementProxy
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.