Class SignatureMarshaller
java.lang.Object
org.opensaml.xmlsec.signature.impl.SignatureMarshaller
- All Implemented Interfaces:
Marshaller
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ElementcreateSignatureElement(Signature signature, Document document) Creates the signature elements but does not compute the signature.Marshall this element, and its children, and root them in a newly created Document.Marshall this element, and its children, into a W3C DOM element.Marshall the given XMLObject and append it as a child to the given parent element.
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger.
-
-
Constructor Details
-
SignatureMarshaller
public SignatureMarshaller()Constructor.
-
-
Method Details
-
marshall
Marshall this element, and its children, and root them in a newly created Document. The Document is created by aDocumentBuilderobtained from aDocumentBuilderFactorycreated without any additional parameters or properties set; that is the system defaults properties are used.- Specified by:
marshallin interfaceMarshaller- 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
@Nonnull public Element marshall(@Nonnull XMLObject xmlObject, @Nonnull 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:
marshallin interfaceMarshaller- Parameters:
xmlObject- the XMLObject to be marshalledparentElement- 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
@Nonnull public Element marshall(@Nonnull XMLObject xmlObject, @Nonnull 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:
marshallin interfaceMarshaller- Parameters:
xmlObject- the object to marshalldocument- 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
@Nonnull private Element createSignatureElement(@Nonnull Signature signature, @Nonnull Document document) throws MarshallingException Creates the signature elements but does not compute the signature.- Parameters:
signature- the XMLObject to be signeddocument- the owning document- Returns:
- the Signature element
- Throws:
MarshallingException- thrown if the signature can not be constructed
-