lumis.portal.localization
Interface ILocalizationManager

Package class diagram package ILocalizationManager
All Known Implementing Classes:
LocalizationManager

public interface ILocalizationManager

Manager responsible for string localization and locales

Since:
4.0.0

Field Summary
static String DO_NOT_RENDER_PARAMETERS
           
 
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 the available locales for the portal.
 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
 

Field Detail

DO_NOT_RENDER_PARAMETERS

static final String DO_NOT_RENDER_PARAMETERS
See Also:
Constant Field Values
Method Detail

localize

String localize(String id,
                IResource resource)
                throws ManagerException,
                       PortalException
Localizes the given string id using the given resource. If no localized value is found for the given id, the id itself is returned. If the string id passed in is null, the return value will also be null.

Parameters:
id -
resource -
Returns:
a String.
Throws:
ManagerException
PortalException

getLocales

Collection<LocaleConfig> getLocales(ITransaction transaction)
                                    throws PortalException
Returns the available locales for the portal.

Parameters:
transaction - the transaction for persistence access.
Returns:
A collection with the available locales.
Throws:
PortalException
Since:
4.0.10

localize

String localize(String id,
                List<IResource> resources)
                throws ManagerException,
                       PortalException
Localizes the given string id using the given list of resources. If no localized value is found for the given id, the id itself is returned. If the string id passed in is null, the return value will also be null.

Parameters:
id -
resources -
Returns:
a String.
Throws:
ManagerException
PortalException

localize

String localize(String id,
                IResource resource,
                Locale locale)
                throws ManagerException,
                       PortalException
Parameters:
id -
resource -
locale -
Returns:
a String.
Throws:
ManagerException
PortalException

localize

String localize(String id,
                List<IResource> resources,
                Locale locale)
                throws ManagerException,
                       PortalException
Parameters:
id -
resources -
locale -
Returns:
a String.
Throws:
ManagerException
PortalException

clearCache

void clearCache()
                throws ManagerException,
                       PortalException
Clear the localization cache.

Throws:
ManagerException
PortalException

clearCache

void clearCache(String resourcePath)
                throws ManagerException,
                       PortalException
Clear the localization cache by passing the resource path.

Parameters:
resourcePath -
Throws:
ManagerException
PortalException

clearCache

void clearCache(String resourcePath,
                Locale locale)
                throws ManagerException,
                       PortalException
Clear the localization cache by passing the resource path and the locale.

Parameters:
resourcePath -
locale -
Throws:
ManagerException
PortalException

getCachedResourcePaths

Iterable<String> getCachedResourcePaths()
                                        throws ManagerException
Get the keys for all cached items

Returns:
Throws:
ManagerException

addCustomString

String addCustomString(SessionConfig sessionConfig,
                       CustomStringConfig customStringConfig,
                       ITransaction transaction)
                       throws ManagerException,
                              PortalException
Add a Custom String

Parameters:
sessionConfig -
customStringConfig -
transaction -
Returns:
Throws:
ManagerException
PortalException

updateCustomString

void updateCustomString(SessionConfig sessionConfig,
                        CustomStringConfig customStringConfig,
                        ITransaction transaction)
                        throws ManagerException,
                               PortalException
Update a specified Custom String

Parameters:
sessionConfig -
customStringConfig -
transaction -
Throws:
ManagerException
PortalException

deleteCustomString

void deleteCustomString(SessionConfig sessionConfig,
                        String customStringId,
                        ITransaction transaction)
                        throws ManagerException,
                               PortalException
Delete a specified Custom String

Parameters:
sessionConfig -
customStringId -
transaction -
Throws:
ManagerException
PortalException

getCustomString

CustomStringConfig getCustomString(SessionConfig sessionConfig,
                                   String customStringId,
                                   ITransaction transaction)
                                   throws PortalException
Get the Custom String object

Parameters:
sessionConfig -
customStringId -
transaction -
Returns:
Throws:
PortalException


Lumisportal  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.