public class LocaleTargetIdManager extends AbstractTargetIdManager
TargetIdManager
that treats the Locale
as a
target ID. The current target ID is one returned by LocaleContextHolder.getLocale()
, and if no available
target IDs are specified in the site configuration, the available locales of the JVM will be used instead. The locales
are always converted lower case.Constructor and Description |
---|
LocaleTargetIdManager() |
Modifier and Type | Method and Description |
---|---|
List<String> |
getAvailableTargetIds()
Returns the available target IDs defined in the current site configuration.
|
String |
getCurrentTargetId()
Returns the target ID for the current request, or null or empty if there's no target ID.
|
getFallbackTargetId
public String getCurrentTargetId() throws IllegalStateException
TargetIdManager
IllegalStateException
public List<String> getAvailableTargetIds()
AbstractTargetIdManager
IllegalStateException
is thrown.getAvailableTargetIds
in interface TargetIdManager
getAvailableTargetIds
in class AbstractTargetIdManager
Copyright © 2020 CrafterCMS. All rights reserved.