Class LanguageConstantsCallable
- java.lang.Object
- 
- de.uplanet.lucy.server.i18n.scripting.velocity.LanguageConstantsCallable
 
- 
- All Implemented Interfaces:
- de.uplanet.lucy.server.scripting.velocity.ICallableWithVelocityContext
 
 @VelocityVariable("I18N") @VelocityCallable("instance") public final class LanguageConstantsCallable extends Object implements de.uplanet.lucy.server.scripting.velocity.ICallableWithVelocityContext
- 
- 
Constructor SummaryConstructors Constructor Description LanguageConstantsCallable(de.uplanet.lucy.server.i18n.ILanguageConstantsProvider p_provider, org.apache.velocity.context.Context p_vc, String p_strLang, String p_strDefaultLang)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description LanguageConstantsCallablecloneWithNewContext(org.apache.velocity.context.Context p_velocityContext)Create a copy of the callable with a new Velocity context.Stringget(String p_strKey)Get a localized string in the context language given its key.Stringget(String p_strKey, String p_strFallbackValue)Get a localized string in the context language given its key.StringgetByApp(String p_strAppGuid, String p_strKey)Get a localized string in the context language given its key.StringgetByApp(String p_strAppGuid, String p_strKey, String p_strFallbackValue)Get a localized string in the context language given its key.StringgetByAppByLang(String p_strAppGuid, String p_strLang, String p_strKey)Get a localized string in the given language for the given key.StringgetByAppByLang(String p_strAppGuid, String p_strLang, String p_strKey, String p_strFallbackValue)Get a localized string in the given language for the given key.StringgetByLang(String p_strLang, String p_strKey)Get a localized string in the given language for the given key.StringgetByLang(String p_strLang, String p_strKey, String p_strFallbackValue)Get a localized string in the given language for the given key.
 
- 
- 
- 
Method Detail- 
cloneWithNewContextpublic LanguageConstantsCallable cloneWithNewContext(org.apache.velocity.context.Context p_velocityContext) Create a copy of the callable with a new Velocity context.- Specified by:
- cloneWithNewContextin interface- de.uplanet.lucy.server.scripting.velocity.ICallableWithVelocityContext
- Parameters:
- p_velocityContext- The new Velocity context.
 
 - 
getpublic String get(String p_strKey) Get a localized string in the context language given its key.If there is no value for the given key in the context language, the default language of the portal is used as a fallback. If no fallback is available nullwill be returned.- Parameters:
- p_strKey- The key.
- Returns:
- The localized string.
 
 - 
getpublic String get(String p_strKey, String p_strFallbackValue) Get a localized string in the context language given its key.If there is no value for the given key in the context language, the default language of the portal is used as a fallback. If no fallback is available then the given fallback will be returned. - Parameters:
- p_strKey- The key.
- p_strFallbackValue- A fallback value that is returned if no value could be found for the given key.
- Returns:
- The localized string.
 
 - 
getByLangpublic String getByLang(String p_strLang, String p_strKey) Get a localized string in the given language for the given key.If there is no value for the given key in the given language, the default language of the portal is used as a fallback. If no fallback is available nullwill be returned.- Parameters:
- p_strLang- The language.
- p_strKey- The key.
- Returns:
- The localized string.
 
 - 
getByLangpublic String getByLang(String p_strLang, String p_strKey, String p_strFallbackValue) Get a localized string in the given language for the given key.If there is no value for the given key in the given language, the default language of the portal is used as a fallback. If no fallback is available then the given fallback will be returned. - Parameters:
- p_strLang- The language.
- p_strKey- The key.
- p_strFallbackValue- A fallback value that is returned if no value could be found for the given key.
- Returns:
- The localized string.
 
 - 
getByApppublic String getByApp(String p_strAppGuid, String p_strKey) Get a localized string in the context language given its key.If there is no value for the given key in the context language, the default language of the portal is used as a fallback. If no fallback is available nullwill be returned.- Parameters:
- p_strAppGuid- The GUID of the application the key belongs to.
- p_strKey- The key.
- Returns:
- The localized string.
 
 - 
getByApppublic String getByApp(String p_strAppGuid, String p_strKey, String p_strFallbackValue) Get a localized string in the context language given its key.If there is no value for the given key in the context language, the default language of the portal is used as a fallback. If no fallback is available then the given fallback will be returned. - Parameters:
- p_strAppGuid- The GUID of the application the key belongs to.
- p_strKey- The key.
- p_strFallbackValue- A fallback value that is returned if no value could be found for the given key.
- Returns:
- The localized string.
 
 - 
getByAppByLangpublic String getByAppByLang(String p_strAppGuid, String p_strLang, String p_strKey) Get a localized string in the given language for the given key.If there is no value for the given key in the given language, the default language of the portal is used as a fallback. If no fallback is available nullwill be returned.- Parameters:
- p_strAppGuid- The GUID of the application the key belongs to.
- p_strLang- The language.
- p_strKey- The key.
- Returns:
- The localized string.
 
 - 
getByAppByLangpublic String getByAppByLang(String p_strAppGuid, String p_strLang, String p_strKey, String p_strFallbackValue) Get a localized string in the given language for the given key.If there is no value for the given key in the given language, the default language of the portal is used as a fallback. If no fallback is available then the given fallback will be returned. - Parameters:
- p_strAppGuid- The GUID of the application the key belongs to.
- p_strLang- The language.
- p_strKey- The key.
- p_strFallbackValue- A fallback value that is returned if no value could be found for the given key.
- Returns:
- The localized string.
 
 
- 
 
-