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>
AComponentContextProviderprovides the slot options forComponentParameterparameters.- Author:
- João Carvalho (joao.pedro.carvalho@tecnico.ulisboa.pt)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classComponentContextProvider.EmptyProvider
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Stringpresent(T item)Presents the given item (returned by theprovide(Page)method).Iterable<T>provide(Page page)Provide the contextual items for the given page.
-
-
-
Method Detail
-
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 theprovide(Page)method). By default, simply invokesObject.toString().- Parameters:
item- The item to present.- Returns:
- The presentation of the given item.
-
-