|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortalLocalizedContextHome
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();
Since JNDI lookups may be expensive, it is recommended to store the
home instance for reuse, if the service is used repeatedly.
NOTE: This API may only be used in the scope of an HTTP request in WebSphere Portal, i.e. within a theme.
The API can not be invoked directly by a custom servlet.
PortalLocalizedContextHome home = (PortalLocalizedContextHome) ctx.lookup(PortalLocalizedContextHome.JNDI_NAME);
if (home != null) {
LocalizedContext ctx = home.getLocalizedContext(aRequest);
...
}
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(javax.servlet.http.HttpServletRequest aRequest)
Returns a context instance which uses the language ranges specified in the request. |
LocalizedContext |
getLocalizedContext(javax.servlet.http.HttpServletRequest aRequest,
javax.servlet.http.HttpServletResponse aResponse)
Returns a context instance which uses the language ranges specified in the request, considering also the language selected on the response. |
LocalizedContext |
getLocalizedContext(javax.servlet.jsp.PageContext aPageContext)
Returns a context instance which uses the language ranges specified in the given locale enumeration. |
Methods inherited from interface com.ibm.portal.model.LocalizedContextHome |
---|
getAvailableLocales, getBaseTextDirection, getDefaultCollators, getDefaultLocale, getExpandedLocales, getExpandedSupportedLocales, getLocalizedContext, getLocalizedContext, getLocalizedContext, getResourceBundleProvider, getSupportedLocales |
Field Detail |
---|
static final java.lang.String JNDI_NAME
Method Detail |
---|
LocalizedContext getLocalizedContext(javax.servlet.http.HttpServletRequest aRequest)
aRequest
- the request for which to return the context instance; the
language preference is obtained via the
ServletRequest.getLocales()
method.
LocalizedContext getLocalizedContext(javax.servlet.http.HttpServletRequest aRequest, javax.servlet.http.HttpServletResponse aResponse)
aRequest
- the request for which to return the context instance; the
language preference is obtained via the
ServletRequest.getLocales()
method.aResponse
- the response for which to return the context instance; the
language preference is obtained via the
ServletResponse.getLocale()
method.
LocalizedContext getLocalizedContext(javax.servlet.jsp.PageContext aPageContext)
aPageContext
- the request for which to return the context instance; the
language preference is obtained via the
ServletRequest.getLocales()
method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |