com.ibm.workplace.wcm.api.pagecontext
Interface PortletWcmPageContextServiceProvider

All Superinterfaces:
PortletService

public interface PortletWcmPageContextServiceProvider
extends PortletService

Portlet service interface of the WcmPageContextService. An instance can be obtained as follows:

       PortletServiceHome psh;
       final javax.naming.Context ctx = new javax.naming.InitialContext();
       try {
            psh = (PortletServiceHome) 
               ctx.lookup(PortletWcmPageContextServiceProvider.JNDI_NAME);
       } catch(javax.naming.NameNotFoundException e) {
            ... error handling ...
       }
       ...
       // Get the provider
       final PortletWcmPageContextServiceProvider provider = 
               (PortletWcmPageContextServiceProvider) psh.getPortletService(PortletWcmPageContextServiceProvider.class);
       // Get the WcmPageContextService
       final WcmPageContextService service = provider.getWcmPageContextService(request, response)
       ...
 


Field Summary
static java.lang.String JNDI_NAME
          The JNDI name used to bind the PortletWcmPageContextServiceProvider singleton.
 
Method Summary
 WcmPageContextService getWcmPageContextService(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response)
          Gets an instance of the WcmPageContextService.
 WcmPageContextService getWcmPageContextService(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response, Workspace workspace)
          Gets an instance of the WcmPageContextService.
 

Field Detail

JNDI_NAME

static final java.lang.String JNDI_NAME
The JNDI name used to bind the PortletWcmPageContextServiceProvider singleton.

See Also:
Constant Field Values
Method Detail

getWcmPageContextService

WcmPageContextService getWcmPageContextService(javax.portlet.PortletRequest request,
                                               javax.portlet.PortletResponse response)
                                               throws com.ibm.workplace.wcm.api.pagecontext.exception.PageContextServiceNotAvailableException
Gets an instance of the WcmPageContextService. When calling this method a new WCM workspace is created. The workspace is ended when calling WcmPageContextService.dispose().

Parameters:
request - PortletRequest
response - PortletResponse
Returns:
WcmPageContextService
Throws:
com.ibm.workplace.wcm.api.pagecontext.exception.PageContextServiceNotAvailableException

getWcmPageContextService

WcmPageContextService getWcmPageContextService(javax.portlet.PortletRequest request,
                                               javax.portlet.PortletResponse response,
                                               Workspace workspace)
                                               throws com.ibm.workplace.wcm.api.pagecontext.exception.PageContextServiceNotAvailableException
Gets an instance of the WcmPageContextService.

Parameters:
request - PortletRequest
response - PortletResponse
workspace - WCM workspace to be used by the service.
Returns:
WcmPageContextService
Throws:
com.ibm.workplace.wcm.api.pagecontext.exception.PageContextServiceNotAvailableException