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.applicationContext, beanName
Constructor and Description |
---|
ProxyTargetIdManager() |
Modifier and Type | Method and Description |
---|---|
List<String> |
getAvailableTargetIds()
Returns the list of all available target IDs used by the site.
|
protected Class<? extends TargetIdManager> |
getBeanClass() |
String |
getCurrentTargetId()
Returns the target ID for the current request, or null or empty if there's no target ID.
|
String |
getFallbackTargetId()
Returns the fallback target ID.
|
getBean, setApplicationContext, setBeanName
public String getCurrentTargetId() throws IllegalStateException
TargetIdManager
getCurrentTargetId
in interface TargetIdManager
IllegalStateException
public String getFallbackTargetId() throws IllegalStateException
TargetIdManager
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.
getFallbackTargetId
in interface TargetIdManager
IllegalStateException
public List<String> getAvailableTargetIds() throws IllegalStateException
TargetIdManager
getAvailableTargetIds
in interface TargetIdManager
IllegalStateException
protected Class<? extends TargetIdManager> getBeanClass()
getBeanClass
in class AbstractProxyBean<TargetIdManager>
Copyright © 2020 CrafterCMS. All rights reserved.