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 Propertiesprotected org.springframework.core.io.Resourceprotected SiteContextManager -
Constructor Summary
ConstructorsConstructorDescriptionReloadableMappingsSiteResolver(org.springframework.core.io.Resource mappingsFile, SiteContextManager siteContextManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidReturns the entire list of sites.getSiteName(jakarta.servlet.http.HttpServletRequest request) protected voidvoid
-
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:
afterPropertiesSetin 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:SiteListResolverReturns the entire list of sites.- Specified by:
getSiteListin interfaceSiteListResolver
-
getSiteName
- Specified by:
getSiteNamein interfaceSiteResolver
-
loadMappings
protected void loadMappings() throws org.craftercms.core.exception.CrafterException- Throws:
org.craftercms.core.exception.CrafterException
-