Package org.opensaml.saml.common

# 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 Summary

Constructors
Constructor
Description
`AbstractSAMLObjectMarshaller()`

## Method Summary

Modifier and Type
Method
Description
`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.
`protected void`
`marshallAttributes(XMLObject xmlObject, Element domElement)`
No-op method.
`protected void`
`marshallElementContent(XMLObject xmlObject, Element domElement)`
No-op method.

### Methods inherited from class org.opensaml.core.xml.io.AbstractXMLObjectMarshaller

`marshall, marshallAttributeIDness, marshallChildElements, marshallInto, marshallNamespacePrefix, marshallNamespaces, marshallSchemaInstanceAttributes, marshallUnknownAttributes, setDocumentElement`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AbstractSAMLObjectMarshaller

public AbstractSAMLObjectMarshaller()

## Method Details

### marshallAttributes

protected void marshallAttributes(@Nonnull XMLObject xmlObject, @Nonnull 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(@Nonnull XMLObject xmlObject, @Nonnull 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

@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:
  `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

@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:
  `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.