APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xml.internal.security.transforms

public Class Transforms

extends SignatureElementProxy
Class Inheritance
Imports
java.io.IOException, .OutputStream, com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException, .Canonicalizer, .InvalidCanonicalizerException, com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException, com.sun.org.apache.xml.internal.security.signature.XMLSignatureException, .XMLSignatureInput, com.sun.org.apache.xml.internal.security.utils.Constants, .SignatureElementProxy, .XMLUtils, org.w3c.dom.DOMException, .Document, .Element, .NodeList

Holder of the com.sun.org.apache.xml.internal.security.transforms.Transform steps to be performed on the data. The input to the first Transform is the result of dereferencing the URI attribute of the Reference element. The output from the last Transform is the input for the DigestMethod algorithm
See Also
Transform, com.sun.org.apache.xml.internal.security.signature.Reference

Field Summary

Modifier and TypeField and Description
private static final Logger
private boolean
public static final String
TRANSFORM_BASE64_DECODE

Transform - Required base64 decoding

public static final String
TRANSFORM_C14N11_OMIT_COMMENTS

Canonicalization - Required Canonical XML 1.1 (omits comments)

public static final String
TRANSFORM_C14N11_WITH_COMMENTS

Canonicalization - Recommended Canonical XML 1.1 with Comments

public static final String
TRANSFORM_C14N_EXCL_OMIT_COMMENTS

Canonicalization - Required Exclusive Canonicalization (omits comments)

public static final String
TRANSFORM_C14N_EXCL_WITH_COMMENTS

Canonicalization - Recommended Exclusive Canonicalization with Comments

public static final String
TRANSFORM_C14N_OMIT_COMMENTS

Canonicalization - Required Canonical XML (omits comments)

public static final String
TRANSFORM_C14N_WITH_COMMENTS

Canonicalization - Recommended Canonical XML with Comments

public static final String
TRANSFORM_ENVELOPED_SIGNATURE

Transform - Required Enveloped Signature

public static final String
TRANSFORM_XPATH

Transform - Recommended XPath

public static final String
TRANSFORM_XPATH2FILTER

Transform - XPath Filter

public static final String
TRANSFORM_XPOINTER

Transform - XPointer

public static final String
TRANSFORM_XSLT

Transform - Optional XSLT

private Element[]

Constructor Summary

AccessConstructor and Description
protected
public
Transforms(Document
the Document in which XMLSignature will be placed
doc
)

Constructs Transforms.

public
Transforms(Element
is Transforms element
element
,
String
the URI where the XML instance was stored
baseURI
)

Constructs Transforms from Element which is Transforms Element

Method Summary

Modifier and TypeMethod and Description
public void
addTransform(String
the URI form of transform that indicates which transformation is applied to data
transformURI
)

Adds the Transform with the specified Transform algorithm URI

public void
addTransform(String
the URI form of transform that indicates which transformation is applied to data
transformURI
,
Element contextElement)

Adds the Transform with the specified Transform algorithm URI

public void
addTransform(String
the URI form of transform that indicates which transformation is applied to data
transformURI
,
NodeList contextNodes)

Adds the Transform with the specified Transform algorithm URI.

private void
addTransform(Transform
Transform object
transform
)

Adds a user-provided Transform step.

private void
public String
getBaseLocalName()

Implements abstract com.sun.org.apache.xml.internal.security.utils.ElementProxy.getBaseLocalName.

Returns the localname of the Elements of the sub-class.

public int

Returns:

the number of transformations
getLength
()

Return the nonnegative number of transformations.

private void
public Transform

Returns:

the ith Transform
item
(int
index of Transform to return
i
)

Return the ith {@link Transform}.

public XMLSignatureInput

Returns:

the result of the Transforms
performTransforms
(XMLSignatureInput
the input for the Transforms
xmlSignatureInput
)

Applies all included Transforms to xmlSignatureInput and returns the result of these transformations.

public XMLSignatureInput

Returns:

the result of the Transforms
performTransforms
(XMLSignatureInput
the input for the Transforms
xmlSignatureInput
,
OutputStream
where to output the last transformation.
os
)

Applies all included Transforms to xmlSignatureInput and returns the result of these transformations.

public void
setSecureValidation(boolean secureValidation)

Set whether secure validation is enabled or not.

Inherited from com.sun.org.apache.xml.internal.security.utils.SignatureElementProxy:
getBaseNamespace

Field Detail

LOGback to summary
private static final Logger LOG

Hides com.sun.org.apache.xml.internal.security.utils.ElementProxy.LOG.

secureValidationback to summary
private boolean secureValidation
TRANSFORM_BASE64_DECODEback to summary
public static final String TRANSFORM_BASE64_DECODE

Transform - Required base64 decoding

TRANSFORM_C14N11_OMIT_COMMENTSback to summary
public static final String TRANSFORM_C14N11_OMIT_COMMENTS

Canonicalization - Required Canonical XML 1.1 (omits comments)

TRANSFORM_C14N11_WITH_COMMENTSback to summary
public static final String TRANSFORM_C14N11_WITH_COMMENTS

Canonicalization - Recommended Canonical XML 1.1 with Comments

TRANSFORM_C14N_EXCL_OMIT_COMMENTSback to summary
public static final String TRANSFORM_C14N_EXCL_OMIT_COMMENTS

Canonicalization - Required Exclusive Canonicalization (omits comments)

TRANSFORM_C14N_EXCL_WITH_COMMENTSback to summary
public static final String TRANSFORM_C14N_EXCL_WITH_COMMENTS

Canonicalization - Recommended Exclusive Canonicalization with Comments

TRANSFORM_C14N_OMIT_COMMENTSback to summary
public static final String TRANSFORM_C14N_OMIT_COMMENTS

Canonicalization - Required Canonical XML (omits comments)

TRANSFORM_C14N_WITH_COMMENTSback to summary
public static final String TRANSFORM_C14N_WITH_COMMENTS

Canonicalization - Recommended Canonical XML with Comments

TRANSFORM_ENVELOPED_SIGNATUREback to summary
public static final String TRANSFORM_ENVELOPED_SIGNATURE

Transform - Required Enveloped Signature

TRANSFORM_XPATHback to summary
public static final String TRANSFORM_XPATH

Transform - Recommended XPath

TRANSFORM_XPATH2FILTERback to summary
public static final String TRANSFORM_XPATH2FILTER

Transform - XPath Filter

TRANSFORM_XPOINTERback to summary
public static final String TRANSFORM_XPOINTER

Transform - XPointer

TRANSFORM_XSLTback to summary
public static final String TRANSFORM_XSLT

Transform - Optional XSLT

transformsElementback to summary
private Element[] transformsElement

Constructor Detail

Transformsback to summary
protected Transforms()
Transformsback to summary
public Transforms(Document doc)

Constructs Transforms.

Parameters
doc:Document

the Document in which XMLSignature will be placed

Transformsback to summary
public Transforms(Element element, String baseURI) throws DOMException, XMLSignatureException, InvalidTransformException, TransformationException, XMLSecurityException

Constructs Transforms from Element which is Transforms Element

Parameters
element:Element

is Transforms element

baseURI:String

the URI where the XML instance was stored

Method Detail

addTransformback to summary
public void addTransform(String transformURI) throws TransformationException

Adds the Transform with the specified Transform algorithm URI

Parameters
transformURI:String

the URI form of transform that indicates which transformation is applied to data

addTransformback to summary
public void addTransform(String transformURI, Element contextElement) throws TransformationException

Adds the Transform with the specified Transform algorithm URI

Parameters
transformURI:String

the URI form of transform that indicates which transformation is applied to data

addTransformback to summary
public void addTransform(String transformURI, NodeList contextNodes) throws TransformationException

Adds the Transform with the specified Transform algorithm URI.

Parameters
transformURI:String

the URI form of transform that indicates which transformation is applied to data

addTransformback to summary
private void addTransform(Transform transform)

Adds a user-provided Transform step.

Parameters
transform:Transform

Transform object

checkSecureValidationback to summary
private void checkSecureValidation(Transform transform) throws TransformationException
getBaseLocalNameback to summary
public String getBaseLocalName()

Implements abstract com.sun.org.apache.xml.internal.security.utils.ElementProxy.getBaseLocalName.

Doc from com.sun.org.apache.xml.internal.security.utils.ElementProxy.getBaseLocalName.

Returns the localname of the Elements of the sub-class.

getLengthback to summary
public int getLength()

Return the nonnegative number of transformations.

Returns:int

the number of transformations

initTransformsback to summary
private void initTransforms()
itemback to summary
public Transform item(int i) throws TransformationException

Return the ith {@link Transform}. Valid i values are 0 to {@link #getLength}-1.

Parameters
i:int

index of Transform to return

Returns:Transform

the ith Transform

performTransformsback to summary
public XMLSignatureInput performTransforms(XMLSignatureInput xmlSignatureInput) throws TransformationException

Applies all included Transforms to xmlSignatureInput and returns the result of these transformations.

Parameters
xmlSignatureInput:XMLSignatureInput

the input for the Transforms

Returns:XMLSignatureInput

the result of the Transforms

performTransformsback to summary
public XMLSignatureInput performTransforms(XMLSignatureInput xmlSignatureInput, OutputStream os) throws TransformationException

Applies all included Transforms to xmlSignatureInput and returns the result of these transformations.

Parameters
xmlSignatureInput:XMLSignatureInput

the input for the Transforms

os:OutputStream

where to output the last transformation.

Returns:XMLSignatureInput

the result of the Transforms

setSecureValidationback to summary
public void setSecureValidation(boolean secureValidation)

Set whether secure validation is enabled or not. The default is false.