public class DefaultInStoreSiteSelectorStrategy extends Object implements InStoreSiteSelectorStrategy
InStoreSiteSelectorStrategy which returns the first site with uid starting
with configured siteUidPrefix. If none of the sites uid match the prefix, the first site is
returned.| Constructor and Description |
|---|
DefaultInStoreSiteSelectorStrategy() |
| Modifier and Type | Method and Description |
|---|---|
BaseSiteModel |
getDefaultSite(Collection<BaseSiteModel> allSites)
Chooses the one site by matching its
BaseSiteModel.UID prefix with the injected siteUidPrefix. |
protected String |
getSiteUidPrefix() |
void |
setSiteUidPrefix(String siteUidPrefix)
Allows to set a prefix string that is used to choose the default site.
|
public BaseSiteModel getDefaultSite(Collection<BaseSiteModel> allSites) throws IllegalArgumentException
BaseSiteModel.UID prefix with the injected siteUidPrefix.getDefaultSite in interface InStoreSiteSelectorStrategyallSites - A collection of sites from which the default one should be selected. Must not be empty.IllegalArgumentException - if argument allSites is null or empty.protected String getSiteUidPrefix()
public void setSiteUidPrefix(String siteUidPrefix)
getDefaultSite(Collection)Copyright © 2017 SAP SE. All Rights Reserved.