Interface IPageContext

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> T getRequestData​(MetaDataKey<T> key, java.util.function.Supplier<T> defaultValue)
      Get data from the current request cycle.
      <T extends java.io.Serializable>
      T
      getSessionAttribute​(java.lang.String key, java.util.function.Supplier<T> defaultValue)
      Get an attribute from the session.
      <T extends java.io.Serializable>
      T
      getSessionData​(MetaDataKey<T> key, java.util.function.Supplier<T> defaultValue)
      Get metadata from the session.
      java.lang.String getSessionId​(boolean bind)
      Get the identifier of the session.
    • Method Detail

      • getRequestData

        <T> T getRequestData​(MetaDataKey<T> key,
                             java.util.function.Supplier<T> defaultValue)
        Get data from the current request cycle.
        Parameters:
        key - key
        defaultValue - default value to use if not present
        See Also:
        RequestCycle.getMetaData(MetaDataKey)
      • getSessionAttribute

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

        <T extends java.io.Serializable> T getSessionData​(MetaDataKey<T> key,
                                                          java.util.function.Supplier<T> defaultValue)
        Get metadata from the session.
        Binds the session if not already set and supplied default value is not null.
        Parameters:
        key - key
        defaultValue - default value to use if not present
        Returns:
        value
        See Also:
        Session.getMetaData(MetaDataKey)
      • getSessionId

        java.lang.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