com.ibm.portal.model
Interface PortalLocalizedContextHome

All Superinterfaces:
LocalizedContextHome

public interface PortalLocalizedContextHome
extends LocalizedContextHome

A home interface for lookups to LocalizedContext instances. To obtain the home instance, a JNDI lookup needs to be performed, e.g.: Context ctx = new InitialContext();
PortalLocalizedContextHome home = (PortalLocalizedContextHome) ctx.lookup(PortalLocalizedContextHome.JNDI_NAME);
if (home != null) {
LocalizedContext ctx = home.getLocalizedContext(aRequest); ...
}
Since JNDI lookups may be expensive, IBM recommends to store the home instance for reuse, if the service is used repeatedly.

Since:
6.1.0

Field Summary
static java.lang.String JNDI_NAME
          JNDI name under which the home instance is bound
 
Method Summary
 LocalizedContext getLocalizedContext(HttpServletRequest aRequest)
          Returns a context instance which uses the language ranges specified in the given locale enumeration.
 
Methods inherited from interface com.ibm.portal.model.LocalizedContextHome
getResourceBundleProvider
 

Field Detail

JNDI_NAME

static final java.lang.String JNDI_NAME
JNDI name under which the home instance is bound

See Also:
Constant Field Values
Method Detail

getLocalizedContext

LocalizedContext getLocalizedContext(HttpServletRequest aRequest)
Returns a context instance which uses the language ranges specified in the given locale enumeration.

Specified by:
getLocalizedContext in interface LocalizedContextHome
Parameters:
aRequest - the request for which to return the context instance; the language preference is obtained via the HttpServletRequest#getLocales() method.
Returns:
a localized context instance working on the language ranges exposed by the request