XML Security, 1.6

com.ibm.xml.crypto.dsig.dom.transform
Class TransformBase

java.lang.Object
  extended by javax.xml.crypto.dsig.TransformService
      extended by com.ibm.xml.crypto.dsig.dom.transform.TransformBase
All Implemented Interfaces:
AlgorithmMethod, Transform, XMLStructure
Direct Known Subclasses:
Base64Transformer, C14nTransformer, Enveloped, ExcC14nTransformer, XPath2Transformer, XPathTransformer, XSLTTransformer

public abstract class TransformBase
extends TransformService


Field Summary
protected  org.w3c.dom.Node node
           
protected  java.security.spec.AlgorithmParameterSpec spec
           
 
Fields inherited from interface javax.xml.crypto.dsig.Transform
BASE64, ENVELOPED, XPATH, XPATH2, XSLT
 
Constructor Summary
protected TransformBase()
           
 
Method Summary
protected  TransformContext getContext(XMLCryptoContext xcontext)
           
 org.w3c.dom.Node getNode()
           
 java.security.spec.AlgorithmParameterSpec getParameterSpec()
          Returns the algorithm-specific input parameters associated with this Transform.
 void init(TransformParameterSpec params)
          Initializes this TransformService with the specified parameters.
 void init(XMLStructure parent, XMLCryptoContext xcontext)
          Initializes this TransformService with the specified parameters and document context.
 boolean isFeatureSupported(java.lang.String feature)
          Indicates whether a specified feature is supported.
 void marshalParams(XMLStructure parent, XMLCryptoContext xcontext)
          Marshals the algorithm-specific parameters.
 void setNode(org.w3c.dom.Node n)
           
protected  NodeSetData toNodeSet(Data in, XMLCryptoContext xcontext)
           
 Data transform(Data in, XMLCryptoContext xcontext, java.io.OutputStream os)
          Transforms the specified data using the underlying transform algorithm.
 
Methods inherited from class javax.xml.crypto.dsig.TransformService
getAlgorithm, getInstance, getInstance, getInstance, getMechanismType, getProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.crypto.dsig.Transform
transform
 

Field Detail

spec

protected java.security.spec.AlgorithmParameterSpec spec

node

protected org.w3c.dom.Node node
Constructor Detail

TransformBase

protected TransformBase()
Method Detail

getContext

protected TransformContext getContext(XMLCryptoContext xcontext)

toNodeSet

protected NodeSetData toNodeSet(Data in,
                                XMLCryptoContext xcontext)
                         throws javax.xml.parsers.ParserConfigurationException,
                                org.xml.sax.SAXException,
                                java.io.IOException,
                                URIReferenceException
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
URIReferenceException

setNode

public void setNode(org.w3c.dom.Node n)

getNode

public org.w3c.dom.Node getNode()

transform

public Data transform(Data in,
                      XMLCryptoContext xcontext,
                      java.io.OutputStream os)
               throws TransformException
Description copied from interface: Transform
Transforms the specified data using the underlying transform algorithm. If the output of this transform is an OctetStreamData, then this method returns null and the bytes are written to the specified OutputStream. Otherwise, the OutputStream is ignored and the method behaves as if Transform.transform(Data, XMLCryptoContext) were invoked.

Parameters:
in - the data to be transformed
xcontext - the XMLCryptoContext containing additional context (may be null if not applicable)
os - the OutputStream that should be used to write the transformed data to
Returns:
the transformed data (or null if the data was written to the OutputStream parameter)
Throws:
TransformException - if an error occurs while executing the transform

getParameterSpec

public java.security.spec.AlgorithmParameterSpec getParameterSpec()
Description copied from interface: Transform
Returns the algorithm-specific input parameters associated with this Transform.

The returned parameters can be typecast to a TransformParameterSpec object.

Returns:
the algorithm-specific input parameters (may be null if not specified)

init

public void init(TransformParameterSpec params)
          throws java.security.InvalidAlgorithmParameterException
Description copied from class: TransformService
Initializes this TransformService with the specified parameters.

If the parameters exist in XML form, the TransformService.init(XMLStructure, XMLCryptoContext) method should be used to initialize the TransformService.

Specified by:
init in class TransformService
Parameters:
params - the algorithm parameters (may be null if not required or optional)
Throws:
java.security.InvalidAlgorithmParameterException - if the specified parameters are invalid for this algorithm

marshalParams

public void marshalParams(XMLStructure parent,
                          XMLCryptoContext xcontext)
                   throws MarshalException
Description copied from class: TransformService
Marshals the algorithm-specific parameters. If there are no parameters to be marshalled, this method returns without throwing an exception.

Specified by:
marshalParams in class TransformService
Parameters:
xcontext - may be null
parent - a mechanism-specific structure containing the parent node that the marshalled parameters should be appended to
Throws:
MarshalException - if the parameters cannot be marshalled

init

public void init(XMLStructure parent,
                 XMLCryptoContext xcontext)
          throws java.security.InvalidAlgorithmParameterException
Description copied from class: TransformService
Initializes this TransformService with the specified parameters and document context.

Specified by:
init in class TransformService
Parameters:
xcontext - may be null
parent - a mechanism-specific structure containing the parent structure
Throws:
java.security.InvalidAlgorithmParameterException - if the specified parameters are invalid for this algorithm

isFeatureSupported

public boolean isFeatureSupported(java.lang.String feature)
Description copied from interface: XMLStructure
Indicates whether a specified feature is supported.

Parameters:
feature - the feature name (as an absolute URI)
Returns:
true if the specified feature is supported, false otherwise

XML Security, 1.6

Portions Copyright 2003, 2012 IBM Corporation.
Portions Copyright 2003, 2012 Oracle and/or its affiliates.