Interface ComponentContextProvider<T>

All Known Implementing Classes:
ComponentContextProvider.EmptyProvider, ListCategoryPosts.CategoriesForSite, StaticPost.PostsForSite
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ComponentContextProvider<T>
A ComponentContextProvider provides the slot options for ComponentParameter parameters.
Author:
João Carvalho (joao.pedro.carvalho@tecnico.ulisboa.pt)
  • Method Details

    • provide

      Iterable<T> provide(Page page)
      Provide the contextual items for the given page.
      Parameters:
      page - The page in which the component will be inserted.
      Returns:
      The options for the given slot.
    • present

      default String present(T item)
      Presents the given item (returned by the provide(Page) method). By default, simply invokes Object.toString().
      Parameters:
      item - The item to present.
      Returns:
      The presentation of the given item.