Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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(PortletRequest request, PortletResponse response)` Gets an instance of the `WcmPageContextService`.
`WcmPageContextService` | `getWcmPageContextService(PortletRequest request, 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(PortletRequest request,
                                                   PortletResponse response)
                                                   throws 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:
    `PageContextServiceNotAvailableException`

### getWcmPageContextService

    WcmPageContextService getWcmPageContextService(PortletRequest request,
                                                   PortletResponse response,
                                                   Workspace workspace)
                                                   throws PageContextServiceNotAvailableException

  Gets an instance of the `WcmPageContextService`.

  Parameters:
    `request` - PortletRequest
    `response` - PortletResponse
    `workspace` - WCM workspace to be used by the service.
  Returns:
    `WcmPageContextService`
  Throws:
    `PageContextServiceNotAvailableException`

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD