Class AbstractSAMLObjectMarshaller

java.lang.Object
org.opensaml.core.xml.io.AbstractXMLObjectMarshaller
org.opensaml.saml.common.AbstractSAMLObjectMarshaller
All Implemented Interfaces:
Marshaller
Direct Known Subclasses:
AdviceMarshaller, AdviceMarshaller, AffiliationDescriptorMarshaller, AssertionMarshaller, AssertionMarshaller, AsynchronousMarshaller, AttributeConsumingServiceMarshaller, AttributeDesignatorMarshaller, AttributeMarshaller, AttributeStatementMarshaller, AudienceRestrictionConditionMarshaller, AudienceRestrictionMarshaller, AuthnContextMarshaller, AuthnStatementMarshaller, AuthorityBindingMarshaller, AuthzDecisionStatementMarshaller, BaseIDMarshaller, ConditionsMarshaller, ConditionsMarshaller, ContactPersonMarshaller, DelegateMarshaller, DelegationRestrictionTypeMarshaller, DigestMethodMarshaller, DiscoHintsMarshaller, DoNotCacheConditionMarshaller, EncryptedElementTypeMarshaller, EndpointMarshaller, EntitiesDescriptorMarshaller, EntityAttributesMarshaller, EntityDescriptorMarshaller, EvidenceMarshaller, EvidenceMarshaller, ExtensionsMarshaller, ExtensionsMarshaller, IDPEntryMarshaller, IDPListMarshaller, KeyDescriptorMarshaller, KeywordsMarshaller, NameIDPolicyMarshaller, OneTimeUseMarshaller, OrganizationMarshaller, ProxyRestrictionMarshaller, PublicationInfoMarshaller, PublicationMarshaller, PublicationPathMarshaller, ReferencedPoliciesTypeMarshaller, RegistrationInfoMarshaller, RequestAbstractTypeMarshaller, RequestAbstractTypeMarshaller, RequestAuthenticatedMarshaller, RequestedAttributesMarshaller, RequestedAuthnContextMarshaller, RequestMarshaller, ResponseAbstractTypeMarshaller, ResponseMarshaller, RoleDescriptorMarshaller, ScopingMarshaller, SessionKeyMarshaller, SigningMethodMarshaller, StatusCodeMarshaller, StatusCodeMarshaller, StatusDetailMarshaller, StatusDetailMarshaller, StatusMarshaller, StatusMarshaller, StatusResponseTypeMarshaller, SubjectConfirmationDataMarshaller, SubjectConfirmationMarshaller, SubjectConfirmationMarshaller, SubjectConfirmationMarshaller, SubjectLocalityMarshaller, SubjectLocalityMarshaller, SubjectMarshaller, SubjectMarshaller, SubjectQueryMarshaller, SubjectStatementMarshaller, TerminateMarshaller, UIInfoMarshaller, XACMLAuthzDecisionStatementTypeMarshaller, XACMLPolicyStatementTypeMarshaller

public abstract class AbstractSAMLObjectMarshaller extends AbstractXMLObjectMarshaller
A thread safe, abstract implementation of the Marshaller interface that handles most of the boilerplate code for Marshallers.
  • Constructor Details

    • AbstractSAMLObjectMarshaller

      public AbstractSAMLObjectMarshaller()
  • Method Details

    • 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.