Class ProxyTargetIdManager
java.lang.Object
org.craftercms.engine.util.spring.AbstractProxyBean<TargetIdManager>
org.craftercms.engine.targeting.impl.ProxyTargetIdManager
- All Implemented Interfaces:
TargetIdManager
public class ProxyTargetIdManager
extends AbstractProxyBean<TargetIdManager>
implements TargetIdManager
ProxyTargetIdManager that proxies to the manager defined in the site application context, or if not
defined, to the default one in the general application context.- Author:
- avasquez
-
Field Summary
Fields inherited from class org.craftercms.engine.util.spring.AbstractProxyBean
applicationContext, beanName -
Constructor Summary
ConstructorsConstructorDescriptionProxyTargetIdManager(ApplicationContextAccessor applicationContext, String beanName) -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of all available target IDs used by the site.protected Class<? extends TargetIdManager> Returns the target ID for the current request, or null or empty if there's no target ID.Returns the fallback target ID.Methods inherited from class org.craftercms.engine.util.spring.AbstractProxyBean
getBean
-
Constructor Details
-
ProxyTargetIdManager
-
-
Method Details
-
getCurrentTargetId
Description copied from interface:TargetIdManagerReturns the target ID for the current request, or null or empty if there's no target ID.- Specified by:
getCurrentTargetIdin interfaceTargetIdManager- Throws:
IllegalStateException
-
getFallbackTargetId
Description copied from interface:TargetIdManagerReturns the fallback target ID. The fallback target ID is used in case none of the resolved candidate targeted URLs map to existing content. A null or an empty string indicates that the non-targeted version should be the last candidate URL.For example, if the candidate targeted URLs are /site/website/index_es_CR.xml and /site/website/index_es.xml, and the fallback target ID is "en", then /site/website/index_en.xml is added to the list of candidate URLs, but if an empty or null string is the fallback target ID instead, /site/website/index.xml is the last candidate URL.
- Specified by:
getFallbackTargetIdin interfaceTargetIdManager- Throws:
IllegalStateException
-
getAvailableTargetIds
Description copied from interface:TargetIdManagerReturns the list of all available target IDs used by the site.- Specified by:
getAvailableTargetIdsin interfaceTargetIdManager- Throws:
IllegalStateException
-
getBeanClass
- Specified by:
getBeanClassin classAbstractProxyBean<TargetIdManager>
-