Package org.alfresco.service.cmr.ml
Interface ContentFilterLanguagesService
-
- All Known Implementing Classes:
ContentFilterLanguagesMap
public interface ContentFilterLanguagesServiceThis service interface provides support for content filter languages .- Author:
- Yannick Pignot
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMESSAGE_PREFIXI18N message prefix to found the translation of a language label with a given lang code.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringconvertToNewISOCode(java.lang.String code)Sincejava.util.Localeuses and returns old ISO code and the content-filter-lang.xml respects the new ones.java.lang.StringconvertToOldISOCode(java.lang.String code)Sincejava.util.Localeuses and returns old ISO code and the content-filter-lang.xml respects the new ones.java.lang.StringgetDefaultLanguage()java.util.List<java.lang.String>getFilterLanguages()Get ordered list of languages codejava.lang.StringgetLabelByCode(java.lang.String code)Get the language of the specified language codejava.util.List<java.lang.String>getMissingLanguages(java.util.List<java.lang.String> availableLanguages)Get the the odered filter which results form an extract of availableLanguages on the filterLanguagesintgetOrderByCode(java.lang.String code)Get the order of the specified language code
-
-
-
Field Detail
-
MESSAGE_PREFIX
static final java.lang.String MESSAGE_PREFIX
I18N message prefix to found the translation of a language label with a given lang code.- See Also:
- Constant Field Values
-
-
Method Detail
-
getOrderByCode
@NotAuditable int getOrderByCode(java.lang.String code)
Get the order of the specified language code- Parameters:
code- String- Returns:
- int
- Throws:
org.alfresco.error.AlfrescoRuntimeException- if the code doesn't exist
-
getLabelByCode
@NotAuditable java.lang.String getLabelByCode(java.lang.String code)
Get the language of the specified language code- Parameters:
code- String- Returns:
- String
- Throws:
org.alfresco.error.AlfrescoRuntimeException- if the code doesn't exist
-
getFilterLanguages
@Auditable java.util.List<java.lang.String> getFilterLanguages()
Get ordered list of languages code- Returns:
- the map of displays indexed by extension
-
getMissingLanguages
@Auditable java.util.List<java.lang.String> getMissingLanguages(java.util.List<java.lang.String> availableLanguages)
Get the the odered filter which results form an extract of availableLanguages on the filterLanguages- Parameters:
availableLanguages- the languages list whose will be removed from the filterLanguages
-
getDefaultLanguage
@Auditable java.lang.String getDefaultLanguage()
- Returns:
- the default content filter language, null if it's not set.
-
convertToOldISOCode
@NotAuditable java.lang.String convertToOldISOCode(java.lang.String code)
Sincejava.util.Localeuses 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
- Parameters:
code- the ISO language code to convert- Returns:
- the convertion of the codes he, yi, and id or the given code
-
convertToNewISOCode
@NotAuditable java.lang.String convertToNewISOCode(java.lang.String code)
Sincejava.util.Localeuses 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
- Parameters:
code- the ISO language code to convert- Returns:
- the convertion of the codes iw, ji, and in or the given code
-
-