Interface XmlSerializable

All Known Subinterfaces:
Action, Action, Advice, Artifact, ArtifactResolve, ArtifactResponse, Assertion, AssertionIDRef, AssertionIDRequest, Attribute, Attribute, AttributeQuery, AttributeStatement, AudienceRestriction, AuthnContext, AuthnQuery, AuthnRequest, AuthnStatement, AuthzDecisionStatement, BaseID, Condition, ConditionAbstract, Conditions, Decision, ECPRelayState, ECPRequest, ECPResponse, EncryptedAssertion, EncryptedAttribute, EncryptedElement, EncryptedID, Environment, Evidence, Extensions, GetComplete, IDPEntry, IDPList, Issuer, KeyInfoConfirmationData, LogoutRequest, LogoutResponse, ManageNameIDRequest, ManageNameIDResponse, MissingAttributeDetail, NameID, NameIDMappingRequest, NameIDMappingResponse, NameIDPolicy, NameIDType, NewEncryptedID, NewID, Obligation, Obligations, OneTimeUse, ProxyRestriction, Request, RequestAbstract, RequestedAuthnContext, RequesterID, Resource, ResourceContent, Response, Response, Result, Scoping, SessionIndex, Statement, Status, Status, StatusCode, StatusCode, StatusDetail, StatusDetail, StatusMessage, StatusMessage, StatusResponse, Subject, Subject, SubjectConfirmation, SubjectConfirmationData, SubjectLocality, SubjectQueryAbstract, XACMLAuthzDecisionQuery, XACMLAuthzDecisionStatement
All Known Implementing Classes:
ActionImpl, AttributeImpl, DecisionImpl, EnvironmentImpl, ObligationImpl, ObligationsImpl, com.sun.identity.saml2.protocol.impl.RequestAbstractImpl, RequestImpl, ResourceImpl, StatusCodeImpl, StatusDetailImpl, StatusImpl, StatusMessageImpl, SubjectImpl, XACMLAuthzDecisionQueryImpl

@SupportedAll public interface XmlSerializable
Common super-interface for all SAML elements that can be serialized into XML. Implementations must implement either the toDocumentFragment(Document, boolean, boolean) method (preferred) or the toXMLString(boolean, boolean) method (only for compatibility).
  • Method Details

    • toDocumentFragment

      default DocumentFragment toDocumentFragment(Document document, boolean includeNSPrefix, boolean declareNS) throws com.sun.identity.saml2.common.SAML2Exception
      Serializes the element into an XML DocumentFragment. A default implementation is provided for compatibility with legacy code that implements toXMLString(), but it is highly recommended to override this method.
      Parameters:
      document - the parent Document to create the document fragment from.
      includeNSPrefix - whether to include a namespace prefix in the document elements.
      declareNS - whether to declare any namespaces or assume that they are already declared.
      Returns:
      the XML document fragment representing this SAML2 element.
      Throws:
      com.sun.identity.saml2.common.SAML2Exception - if the element cannot be serialized for any reason.
    • toXMLString

      @Deprecated default String toXMLString(boolean includeNSPrefix, boolean declareNS) throws com.sun.identity.saml2.common.SAML2Exception
      Returns an XML String representation of this element.
      Parameters:
      includeNSPrefix - Determines whether or not the namespace qualifier is prepended to the Element when converted.
      declareNS - Determines whether or not the namespace is declared within the Element.
      Returns:
      A String representation.
      Throws:
      com.sun.identity.saml2.common.SAML2Exception - if something went wrong during conversion
    • toXMLString

      @Deprecated default String toXMLString() throws com.sun.identity.saml2.common.SAML2Exception
      Returns an XML String representation of this element.
      Returns:
      A String representation.
      Throws:
      com.sun.identity.saml2.common.SAML2Exception - if something went wrong during conversion.