public class DefaultInStoreSiteSelectorStrategy extends java.lang.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(java.util.Collection<BaseSiteModel> allSites)
Chooses the one site by matching its
BaseSiteModel.UID prefix with the injected siteUidPrefix. |
protected java.lang.String |
getSiteUidPrefix() |
void |
setSiteUidPrefix(java.lang.String siteUidPrefix)
Allows to set a prefix string that is used to choose the default site.
|
public BaseSiteModel getDefaultSite(java.util.Collection<BaseSiteModel> allSites) throws java.lang.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.java.lang.IllegalArgumentException - if argument allSites is null or empty.protected java.lang.String getSiteUidPrefix()
public void setSiteUidPrefix(java.lang.String siteUidPrefix)
getDefaultSite(Collection)Copyright © 2018 SAP SE. All Rights Reserved.