| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GlobalizationPreferencesService
Portal service to retrieve the globalization preferences. This service takes a Portal User object and reads each user's custom preferences and instantiates a com.ibm.icux.util.GlobalizationPreferences instance. The implementation caches default GlobalizationPreferences for each locale. GlobalizationPreferences can be read-only after configuration is set. Multiple users can share a single instance of the GlobalizationPreferences object.
Use the WebSphere Portal JNDI portlet service lookup mechanism to locate the GlobalizationPreferencesService implementation.
Usage Example:
javax.naming.Context ctx = new javax.naming.InitialContext();
GlobalalizationPreferencesService service = null;
try {
service = (GlobalizationPreferencesService) ctx.lookup(GlobalizationPreferencesService.JNDI_NAME);
} catch(javax.naming.NameNotFoundException ex) {
... error handling ...
}
...
if (service != null) {
GlobalizationPreferences preferences = service.getGlobalizationPreferences(user, acceptLanguageHeader);
...
}
Field Summary | |
---|---|
static java.lang.String | JNDI_NAME
The JNDI name that can be used to lookup instances of this service |
Method Summary | |
---|---|
com.ibm.icux.util.GlobalizationPreferences | getGlobalizationPreferences(com.ibm.portal.puma.User user,
java.lang.String acceptLanguageHeader)
Retrieves the user's GlobalizationPreferences object if
user is defined and not null, otherwise tries to create a new set of preferences
based on the accept-language header if defined and not null.
|
Field Detail |
---|
static final java.lang.String JNDI_NAME
Method Detail |
---|
com.ibm.icux.util.GlobalizationPreferences getGlobalizationPreferences(com.ibm.portal.puma.User user, java.lang.String acceptLanguageHeader)
GlobalizationPreferences
object if
user is defined and not null, otherwise tries to create a new set of preferences
based on the accept-language header if defined and not null. If no parameters
are defined then the service will use the configured default locale and create a
new set of preferences.
GlobalizationPreferences
object will be retrieved, allowed to be null
.null
.
GlobalizationPreferences
object which contains
bundled localization information specific to a user or locale.
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |