com.ibm.portal.pcm
Interface PortletDialogServiceHome
- All Superinterfaces:
- PortletService
-
public interface PortletDialogServiceHome
- extends PortletService
DialogServiceHome for portlet scope, i. e. with portlet request / response.
PortletServiceHome psh;
Context ctx = new InitialContext();
boolean serviceAvailable = false;
try { psh = (PortletServiceHome) ctx.lookup(PortletDialogServiceHome.JNDI_NAME);
serviceAvailable = true;
} catch(javax.naming.NameNotFoundException ex) { ... error handling ...
}
...
if (serviceAvailable) { PortletDialogServiceHome provider = (PortletDialogServiceHome) psh.getPortletService(PortletDialogServiceHome.class);
DialogService dService = provider.getDialogService(aRequest, aResponse);
...
}
Note: The lookup for this provider should be executed within the init method of a portlet and
only the lookup for the DialogService itself should be performed on a per-request basis.
- Since:
- 8.0.0
Method Summary
|
DialogService |
getDialogService(javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response)
Provides a dialog service valid in the scope of the given portlet request. |
JNDI_NAME
static final java.lang.String JNDI_NAME
- The JNDI name used to bind the PortletDialogServiceHome singleton.
getDialogService
DialogService getDialogService(javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response)
throws DialogServiceException
- Provides a dialog service valid in the scope of the given portlet request.
- Parameters:
- request - The PortletRequest of the current request.
- response - The PortletResponse of the current request.
- Returns:
- A DialogService handle to work with.
- Throws:
- DialogServiceException - in case an error occurred during service retrieval