Class AbstractSAMLObjectMarshaller

    • Constructor Detail

      • AbstractSAMLObjectMarshaller

        public AbstractSAMLObjectMarshaller()
    • Method Detail

      • marshallAttributes

        protected void marshallAttributes​(XMLObject xmlObject,
                                          Element domElement)
                                   throws MarshallingException
        No-op method. Extending implementations should override this method if they have attributes to marshall into the Element. Marshalls a given XMLObject into a W3C Element. The given signing context should be blindly passed to the marshaller for child elements. The XMLObject passed to this method is guaranteed to be of the target name specified during this unmarshaller's construction. This default implementation of this method is a no-op
        Overrides:
        marshallAttributes in class AbstractXMLObjectMarshaller
        Parameters:
        xmlObject - the XMLObject to marshall
        domElement - the W3C DOM element
        Throws:
        MarshallingException - thrown if there is a problem marshalling the element
      • marshallElementContent

        protected void marshallElementContent​(XMLObject xmlObject,
                                              Element domElement)
                                       throws MarshallingException
        No-op method. Extending implementations should override this method if they have text content to marshall into the Element. Marshalls data from the XMLObject into content of the DOM Element. The default implementation of this method is a no-op.
        Overrides:
        marshallElementContent in class AbstractXMLObjectMarshaller
        Parameters:
        xmlObject - the XMLObject
        domElement - the DOM element recieving the content
        Throws:
        MarshallingException - thrown if the textual content can not be added to the DOM element
      • 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
        Overrides:
        marshall in class AbstractXMLObjectMarshaller
        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
      • 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
        Overrides:
        marshall in class AbstractXMLObjectMarshaller
        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.