PREV CLASS
NEXT CLASS
com.ibm.portal.pcm
Interface PortletDialogModelProvider
- All Superinterfaces:
- PortletService
-
public interface PortletDialogModelProvider
- extends PortletService
DialogModelProvider for portlet scope, i. e. with portlet request / response.
PortletServiceHome psh;
javax.naming.Context ctx = new javax.naming.InitialContext();
boolean serviceAvailable = false;
try { psh = (PortletServiceHome) ctx.lookup(PortletDialogModelProvider.JNDI_NAME);
serviceAvailable = true;
} catch(javax.naming.NameNotFoundException ex) { ... error handling ...
}
...
if (serviceAvailable) { PortletDialogModelProvider provider = (PortletDialogModelProvider) psh.getPortletService(PortletDialogModelProvider.class);
DialogModel model = provider.getDialogModel(aRequest, aResponse);
...
}
Note: The lookup for this provider should be executed within the init method of a portlet and
only the lookup for the DialogModel itself should be performed on a per-request basis.
- Since:
- 8.0.0
Field Summary
|
static java.lang.String |
JNDI_NAME
The JNDI name of the dialog model provider portlet service. |
Method Summary
|
|
getDialogModel(javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response)
Return the dialog model of the current context. |
JNDI_NAME
static final java.lang.String JNDI_NAME
- The JNDI name of the dialog model provider portlet service.
- See Also:
- Constant Field Values
getDialogModel
<T extends DialogDefinition> DialogModel<T> getDialogModel(javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response)
throws ModelException
- Returns the dialog model of the current context.
- Parameters:
- request - The PortletRequest of the current context. Must not be null.
- response - The PortletResponse of the current context. Must not be null.
- Returns:
- The respective DialogModel for the current context, never null.
- Throws:
- ModelException - In any case the dialog model can not be obtained, e.g. due to exceptions during the lookup
of the current user.
PREV CLASS
NEXT CLASS