|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.portal.localization.LocalizationManager
public class LocalizationManager
Class responsible for localizing strings, using static resources from xml files and dynamic resources (custom strings) from database. Each string resource is cached upon first access.
Field Summary |
---|
Fields inherited from interface lumis.portal.localization.ILocalizationManager |
---|
DO_NOT_RENDER_PARAMETERS |
Constructor Summary | |
---|---|
LocalizationManager()
|
Method Summary | |
---|---|
String |
addCustomString(SessionConfig sessionConfig,
CustomStringConfig customStringConfig,
ITransaction transaction)
Add a Custom String |
void |
clearCache()
Clear the localization cache. |
void |
clearCache(String resourcePath)
Clear the localization cache by passing the resource path. |
void |
clearCache(String resourcePath,
Locale locale)
Clear the localization cache by passing the resource path and the locale. |
void |
deleteCustomString(SessionConfig sessionConfig,
String customStringId,
ITransaction transaction)
Delete a specified Custom String |
Iterable<String> |
getCachedResourcePaths()
Get the keys for all cached items |
CustomStringConfig |
getCustomString(SessionConfig sessionConfig,
String customStringId,
ITransaction transaction)
Get the Custom String object |
Collection<LocaleConfig> |
getLocales(ITransaction transaction)
Returns a collection of locale config |
String |
localize(String id,
IResource resource)
Localizes the given string id using the given resource. |
String |
localize(String id,
IResource resource,
Locale locale)
|
String |
localize(String id,
List<IResource> resources)
Localizes the given string id using the given list of resources. |
String |
localize(String id,
List<IResource> resources,
Locale locale)
|
void |
updateCustomString(SessionConfig sessionConfig,
CustomStringConfig customStringConfig,
ITransaction transaction)
Update a specified Custom String |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalizationManager()
Method Detail |
---|
public Collection<LocaleConfig> getLocales(ITransaction transaction) throws PortalException
getLocales
in interface ILocalizationManager
transaction
- the transaction for persistence access.
PortalException
public String localize(String id, IResource resource) throws ManagerException, PortalException
ILocalizationManager
localize
in interface ILocalizationManager
ManagerException
PortalException
public String localize(String id, List<IResource> resources) throws ManagerException, PortalException
ILocalizationManager
localize
in interface ILocalizationManager
ManagerException
PortalException
public String localize(String id, IResource resource, Locale locale) throws ManagerException, PortalException
localize
in interface ILocalizationManager
ManagerException
PortalException
public String localize(String id, List<IResource> resources, Locale locale) throws ManagerException, PortalException
localize
in interface ILocalizationManager
ManagerException
PortalException
public void clearCache() throws ManagerException, PortalException
ILocalizationManager
clearCache
in interface ILocalizationManager
ManagerException
PortalException
public void clearCache(String resourcePath) throws ManagerException, PortalException
ILocalizationManager
clearCache
in interface ILocalizationManager
ManagerException
PortalException
public void clearCache(String resourcePath, Locale locale) throws ManagerException, PortalException
ILocalizationManager
clearCache
in interface ILocalizationManager
ManagerException
PortalException
public Iterable<String> getCachedResourcePaths() throws ManagerException
ILocalizationManager
getCachedResourcePaths
in interface ILocalizationManager
ManagerException
public String addCustomString(SessionConfig sessionConfig, CustomStringConfig customStringConfig, ITransaction transaction) throws ManagerException, PortalException
ILocalizationManager
addCustomString
in interface ILocalizationManager
ManagerException
PortalException
public void updateCustomString(SessionConfig sessionConfig, CustomStringConfig customStringConfig, ITransaction transaction) throws ManagerException, PortalException
ILocalizationManager
updateCustomString
in interface ILocalizationManager
ManagerException
PortalException
public void deleteCustomString(SessionConfig sessionConfig, String customStringId, ITransaction transaction) throws ManagerException, PortalException
ILocalizationManager
deleteCustomString
in interface ILocalizationManager
ManagerException
PortalException
public CustomStringConfig getCustomString(SessionConfig sessionConfig, String customStringId, ITransaction transaction) throws PortalException
ILocalizationManager
getCustomString
in interface ILocalizationManager
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |