Class SessionContextStatement


  • public class SessionContextStatement
    extends SubjectStatement
    The SessionContextStatement element conveys session status of an entity to another system entity within the body of an <saml:assertion> element.
    • Field Detail

      • SESSIONCONTEXT_STATEMENT

        public static final int SESSIONCONTEXT_STATEMENT
        The Statement is an Session Context Statement.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SessionContextStatement

        public SessionContextStatement​(SessionContext sessionContext,
                                       Subject subject)
                                throws SAMLException
        Constructs a SessionContextStatement object from a SessionContext object and a Subject object.
        Parameters:
        sessionContext - SessionContext object.
        subject - Subject object.
        Throws:
        SAMLException - if sessionContext is null or subject is null.
      • SessionContextStatement

        public SessionContextStatement​(SessionContext sessionContext,
                                       ProxySubject proxySubject,
                                       Subject subject)
                                throws SAMLException
        Constructs a SessionContextStatement object from a SessionContext object, a proxySubject and a Subject object.
        Parameters:
        sessionContext - SessionContext object.
        proxySubject - ProxySubject object.
        subject - Subject object.
        Throws:
        SAMLException - if sessionContext is null or subject is null.
      • SessionContextStatement

        public SessionContextStatement​(Element element)
                                throws SAMLException
        Constructs a SessionContextStatement object from a DOM element.
        Parameters:
        element - the Document Element
        Throws:
        SAMLException - if there is an error in the sender or in the element definition.
    • Method Detail

      • getProxySubject

        public ProxySubject getProxySubject()
        Return the ProxySubject in the SessionContextStatement.
        Returns:
        ProxySubject.
      • getSessionContext

        public SessionContext getSessionContext()
        Returns the SessionContext in the SessionContextStatement.
        Returns:
        SessionContext
      • setProxySubject

        public boolean setProxySubject​(ProxySubject proxySubject)
        Sets the ProxySubject for SessionContextStatement.
        Parameters:
        proxySubject - the object to be set.
        Returns:
        true if the operation is successful.
      • getStatementType

        public int getStatementType()
        Returns the real type of the Statement.
        Specified by:
        getStatementType in class Statement
        Returns:
        An integer which represents SessionContextStatement internally.
      • toString

        public String toString()
        Returns a String representation of SessionContextStatement.
        Overrides:
        toString in class Object
        Returns:
        String representation of the SessionContextStatement. object.
      • toString

        public String toString​(boolean includeNS,
                               boolean declareNS)
        Returns a String representation of the ResourceAccessStatement.
        Specified by:
        toString in class SubjectStatement
        Parameters:
        includeNS - 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:
        String representation of the <saml:ResourceAccessStatement> element.