|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.xml.Transformer
This class is a base class for different transformers. A transformed element is an optional list of processing steps to apply to the resource's content before it is digested. It can include operations such as canonicalization, encoding/decoding, XPath and XSLT specified by the transformAlgorithm. Supported transforms include: Base64, Canonicalization without comments, Canonicalization with comments, XPath, and Enveloped-Signature.
Copyright © RSA Security Inc., 2001-2002. All rights reserved.
See Also
Field Summary |
|
static String[] |
BASE64_LIST
Specifies all supported Base64 transform algorithms as a list of URLs. |
static String[] |
C14N_LIST
Specifies the algorithm name lists for the canonicalization without comments, including all the URLs of the canonicalization specification since June 2000. |
static String[] |
C14N_WITH_COMMENTS_LIST
Specifies the algorithm name lists for the canonicalization with comments, including all the URLs of the canonicalization specification since June 2000. |
static String[] |
ENVELOPED_SIGNATURE_LIST
Specifies all supported Enveloped-Signature transform algorithms as a list of URLs |
static String[] |
XPATH_LIST
Specifies all supported XPath transform algorithms as a list of URLs. |
Constructor Summary |
|
Transformer()
|
Method Summary |
|
static Hashtable |
getAllTransformsInfo()
Returns the hash table that stores all the supported transformations. |
static Transformer |
getInstance(String transformAlgorithm)
Generates a new |
abstract String |
getTransformAlgorithm()
Returns the transform algorithm. |
abstract byte[] |
performTransformation(byte[] input,
int inOffset,
int inputLength)
Applies the transform operation to a |
abstract org.w3c.dom.NodeList |
performTransformation(org.w3c.dom.NodeList inputNodes)
This method applies the transform operation to a node-set. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String[] BASE64_LIST
public static final String[] C14N_LIST
public static final String[] C14N_WITH_COMMENTS_LIST
public static final String[] XPATH_LIST
public static final String[] ENVELOPED_SIGNATURE_LIST
Constructor Detail |
public Transformer()
Method Detail |
public static Hashtable getAllTransformsInfo()
Returns
Hashtable
object that stores all the supported
Transformer
classes.public abstract String getTransformAlgorithm()
Returns
String
object containing
the transform algorithm name.public static Transformer getInstance(String transformAlgorithm) throws XMLException
Transform
object specified by transformAlgorithm.
It looks up the internal hash table to determine whether the
Transformer
class of
transformAlgorithm is defined.
Parameters
transformAlgorithm | A URL string specifying the name of the transform algorithm. |
Returns
Transformer
object specified by the
transformAlgorithm.Throws
XMLException
- If an error occurs while instantiating
a Transformer
object.public abstract byte[] performTransformation(byte[] input, int inOffset, int inputLength) throws XMLException
byte
array
input. Transforms such as Base64
should use this method.
Parameters
input | The | ||
inOffset | The starting position of the data to transform in input. | ||
inputLength | The length of the data to transform in input. |
Returns
byte
array that contains the transformation.Throws
XMLException
- If an error occurs while performing the
transformation.public abstract org.w3c.dom.NodeList performTransformation(org.w3c.dom.NodeList inputNodes) throws XMLException
XPath
should use this method.
Parameters
inputNodes | A |
Returns
NodeList
object containing the
transformed data.Throws
XMLException
- If an error occurs during the
transformation.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |