Package org.hippoecm.hst.container.site
Interface HstSiteProvider
-
- 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 HstSiteProvider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HstSite
getHstSite(HstSite master, Map<String,HstSite> branches, HstRequestContext requestContext)
AnHstSiteProvider
can choose based on some heuristic to return a specificHstSite
branch or to return the master.
-
-
-
Method Detail
-
getHstSite
HstSite getHstSite(HstSite master, Map<String,HstSite> branches, HstRequestContext requestContext)
An
HstSiteProvider
can choose based on some heuristic to return a specificHstSite
branch or to return the master.Note that this method
getHstSite(HstSite, Map, HstRequestContext)
only gets invoked when there is at least one branch for theHstSite
belonging to the matchedMount
for the currentHstRequestContext
. If you provide a customHstSiteProvider
it might thus happen that your implementedgetHstSite(HstSite, Map, HstRequestContext)
does not get invoked, which is most likely caused by there being no branches available.- Parameters:
master
- the masterHstSite
branches
- unmutable map of {link HstSite}s which are the branches (master not included!) and empty map if no branches formaster
present. They keys in the map are the branch idsrequestContext
-- Returns:
- the
HstSite
to use for rendering, not allowed to benull
-
-