Class ReloadableMappingsSiteResolver
java.lang.Object
org.craftercms.engine.service.context.ReloadableMappingsSiteResolver
- All Implemented Interfaces:
SiteListResolver
,SiteResolver
,org.springframework.beans.factory.InitializingBean
public class ReloadableMappingsSiteResolver
extends Object
implements SiteListResolver, SiteResolver, org.springframework.beans.factory.InitializingBean
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.- Author:
- avasquez
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Properties
protected org.springframework.core.io.Resource
protected SiteContextManager
-
Constructor Summary
ConstructorsConstructorDescriptionReloadableMappingsSiteResolver
(org.springframework.core.io.Resource mappingsFile, SiteContextManager siteContextManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Returns the entire list of sites.getSiteName
(jakarta.servlet.http.HttpServletRequest request) protected void
void
-
Field Details
-
mappingsFile
protected org.springframework.core.io.Resource mappingsFile -
siteContextManager
-
mappings
-
-
Constructor Details
-
ReloadableMappingsSiteResolver
public ReloadableMappingsSiteResolver(org.springframework.core.io.Resource mappingsFile, SiteContextManager siteContextManager)
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
reloadMappings
public void reloadMappings() throws org.craftercms.core.exception.CrafterException- Throws:
org.craftercms.core.exception.CrafterException
-
getSiteList
Description copied from interface:SiteListResolver
Returns the entire list of sites.- Specified by:
getSiteList
in interfaceSiteListResolver
-
getSiteName
- Specified by:
getSiteName
in interfaceSiteResolver
-
loadMappings
protected void loadMappings() throws org.craftercms.core.exception.CrafterException- Throws:
org.craftercms.core.exception.CrafterException
-