com.ibm.portal.model
Interface CorLocalizedContextHome

All Superinterfaces:
LocaleCapable, LocalizedContextHome

public interface CorLocalizedContextHome
extends LocalizedContextHome

A home interface for lookups to LocalizedContext instances. To obtain the home instance, a JNDI lookup needs to be performed, e.g.:

 // The cor context 
 final com.ibm.content.operations.registry.api.Context corContext = ... 
 Context ctx = new InitialContext();
 CorLocalizedContextHome home = (CorLocalizedContextHome) ctx
     .lookup(CorLocalizedContextHome.JNDI_NAME);
 if (home != null) {
     LocalizedContext ctx = home.getLocalizedContext(aCorContext);
     ...
 }
 
Since JNDI lookups may be expensive, it is recommended to store the home instance for reuse, if the service is used repeatedly.

Since:
6.1.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ibm.portal.model.LocalizedContextHome
LocalizedContextHome.BASE_TEXT_DIRECTION, LocalizedContextHome.ComparatorFactory
 
Field Summary
static java.lang.String JNDI_NAME
          JNDI name under which the home instance is bound
 
Method Summary
 LocalizedContext getLocalizedContext(Context aContext)
          Returns a context instance which uses the language ranges specified in the given Cor context.
 
Methods inherited from interface com.ibm.portal.model.LocalizedContextHome
getAvailableLocales, getBaseTextDirection, getDefaultCollators, getDefaultLocale, getExpandedLocales, getExpandedSupportedLocales, getResourceBundleProvider, getSupportedLocales
 

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(Context aContext)
Returns a context instance which uses the language ranges specified in the given Cor context.

Specified by:
getLocalizedContext in interface LocalizedContextHome
Parameters:
aContext - the Context for which to return the context instance;.
Returns:
a localized context instance working on the language ranges defined by the Cor context