Oracle Security Developer Tools XML Security Java API Reference
10g (10.1.4.0.1)

B28178-01


oracle.security.xmlsec.transform
Class XSTransformer

java.lang.Object
  extended byoracle.security.xmlsec.transform.XSTransformer

Direct Known Subclasses:
Base64Decoder, C14NTransform, DecryptTransform, EnvelopedSigTransform, ExcC14NTransform, XPathFilter, XSLTTransform

public abstract class XSTransformer
extends java.lang.Object

Internal use only. Abstract class representing a XML tranformation processor. To instantiate a concrete subclass, use getInstance(XSAlgorithmIdentifier) or getInstance(String).


Field Summary
protected  XSAlgorithmIdentifier transform
          The XSAlgorithmIdentifier instance used to instantiate this XSTransformer.

 

Constructor Summary
protected XSTransformer()
          Creates a new XSTransformer instance.
protected XSTransformer(XSAlgorithmIdentifier trans)
          Creates a new XSTransformer instance, and checks that the given XSAlgorithmIdentifier is a XML-DSIG Transform element.

 

Method Summary
static XMLContainer applyTransforms(XMLContainer source, java.util.Vector transformList)
          Applies the specified transforms to the Node in the given DOMSource, and returns a javax.xml.transform.Result with the results.
abstract  java.lang.String getAlgorithmURI()
          Returns the URI string identifying the Transform algorithm.
static XSTransformer getInstance(java.lang.String uri)
          Returns an instance of the Transformer subclass identified by the given algorithm URI.
static XSTransformer getInstance(XSAlgorithmIdentifier trans)
          Returns an instance of the Transformer subclass identified by the given XSAlgorithmIdentifier's Algorithm attribute.
 XSAlgorithmIdentifier getTransform()
          Returns the XSAlgorithmIdentifier containing the Transform element used to instantiate this XSTransformer.
protected abstract  XMLContainer transform(XMLContainer source)
          Applies the transform to the given XMLContainer and returns the result in a new XMLContainer.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

transform

protected XSAlgorithmIdentifier transform
The XSAlgorithmIdentifier instance used to instantiate this XSTransformer.

Constructor Detail

XSTransformer

protected XSTransformer()
Creates a new XSTransformer instance.

XSTransformer

protected XSTransformer(XSAlgorithmIdentifier trans)
                 throws java.lang.IllegalArgumentException
Creates a new XSTransformer instance, and checks that the given XSAlgorithmIdentifier is a XML-DSIG Transform element. Subclasses should invoke this constructor as needed.
Parameters:
trans - A XSAlgorithmIdentifier with local tag name "Transform".
Throws:
java.lang.IllegalArgumentException - If the given XSAlgorithmIdentifier is not a XML-DSIG Transform.

Method Detail

getTransform

public XSAlgorithmIdentifier getTransform()
Returns the XSAlgorithmIdentifier containing the Transform element used to instantiate this XSTransformer.
Returns:
A XSAlgorithmIdentifier, or null if none has been set.

transform

protected abstract XMLContainer transform(XMLContainer source)
                                   throws TransformationException
Applies the transform to the given XMLContainer and returns the result in a new XMLContainer.

Implementing subclasses are responsible for ensuring that the given XMLContainer contains the input required, and for any needed conversions if it does not.

Parameters:
source - A XMLContainer on which the transform will operate.
Returns:
A XMLContainer containing the transform result.
Throws:
TransformationException - if an error occurs during the transformation process.

getAlgorithmURI

public abstract java.lang.String getAlgorithmURI()
Returns the URI string identifying the Transform algorithm.
Returns:
This Transform's URI string.
Since:
2.0

getInstance

public static XSTransformer getInstance(XSAlgorithmIdentifier trans)
                                 throws oracle.security.crypto.core.AlgorithmIdentifierException,
                                        java.lang.IllegalArgumentException
Returns an instance of the Transformer subclass identified by the given XSAlgorithmIdentifier's Algorithm attribute.
Parameters:
trans - A XSAlgorithmIdentifier object containing the algorithm identifying the desired transformation, and any parameters required by the algorithm. If any parameters are specified in the XSAlgorithmIdentifier structure, the algorithm's target implementation class must have an accessible constructor taking a XSAlgorithmIdentifier as its only argument.
Throws:
oracle.security.crypto.core.AlgorithmIdentifierException - If a XSTransformer cannot be instantiated for the given algorithm.
java.lang.IllegalArgumentException - If the given XSAlgorithmIdentifier is not a XML-DSIG Transform or it contains more than one parameter.

getInstance

public static XSTransformer getInstance(java.lang.String uri)
                                 throws oracle.security.crypto.core.AlgorithmIdentifierException
Returns an instance of the Transformer subclass identified by the given algorithm URI.
Parameters:
uri - A URI identifying the desired transform algorithm.
Throws:
oracle.security.crypto.core.AlgorithmIdentifierException - If a XSTransformer cannot be instantiated for the given algorithm.

applyTransforms

public static XMLContainer applyTransforms(XMLContainer source,
                                           java.util.Vector transformList)
                                    throws TransformationException
Applies the specified transforms to the Node in the given DOMSource, and returns a javax.xml.transform.Result with the results.
Parameters:
source - The XMLContainer to which the Transforms will be applied.
transformList - An Vector containing the ordered list of Transforms to be applied.
Returns:
A XMLContainer containing the final result of the Transforms.
Throws:
TransformationException - If a problem occurs while executing the Transforms.

Oracle Security Developer Tools XML Security Java API Reference
10g (10.1.4.0.1)

B28178-01


Copyright © 2005 ,2006 , Oracle. All rights reserved.