@FunctionalInterface public interface HstSiteProvider
Modifier and Type | Method and Description |
---|---|
HstSite |
getHstSite(HstSite master,
Map<String,HstSite> branches,
HstRequestContext requestContext)
An
HstSiteProvider can choose based on some heuristic to return a specific HstSite branch
or to return the master. |
HstSite getHstSite(HstSite master, Map<String,HstSite> branches, HstRequestContext requestContext)
An HstSiteProvider
can choose based on some heuristic to return a specific HstSite
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 the HstSite
belonging to the matched
Mount
for the current HstRequestContext
. If you provide
a custom HstSiteProvider
it might thus happen that your implemented
getHstSite(HstSite, Map, HstRequestContext)
does not get invoked, which is most
likely caused by there being no branches available.
master
- the master HstSite
branches
- unmutable map of {link HstSite}s which are the branches (master not included!) and empty map if no
branches for master
present. They keys in the map are the branch idsrequestContext
- HstSite
to use for rendering, not allowed to be null
Copyright © 2008–2020 Hippo B.V. (http://www.onehippo.com). All rights reserved.