public class ReloadableMappingsSiteResolver extends Object implements SiteListResolver, SiteResolver
SiteResolver that resolves the current site name from a mapping
of the request domain name to site name. These mappings are dynamic in that anytime while Engine is running they
can change (ones can be added and others removed). The reloadMappings() method then can be called to
reload the mappings.| Modifier and Type | Field and Description |
|---|---|
protected Properties |
mappings |
protected org.springframework.core.io.Resource |
mappingsFile |
protected SiteContextManager |
siteContextManager |
| Constructor and Description |
|---|
ReloadableMappingsSiteResolver() |
| Modifier and Type | Method and Description |
|---|---|
Collection<String> |
getSiteList()
Returns the entire list of sites.
|
String |
getSiteName(javax.servlet.http.HttpServletRequest request) |
void |
init() |
protected void |
loadMappings() |
void |
reloadMappings() |
void |
setMappingsFile(org.springframework.core.io.Resource mappingsFile) |
void |
setSiteContextManager(SiteContextManager siteContextManager) |
protected org.springframework.core.io.Resource mappingsFile
protected SiteContextManager siteContextManager
protected volatile Properties mappings
public void setMappingsFile(org.springframework.core.io.Resource mappingsFile)
public void setSiteContextManager(SiteContextManager siteContextManager)
@PostConstruct public void init() throws Exception
Exceptionpublic void reloadMappings()
throws org.craftercms.core.exception.CrafterException
org.craftercms.core.exception.CrafterExceptionpublic Collection<String> getSiteList()
SiteListResolvergetSiteList in interface SiteListResolverpublic String getSiteName(javax.servlet.http.HttpServletRequest request)
getSiteName in interface SiteResolverprotected void loadMappings()
throws org.craftercms.core.exception.CrafterException
org.craftercms.core.exception.CrafterExceptionCopyright © 2020 CrafterCMS. All rights reserved.