@Lazy @Component public class WebCmsSiteConfigurationFilter extends AbstractWebCmsDomainContextFilter
AbstractWebCmsDomainContextFilter that checks WebCmsSiteConfiguration metadata.
Every active domain that has WebCmsSiteConfiguration metadata will be taken into account.
The domains will be ordered, and their WebCmsSiteConfiguration.getHostNames() inspected in order.
The first domain to match will be set as the current domain context.
This class can be extended for further customization.AbstractWebCmsDomainContextFilter.DomainContextLookupFILTER_NAME| Constructor and Description |
|---|
WebCmsSiteConfigurationFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected AbstractWebCmsDomainContextFilter.DomainContextLookup |
buildDefaultDomainLookup(List<AbstractWebCmsDomainContextFilter.DomainContextLookup> domainSpecificLookups)
Uses the
WebCmsMultiDomainConfiguration#getDefaultDomainKey() to determine the default domain. |
protected List<AbstractWebCmsDomainContextFilter.DomainContextLookup> |
buildDomainSpecificLookups()
Builds the list of lookups that should be used.
|
protected AbstractWebCmsDomainContextFilter.DomainContextLookup |
createDomainContextLookup(String hostName,
WebCmsDomain domain,
Object metadata)
Create a single
DomainContextLookup for a host name and domain. |
compileHostPattern, doFilterInternaldoFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatchprotected List<AbstractWebCmsDomainContextFilter.DomainContextLookup> buildDomainSpecificLookups()
AbstractWebCmsDomainContextFilterWebCmsSiteConfiguration.
If so, create a lookup for every hostname in the configuration.
The list should not include the default domain lookup.
NOTE: Only called if lookup cache is being refreshed.buildDomainSpecificLookups in class AbstractWebCmsDomainContextFilterprotected AbstractWebCmsDomainContextFilter.DomainContextLookup buildDefaultDomainLookup(List<AbstractWebCmsDomainContextFilter.DomainContextLookup> domainSpecificLookups)
WebCmsMultiDomainConfiguration#getDefaultDomainKey() to determine the default domain.
If specified, that domain and its metadata will be used for the domain context.
The active status of the domain is not taken into account.
If no domain key is specified, then no-domain is used as default domain.buildDefaultDomainLookup in class AbstractWebCmsDomainContextFilterdomainSpecificLookups - list of lookups for actual domainsprotected AbstractWebCmsDomainContextFilter.DomainContextLookup createDomainContextLookup(String hostName, WebCmsDomain domain, Object metadata)
DomainContextLookup for a host name and domain.
Note that either parameter can be null.
If host name is null it usually implies the default (fallback) domain lookup record.
If the metadata is of type WebCmsSiteConfiguration, the Locale to use will be resolved from it.hostName - to match (can be null)domain - to select (can be null)metadata - of the domain (can be nullCopyright © 2020. All rights reserved.