org.opensaml.xml.signature.impl
Class SignatureMarshaller

java.lang.Object
  extended by org.opensaml.xml.signature.impl.SignatureMarshaller
All Implemented Interfaces:
Marshaller

public class SignatureMarshaller
extends Object
implements Marshaller

A marshaller for Signature objects. This marshaller is really a no-op class. All the creation of the signature DOM elements is handled by Signer when it signs the object.


Field Summary
private  Logger log
          Class logger.
 
Constructor Summary
SignatureMarshaller()
          Constructor.
 
Method Summary
private  Element createSignatureElement(Signature signature, Document document)
          Creates the signature elements but does not compute the signatuer.
 Element marshall(XMLObject xmlObject)
          Marshall this element, and its children, and root them in a newly created Document.
 Element marshall(XMLObject xmlObject, Document document)
          Marshall this element, and its children, into a W3C DOM element.
 Element marshall(XMLObject xmlObject, Element parentElement)
          Marshall the given XMLObject and append it as a child to the given parent element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private final Logger log
Class logger.

Constructor Detail

SignatureMarshaller

public SignatureMarshaller()
Constructor.

Method Detail

marshall

public Element marshall(XMLObject xmlObject)
                 throws MarshallingException
Marshall this element, and its children, and root them in a newly created Document. The Document is created by a DocumentBuilder obtained from a DocumentBuilderFactory created without any additional parameters or properties set; that is the system defaults properties are used.

Specified by:
marshall in interface Marshaller
Parameters:
xmlObject - the object to marshall
Returns:
the W3C DOM element representing this SAML element
Throws:
MarshallingException - thrown if there is a problem marshalling the given object

marshall

public Element marshall(XMLObject xmlObject,
                        Element parentElement)
                 throws MarshallingException
Marshall the given XMLObject and append it as a child to the given parent element. NOTE: The given Element must be within a DOM tree whose root is the root of the Document owning the given Element.

Specified by:
marshall in interface Marshaller
Parameters:
xmlObject - the XMLObject to be marshalled
parentElement - the parent of the Element resulting from marshalling the given XMLObject
Returns:
the marshalled XMLObject
Throws:
MarshallingException - thrown if the given XMLObject can not be marshalled.

marshall

public Element marshall(XMLObject xmlObject,
                        Document document)
                 throws MarshallingException
Marshall this element, and its children, into a W3C DOM element. If the document does not have a Document Element the Element resulting from this marshalling will be set as the Document Element.

Specified by:
marshall in interface Marshaller
Parameters:
xmlObject - the object to marshall
document - the DOM document the marshalled element will be placed in
Returns:
the W3C DOM element representing this XMLObject
Throws:
MarshallingException - thrown if there is a problem marshalling the given object

createSignatureElement

private Element createSignatureElement(Signature signature,
                                       Document document)
                                throws MarshallingException
Creates the signature elements but does not compute the signatuer.

Parameters:
signature - the XMLObject to be signed
document - the owning document
Returns:
the Signature element
Throws:
MarshallingException - thrown if the signature can not be constructed


Copyright © 1999-2012. All Rights Reserved.