public class ContentFilterLanguagesMap extends Object implements ContentFilterLanguagesService
Content Filter Languages Service
MESSAGE_PREFIX
Constructor and Description |
---|
ContentFilterLanguagesMap() |
Modifier and Type | Method and Description |
---|---|
String |
convertToNewISOCode(String code)
Since
java.util.Locale uses and returns old ISO code and the content-filter-lang.xml
respects the new ones. |
String |
convertToOldISOCode(String code)
Since
java.util.Locale uses and returns old ISO code and the content-filter-lang.xml
respects the new ones. |
String |
getDefaultLanguage() |
List<String> |
getFilterLanguages()
Get ordered list of languages code
|
String |
getLabelByCode(String code)
Get the language of the specified language code
|
List<String> |
getMissingLanguages(List<String> availableLanguages)
Get the the odered filter which results form an extract of availableLanguages on the filterLanguages
|
int |
getOrderByCode(String code)
Get the order of the specified language code
|
void |
init()
Initialises the map using the configuration service provided
|
void |
setConfigService(org.springframework.extensions.config.ConfigService configService) |
public void setConfigService(org.springframework.extensions.config.ConfigService configService)
configService
- the config service to use to read languagespublic List<String> getFilterLanguages()
ContentFilterLanguagesService
getFilterLanguages
in interface ContentFilterLanguagesService
public List<String> getMissingLanguages(List<String> availableLanguages)
ContentFilterLanguagesService
getMissingLanguages
in interface ContentFilterLanguagesService
availableLanguages
- the languages list whose will be removed from the filterLanguagespublic String getLabelByCode(String code)
ContentFilterLanguagesService
getLabelByCode
in interface ContentFilterLanguagesService
code
- Stringpublic int getOrderByCode(String code)
ContentFilterLanguagesService
getOrderByCode
in interface ContentFilterLanguagesService
code
- Stringpublic String getDefaultLanguage()
getDefaultLanguage
in interface ContentFilterLanguagesService
public void init()
public String convertToOldISOCode(String code)
ContentFilterLanguagesService
java.util.Locale
uses and returns old ISO code and the content-filter-lang.xml
respects the new ones. This method convert new codes into old codes:
(he, yi, and id) new codes to (iw, ji, and in) old codes
convertToOldISOCode
in interface ContentFilterLanguagesService
code
- the ISO language code to convertpublic String convertToNewISOCode(String code)
ContentFilterLanguagesService
java.util.Locale
uses and returns old ISO code and the content-filter-lang.xml
respects the new ones. This method convert old codes into new codes:
(iw, ji, and in) old codes to (he, yi, and id) new codes
convertToNewISOCode
in interface ContentFilterLanguagesService
code
- the ISO language code to convertCopyright © 2005–2017 Alfresco Software. All rights reserved.