Class AssertionFactory


  • @SupportedAll
    public class AssertionFactory
    extends Object
    This is the factory class to obtain instances of the objects defined in assertion schema. There are three ways to obtain an instance of a object type: with no parameters, with a DOM tree element, or with an XML String.
    • Method Detail

      • getInstance

        public static AssertionFactory getInstance()
        Returns the instance of AssertionFactory.
        Returns:
        AssertionFactory.
      • createAdvice

        public Advice createAdvice()
        Returns a new instance of Advice.
        Returns:
        a new instance of Advice
      • createAdvice

        public Advice createAdvice​(Element elem)
                            throws SAML2Exception
        Returns a new instance of Advice. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of Advice
        Returns:
        a new instance of Advice
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createAdvice

        public Advice createAdvice​(String xml)
                            throws SAML2Exception
        Returns a new instance of Advice The return object is immutable.
        Parameters:
        xml - a XML string representation of Advice
        Returns:
        a new instance of Advice
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createAssertion

        public Assertion createAssertion()
        Returns a new instance of Assertion.
        Returns:
        a new instance of Assertion
      • createAssertion

        public Assertion createAssertion​(Element elem)
                                  throws SAML2Exception
        Returns a new instance of Assertion. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of Assertion
        Returns:
        a new instance of Assertion
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createAssertion

        public Assertion createAssertion​(String xml)
                                  throws SAML2Exception
        Returns a new instance of Assertion. The return object is immutable.
        Parameters:
        xml - a XML string representation of Assertion
        Returns:
        a new instance of Assertion
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createAssertionIDRef

        public AssertionIDRef createAssertionIDRef()
        Returns a new instance of AssertionIDRef.
        Returns:
        a new instance of AssertionIDRef
      • createAssertionIDRef

        public AssertionIDRef createAssertionIDRef​(Element elem)
                                            throws SAML2Exception
        Returns a new instance of AssertionIDRef. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of AssertionIDRef
        Returns:
        a new instance of AssertionIDRef
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createAssertionIDRef

        public AssertionIDRef createAssertionIDRef​(String xml)
                                            throws SAML2Exception
        Returns a new instance of AssertionIDRef. The return object is immutable.
        Parameters:
        xml - a XML string representation of AssertionIDRef
        Returns:
        a new instance of AssertionIDRef
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createAudienceRestriction

        public AudienceRestriction createAudienceRestriction()
        Returns a new instance of AudienceRestriction.
        Returns:
        a new instance of AudienceRestriction
      • createAudienceRestriction

        public AudienceRestriction createAudienceRestriction​(Element elem)
                                                      throws SAML2Exception
        Returns a new instance of AudienceRestriction. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of AudienceRestriction
        Returns:
        a new instance of AudienceRestriction
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createAudienceRestriction

        public AudienceRestriction createAudienceRestriction​(String xml)
                                                      throws SAML2Exception
        Returns a new instance of AudienceRestriction. The return object is immutable.
        Parameters:
        xml - a XML string representation of AudienceRestriction
        Returns:
        a new instance of AudienceRestriction
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createBaseID

        public BaseID createBaseID()
        Returns a new instance of BaseID.
        Returns:
        a new instance of BaseID
      • createBaseID

        public BaseID createBaseID​(Element elem)
                            throws SAML2Exception
        Returns a new instance of BaseID. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of BaseID
        Returns:
        a new instance of BaseID
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createBaseID

        public BaseID createBaseID​(String xml)
                            throws SAML2Exception
        Returns a new instance of BaseID. The return object is immutable.
        Parameters:
        xml - a XML string representation of BaseID
        Returns:
        a new instance of BaseID
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createCondition

        public Condition createCondition()
        Returns a new instance of Condition.
        Returns:
        a new instance of Condition
      • createCondition

        public Condition createCondition​(Element elem)
                                  throws SAML2Exception
        Returns a new instance of Condition. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of Condition
        Returns:
        a new instance of Condition
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createCondition

        public Condition createCondition​(String xml)
                                  throws SAML2Exception
        Returns a new instance of Condition. The return object is immutable.
        Parameters:
        xml - a XML string representation of Condition
        Returns:
        a new instance of Condition
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createConditions

        public Conditions createConditions()
        Returns a new instance of Conditions.
        Returns:
        a new instance of Conditions
      • createConditions

        public Conditions createConditions​(Element elem)
                                    throws SAML2Exception
        Returns a new instance of Conditions. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of Conditions
        Returns:
        a new instance of Conditions
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createConditions

        public Conditions createConditions​(String xml)
                                    throws SAML2Exception
        Returns a new instance of Conditions. The return object is immutable.
        Parameters:
        xml - a XML string representation of Conditions
        Returns:
        a new instance of Conditions
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createEncryptedAssertion

        public EncryptedAssertion createEncryptedAssertion​(Element elem)
                                                    throws SAML2Exception
        Returns a new instance of EncryptedAssertion. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of EncryptedAssertion
        Returns:
        a new instance of EncryptedAssertion
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createEncryptedAssertion

        public EncryptedAssertion createEncryptedAssertion​(String xml)
                                                    throws SAML2Exception
        Returns a new instance of EncryptedAssertion. The return object is immutable.
        Parameters:
        xml - a XML string representation of EncryptedAssertion
        Returns:
        a new instance of EncryptedAssertion
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createEncryptedID

        public EncryptedID createEncryptedID​(Element elem)
                                      throws SAML2Exception
        Returns a new instance of EncryptedID. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of EncryptedID
        Returns:
        a new instance of EncryptedID
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createEncryptedID

        public EncryptedID createEncryptedID​(String xml)
                                      throws SAML2Exception
        Returns a new instance of EncryptedID. The return object is immutable.
        Parameters:
        xml - a XML string representation of EncryptedID
        Returns:
        a new instance of EncryptedID
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createIssuer

        public Issuer createIssuer()
        Returns a new instance of Issuer.
        Returns:
        a new instance of Issuer
      • createIssuer

        public Issuer createIssuer​(Element elem)
                            throws SAML2Exception
        Returns a new instance of Issuer. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of Issuer
        Returns:
        a new instance of Issuer
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createIssuer

        public Issuer createIssuer​(String xml)
                            throws SAML2Exception
        Returns a new instance of Issuer. The return object is immutable.
        Parameters:
        xml - a XML string representation of Issuer
        Returns:
        a new instance of Issuer
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createKeyInfoConfirmationData

        public KeyInfoConfirmationData createKeyInfoConfirmationData()
        Returns a new instance of KeyInfoConfirmationData.
        Returns:
        a new instance of KeyInfoConfirmationData
      • createKeyInfoConfirmationData

        public KeyInfoConfirmationData createKeyInfoConfirmationData​(Element elem)
                                                              throws SAML2Exception
        Returns a new instance of KeyInfoConfirmationData. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of KeyInfoConfirmationData
        Returns:
        a new instance of KeyInfoConfirmationData
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createKeyInfoConfirmationData

        public KeyInfoConfirmationData createKeyInfoConfirmationData​(String xml)
                                                              throws SAML2Exception
        Returns a new instance of KeyInfoConfirmationData. The return object is immutable.
        Parameters:
        xml - a XML string representation of KeyInfoConfirmationData
        Returns:
        a new instance of KeyInfoConfirmationData
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createNameID

        public NameID createNameID()
        Returns a new instance of NameID.
        Returns:
        a new instance of NameID
      • createNameID

        public NameID createNameID​(Element elem)
                            throws SAML2Exception
        Returns a new instance of NameID. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of NameID
        Returns:
        a new instance of NameID
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createNameID

        public NameID createNameID​(String xml)
                            throws SAML2Exception
        Returns a new instance of NameID. The return object is immutable.
        Parameters:
        xml - a XML string representation of NameID
        Returns:
        a new instance of NameID
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createOneTimeUse

        public OneTimeUse createOneTimeUse()
        Returns a new instance of OneTimeUse.
        Returns:
        a new instance of OneTimeUse
      • createOneTimeUse

        public OneTimeUse createOneTimeUse​(Element elem)
                                    throws SAML2Exception
        Returns a new instance of OneTimeUse. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of OneTimeUse
        Returns:
        a new instance of OneTimeUse
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createOneTimeUse

        public OneTimeUse createOneTimeUse​(String xml)
                                    throws SAML2Exception
        Returns a new instance of OneTimeUse. The return object is immutable.
        Parameters:
        xml - a XML string representation of OneTimeUse
        Returns:
        a new instance of OneTimeUse
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createProxyRestriction

        public ProxyRestriction createProxyRestriction()
        Returns a new instance of ProxyRestriction.
        Returns:
        a new instance of ProxyRestriction
      • createProxyRestriction

        public ProxyRestriction createProxyRestriction​(Element elem)
                                                throws SAML2Exception
        Returns a new instance of ProxyRestriction. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of ProxyRestriction
        Returns:
        a new instance of ProxyRestriction
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createProxyRestriction

        public ProxyRestriction createProxyRestriction​(String xml)
                                                throws SAML2Exception
        Returns a new instance of ProxyRestriction. The return object is immutable.
        Parameters:
        xml - a XML string representation of ProxyRestriction
        Returns:
        a new instance of ProxyRestriction
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createSubject

        public Subject createSubject()
        Returns a new instance of Subject.
        Returns:
        a new instance of Subject
      • createSubject

        public Subject createSubject​(Element elem)
                              throws SAML2Exception
        Returns a new instance of Subject. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of Subject
        Returns:
        a new instance of Subject
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createSubject

        public Subject createSubject​(String xml)
                              throws SAML2Exception
        Returns a new instance of Subject. The return object is immutable.
        Parameters:
        xml - a XML string representation of Subject
        Returns:
        a new instance of Subject
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createSubjectConfirmation

        public SubjectConfirmation createSubjectConfirmation()
        Returns a new instance of SubjectConfirmation.
        Returns:
        a new instance of SubjectConfirmation
      • createSubjectConfirmation

        public SubjectConfirmation createSubjectConfirmation​(Element elem)
                                                      throws SAML2Exception
        Returns a new instance of SubjectConfirmation. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of SubjectConfirmation
        Returns:
        a new instance of SubjectConfirmation
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createSubjectConfirmation

        public SubjectConfirmation createSubjectConfirmation​(String xml)
                                                      throws SAML2Exception
        Returns a new instance of SubjectConfirmation. The return object is immutable.
        Parameters:
        xml - a XML string representation of SubjectConfirmation
        Returns:
        a new instance of SubjectConfirmation
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createSubjectConfirmationData

        public SubjectConfirmationData createSubjectConfirmationData()
        Returns a new instance of SubjectConfirmationData.
        Returns:
        a new instance of SubjectConfirmationData
      • createSubjectConfirmationData

        public SubjectConfirmationData createSubjectConfirmationData​(Element elem)
                                                              throws SAML2Exception
        Returns a new instance of SubjectConfirmationData. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of SubjectConfirmationData
        Returns:
        a new instance of SubjectConfirmationData
        Throws:
        SAML2Exception - if error occurs while processing the DOM Element
      • createSubjectConfirmationData

        public SubjectConfirmationData createSubjectConfirmationData​(String xml)
                                                              throws SAML2Exception
        Returns a new instance of SubjectConfirmationData. The return object is immutable.
        Parameters:
        xml - a XML string representation of SubjectConfirmationData
        Returns:
        a new instance of SubjectConfirmationData
        Throws:
        SAML2Exception - if error occurs while processing the XML string
      • createAction

        public Action createAction()
        Returns a new instance of Action. Caller may need to call setters of the class to populate the object.
        Returns:
        a new instance of Action.
      • createAction

        public Action createAction​(Element elem)
                            throws SAML2Exception
        Returns a new instance of Action. The return object is immutable.
        Parameters:
        elem - an Element representing Action.
        Returns:
        a new instance of Action.
        Throws:
        SAML2Exception - if error occurs while processing the Element.
      • createAction

        public Action createAction​(String xml)
                            throws SAML2Exception
        Returns a new instance of Action. The return object is immutable.
        Parameters:
        xml - an XML String representing Action.
        Returns:
        a new instance of Action.
        Throws:
        SAML2Exception - if error occurs while processing the XML string.
      • createAttribute

        public Attribute createAttribute()
        Returns a new instance of Attribute. Caller may need to call setters of the class to populate the object.
        Returns:
        a new instance of Attribute.
      • createAttribute

        public Attribute createAttribute​(Element elem)
                                  throws SAML2Exception
        Returns a new instance of Attribute. The return object is immutable.
        Parameters:
        elem - an Element representation of Attribute.
        Returns:
        a new instance of Attribute.
        Throws:
        SAML2Exception - if error occurs while processing the Element.
      • createAttribute

        public Attribute createAttribute​(String xml)
                                  throws SAML2Exception
        Returns a new instance of Attribute. The return object is immutable.
        Parameters:
        xml - an XML String representing Attribute.
        Returns:
        a new instance of Attribute.
        Throws:
        SAML2Exception - if error occurs while processing the XML string.
      • createAttributeStatement

        public AttributeStatement createAttributeStatement()
        Returns a new instance of AttributeStatement. Caller may need to call setters of the class to populate the object.
        Returns:
        a new instance of AttributeStatement.
      • createAttributeStatement

        public AttributeStatement createAttributeStatement​(Element elem)
                                                    throws SAML2Exception
        Returns a new instance of AttributeStatement. The return object is immutable.
        Parameters:
        elem - an Element representation of AttributeStatement.
        Returns:
        a new instance of AttributeStatement.
        Throws:
        SAML2Exception - if error occurs while processing the Element.
      • createAttributeStatement

        public AttributeStatement createAttributeStatement​(String xml)
                                                    throws SAML2Exception
        Returns a new instance of AttributeStatement. The return object is immutable.
        Parameters:
        xml - an XML String representing AttributeStatement.
        Returns:
        a new instance of AttributeStatement.
        Throws:
        SAML2Exception - if error occurs while processing the XML string.
      • createAuthnContext

        public AuthnContext createAuthnContext()
        Returns a new instance of AuthnContext. Caller may need to call setters of the class to populate the object.
        Returns:
        a new instance of AuthnContext.
      • createAuthnContext

        public AuthnContext createAuthnContext​(Element elem)
                                        throws SAML2Exception
        Returns a new instance of AuthnContext. The return object is immutable.
        Parameters:
        elem - an Element representation of AuthnContext.
        Returns:
        a new instance of AuthnContext.
        Throws:
        SAML2Exception - if error occurs while processing the Element.
      • createAuthnContext

        public AuthnContext createAuthnContext​(String xml)
                                        throws SAML2Exception
        Returns a new instance of AuthnContext. The return object is immutable.
        Parameters:
        xml - an XML String representing AuthnContext.
        Returns:
        a new instance of AuthnContext.
        Throws:
        SAML2Exception - if error occurs while processing the XML string.
      • createAuthnStatement

        public AuthnStatement createAuthnStatement()
        Returns a new instance of AuthnStatement. Caller may need to call setters of the class to populate the object.
        Returns:
        a new instance of AuthnStatement.
      • createAuthnStatement

        public AuthnStatement createAuthnStatement​(Element elem)
                                            throws SAML2Exception
        Returns a new instance of AuthnStatement. The return object is immutable.
        Parameters:
        elem - an Element representation of AuthnStatement.
        Returns:
        a new instance of AuthnStatement.
        Throws:
        SAML2Exception - if error occurs while processing the Element.
      • createAuthnStatement

        public AuthnStatement createAuthnStatement​(String xml)
                                            throws SAML2Exception
        Returns a new instance of AuthnStatement. The return object is immutable.
        Parameters:
        xml - an XML String representing AuthnStatement.
        Returns:
        a new instance of AuthnStatement.
        Throws:
        SAML2Exception - if error occurs while processing the XML string.
      • createAuthzDecisionStatement

        public AuthzDecisionStatement createAuthzDecisionStatement()
        Returns a new instance of AuthzDecisionStatement. Caller may need to call setters of the class to populate the object.
        Returns:
        a new instance of AuthzDecisionStatement.
      • createAuthzDecisionStatement

        public AuthzDecisionStatement createAuthzDecisionStatement​(Element elem)
                                                            throws SAML2Exception
        Returns a new instance of AuthzDecisionStatement. The return object is immutable.
        Parameters:
        elem - an Element representation of AuthzDecisionStatement.
        Returns:
        a new instance of AuthzDecisionStatement.
        Throws:
        SAML2Exception - if error occurs while processing the Element.
      • createAuthzDecisionStatement

        public AuthzDecisionStatement createAuthzDecisionStatement​(String xml)
                                                            throws SAML2Exception
        Returns a new instance of AuthzDecisionStatement. The return object is immutable.
        Parameters:
        xml - an XML String representing AuthzDecisionStatement.
        Returns:
        a new instance of AuthzDecisionStatement.
        Throws:
        SAML2Exception - if error occurs while processing the XML string.
      • createEncryptedAttribute

        public EncryptedAttribute createEncryptedAttribute​(Element elem)
                                                    throws SAML2Exception
        Returns a new instance of EncryptedAttribute. The return object is immutable.
        Parameters:
        elem - an Element representation of EncryptedAttribute.
        Returns:
        a new instance of EncryptedAttribute.
        Throws:
        SAML2Exception - if error occurs while processing the Element.
      • createEncryptedAttribute

        public EncryptedAttribute createEncryptedAttribute​(String xml)
                                                    throws SAML2Exception
        Returns a new instance of EncryptedAttribute. The return object is immutable.
        Parameters:
        xml - an XML String representing EncryptedAttribute. .
        Returns:
        a new instance of EncryptedAttribute.
        Throws:
        SAML2Exception - if error occurs while processing the XML string.
      • createEvidence

        public Evidence createEvidence()
        Returns a new instance of Evidence. Caller may need to call setters of the class to populate the object.
        Returns:
        a new instance of Evidence.
      • createEvidence

        public Evidence createEvidence​(Element elem)
                                throws SAML2Exception
        Returns a new instance of Evidence. The return object is immutable.
        Parameters:
        elem - a Element representation of Evidence.
        Returns:
        a new instance of Evidence.
        Throws:
        SAML2Exception - if error occurs while processing the Element.
      • createEvidence

        public Evidence createEvidence​(String xml)
                                throws SAML2Exception
        Returns a new instance of Evidence. The return object is immutable.
        Parameters:
        xml - an XML String representing Evidence.
        Returns:
        a new instance of Evidence.
        Throws:
        SAML2Exception - if error occurs while processing the XML string.
      • createSubjectLocality

        public SubjectLocality createSubjectLocality()
        Returns a new instance of SubjectLocality. Caller may need to call setters of the class to populate the object.
        Returns:
        a new instance of SubjectLocality.
      • createSubjectLocality

        public SubjectLocality createSubjectLocality​(Element elem)
                                              throws SAML2Exception
        Returns a new instance of SubjectLocality. The return object is immutable.
        Parameters:
        elem - an Element representing SubjectLocality.
        Returns:
        a new instance of SubjectLocality.
        Throws:
        SAML2Exception - if error occurs while processing the Element.
      • createSubjectLocality

        public SubjectLocality createSubjectLocality​(String xml)
                                              throws SAML2Exception
        Returns a new instance of SubjectLocality. The return object is immutable.
        Parameters:
        xml - an XML String representing SubjectLocality.
        Returns:
        a new instance of SubjectLocality.
        Throws:
        SAML2Exception - if error occurs while processing the XML string.