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 theMarshallerinterface that handles most of the boilerplate code for Marshallers.
-
-
Constructor Summary
Constructors Constructor Description AbstractSAMLObjectMarshaller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Elementmarshall(XMLObject xmlObject, Document document)Marshall this element, and its children, into a W3C DOM element.Elementmarshall(XMLObject xmlObject, Element parentElement)Marshall the given XMLObject and append it as a child to the given parent element.protected voidmarshallAttributes(XMLObject xmlObject, Element domElement)No-op method.protected voidmarshallElementContent(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
-
-
-
-
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:
marshallAttributesin classAbstractXMLObjectMarshaller- Parameters:
xmlObject- the XMLObject to marshalldomElement- 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:
marshallElementContentin classAbstractXMLObjectMarshaller- Parameters:
xmlObject- the XMLObjectdomElement- 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:
marshallin interfaceMarshaller- Overrides:
marshallin classAbstractXMLObjectMarshaller- 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
-
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:
marshallin interfaceMarshaller- Overrides:
marshallin classAbstractXMLObjectMarshaller- 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.
-
-