| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortletLocalizedContextHome
A home interface for lookups to LocalizedContext instances.
To obtain the home instance, a portlet service lookup needs to be performed, e.g.:
PortletServiceHome psh;
Since JNDI lookups may be expensive, IBM recommends to store the home instance
for reuse, if the service is used repeatedly.
javax.naming.Context ctx = new javax.naming.InitialContext();
boolean serviceAvailable = false;
try {
psh = (PortletServiceHome) ctx.lookup(PortletLocalizedContextHome.JNDI_NAME);
serviceAvailable = true;
} catch(javax.naming.NameNotFoundException ex) {
... error handling ...
}
...
if (serviceAvailable) {
PortletLocalizedContextHome home = (PortletLocalizedContextHome) psh.getPortletService(PortletLocalizedContextHome.class);
LocalizedContext ctx = home.getLocalizedContext(aRequest);
...
}
Field Summary | |
---|---|
static java.lang.String | JNDI_NAME
JNDI name under which the home instance is bound |
Method Summary | |
---|---|
PortletLocalizedContext | PortletRequest)">getLocalizedContext(PortletRequest aRequest)
Returns a context instance which uses the language ranges specified in the given locale enumeration. |
ResourceBundleProvider | PortletConfig)">getResourceBundleProvider(PortletConfig config)
Loads the ResourceBundleProvider for the given PortletConfig. |
Methods inherited from interface com.ibm.portal.model.LocalizedContextHome |
---|
getResourceBundleProvider |
Field Detail |
---|
static final java.lang.String JNDI_NAME
Method Detail |
---|
PortletLocalizedContext getLocalizedContext(PortletRequest aRequest)
ResourceBundleProvider getResourceBundleProvider(PortletConfig config) throws UnavailableException
null
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |