Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xml.security.transforms
Class Transform

    java.lang.Object
      org.apache.xml.security.utils.ElementProxy
          org.apache.xml.security.utils.SignatureElementProxy
              org.apache.xml.security.transforms.Transform

    public final class Transform

extends SignatureElementProxy

Implements the behaviour of the `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.

Author:
  Christian Geuer-Pollmann
See Also:
  `Transforms`, `TransformSpi`

Field Summary

Fields inherited from class org.apache.xml.security.utils.ElementProxy
`baseURI, constructionElement, doc`

Constructor Summary
`Transform(org.w3c.dom.Document doc, java.lang.String algorithmURI)` Generates a Transform object that implements the specified `Transform algorithm` URI.
`Transform(org.w3c.dom.Document doc, java.lang.String algorithmURI, org.w3c.dom.Element contextChild)` Generates a Transform object that implements the specified `Transform algorithm` URI.
`Transform(org.w3c.dom.Document doc, java.lang.String algorithmURI, org.w3c.dom.NodeList contextNodes)` Constructs `Transform`
`Transform(org.w3c.dom.Element element, java.lang.String BaseURI)`

Method Summary
`java.lang.String` | `getBaseLocalName()` Returns the localname of the Elements of the sub-class.
`java.lang.String` | `getURI()` Returns the URI representation of Transformation algorithm
`boolean` | `isSecureValidation()`
`XMLSignatureInput` | `performTransform(XMLSignatureInput input)` Transforms the input, and generates `XMLSignatureInput` as output.
`XMLSignatureInput` | `performTransform(XMLSignatureInput input, java.io.OutputStream os)` Transforms the input, and generates `XMLSignatureInput` as output.
`static void` | `register(java.lang.String algorithmURI, java.lang.Class<? extends TransformSpi> implementingClass)` Registers implementing class of the Transform algorithm with algorithmURI
`static void` | `register(java.lang.String algorithmURI, java.lang.String implementingClass)` Registers implementing class of the Transform algorithm with algorithmURI
`static void` | `registerDefaultAlgorithms()` This method registers the default algorithms.
`void` | `setSecureValidation(boolean secureValidation)`

Methods inherited from class org.apache.xml.security.utils.SignatureElementProxy
`getBaseNamespace`

Methods inherited from class org.apache.xml.security.utils.ElementProxy
`addBase64Element, addBase64Text, addBigIntegerElement, addText, addTextElement, createElementForFamily, createElementForFamilyLocal, getBaseURI, getBigIntegerFromChildElement, getBytesFromChildElement, getBytesFromTextChild, getDefaultPrefix, getDocument, getElement, getElementPlusReturns, getTextFromChildElement, getTextFromTextChild, length, registerDefaultPrefixes, setDefaultPrefix, setElement, setXPathNamespaceContext`

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

Constructor Detail

### Transform

    public Transform(org.w3c.dom.Document doc,
                     java.lang.String algorithmURI)
              throws InvalidTransformException

  Generates a Transform object that implements the specified `Transform algorithm` URI.

  Parameters:
    `doc` - the proxy `Document`
    `algorithmURI` - `Transform algorithm` URI representation, such as specified in Transform algorithm
  Throws:
    `InvalidTransformException`

### Transform

    public Transform(org.w3c.dom.Document doc,
                     java.lang.String algorithmURI,
                     org.w3c.dom.Element contextChild)
              throws InvalidTransformException

  Generates a Transform object that implements the specified `Transform algorithm` URI.

  Parameters:
    `algorithmURI` - `Transform algorithm` URI representation, such as specified in Transform algorithm
    `contextChild` - the child element of `Transform` element
    `doc` - the proxy `Document`
  Throws:
    `InvalidTransformException`

### Transform

    public Transform(org.w3c.dom.Document doc,
                     java.lang.String algorithmURI,
                     org.w3c.dom.NodeList contextNodes)
              throws InvalidTransformException

  Constructs `Transform`

  Parameters:
    `doc` - the `Document` in which `Transform` will be placed
    `algorithmURI` - URI representation of `Transform algorithm`
    `contextNodes` - the child node list of `Transform` element
  Throws:
    `InvalidTransformException`

### Transform

    public Transform(org.w3c.dom.Element element,
                     java.lang.String BaseURI)
              throws InvalidTransformException,
                     TransformationException,
                     XMLSecurityException

Parameters:
  `element` - `ds:Transform` element
  `BaseURI` - the URI of the resource where the XML instance was stored
Throws:
  `InvalidTransformException`
  `TransformationException`
  `XMLSecurityException`

Method Detail

### register

    public static void register(java.lang.String algorithmURI,
                                java.lang.String implementingClass)
                         throws AlgorithmAlreadyRegisteredException,
                                java.lang.ClassNotFoundException,
                                InvalidTransformException

  Registers implementing class of the Transform algorithm with algorithmURI

  Parameters:
    `algorithmURI` - algorithmURI URI representation of `Transform algorithm`
    `implementingClass` - `implementingClass` the implementing class of `TransformSpi`
  Throws:
    `AlgorithmAlreadyRegisteredException` - if specified algorithmURI is already registered
    `java.lang.ClassNotFoundException`
    `InvalidTransformException`

### register

    public static void register(java.lang.String algorithmURI,
                                java.lang.Class<? extends TransformSpi> implementingClass)
                         throws AlgorithmAlreadyRegisteredException

  Registers implementing class of the Transform algorithm with algorithmURI

  Parameters:
    `algorithmURI` - algorithmURI URI representation of `Transform algorithm`
    `implementingClass` - `implementingClass` the implementing class of `TransformSpi`
  Throws:
    `AlgorithmAlreadyRegisteredException` - if specified algorithmURI is already registered

### registerDefaultAlgorithms

    public static void registerDefaultAlgorithms()

  This method registers the default algorithms.

### getURI

    public java.lang.String getURI()

  Returns the URI representation of Transformation algorithm

  Returns:
    the URI representation of Transformation algorithm

### performTransform

    public XMLSignatureInput performTransform(XMLSignatureInput input)
                                       throws java.io.IOException,
                                              CanonicalizationException,
                                              InvalidCanonicalizerException,
                                              TransformationException

  Transforms the input, and generates `XMLSignatureInput` as output.

  Parameters:
    `input` - input `XMLSignatureInput` which can supplied Octet Stream and NodeSet as Input of Transformation
  Returns:
    the `XMLSignatureInput` class as the result of transformation
  Throws:
    `CanonicalizationException`
    `java.io.IOException`
    `InvalidCanonicalizerException`
    `TransformationException`

### performTransform

    public XMLSignatureInput performTransform(XMLSignatureInput input,
                                              java.io.OutputStream os)
                                       throws java.io.IOException,
                                              CanonicalizationException,
                                              InvalidCanonicalizerException,
                                              TransformationException

  Transforms the input, and generates `XMLSignatureInput` as output.

  Parameters:
    `input` - input `XMLSignatureInput` which can supplied Octect Stream and NodeSet as Input of Transformation
    `os` - where to output the result of the last transformation
  Returns:
    the `XMLSignatureInput` class as the result of transformation
  Throws:
    `CanonicalizationException`
    `java.io.IOException`
    `InvalidCanonicalizerException`
    `TransformationException`

### getBaseLocalName

    public java.lang.String getBaseLocalName()

  Description copied from class: `ElementProxy`
  Returns the localname of the Elements of the sub-class.

  Specified by:
    `getBaseLocalName` in class `ElementProxy`
  Returns:
    the localname of the Elements of the sub-class.

### isSecureValidation

    public boolean isSecureValidation()

### setSecureValidation

    public void setSecureValidation(boolean secureValidation)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD