Interface IPageContext

    • Method Detail

      • getSessionAttribute

        <T extends Serializable> T getSessionAttribute​(String key,
                                                       Supplier<T> defaultValue)
        Get an attribute from the session.
        Binds the session if not already set and supplier is not null. Sets the session attribute if supplier is not null.
        Parameters:
        key - key
        defaultValue - default value to use if not present
        Returns:
        value
        See Also:
        Session.getAttribute(String)
      • getSessionData

        <T extends Serializable> T getSessionData​(MetaDataKey<T> key,
                                                  Supplier<T> defaultValue)
        Get metadata from the session.
        Binds the session if not already set and supplier is not null. Sets the session attribute if supplier is not null.
        Parameters:
        key - key
        defaultValue - optional supplier of a default value to use if not present
        Returns:
        value
        See Also:
        Session.getMetaData(MetaDataKey)
      • getSessionId

        String getSessionId​(boolean bind)
        Get the identifier of the session.
        Parameters:
        bind - should the session be bound
        Returns:
        session id, might be null if not bound yet