com.ibm.workplace.wcm.api.editions
Interface EditionServiceProvider

All Superinterfaces:
PortletService

public interface EditionServiceProvider
extends PortletService

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

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

Since:
8.5

Field Summary
static java.lang.String JNDI_NAME
          The JNDI name used to lookup the PortletServiceHome for the editionServiceProvider.
 
Method Summary
 EditionService getEditionService(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response)
          Gets an instance of the EditionService.
 EditionService getEditionService(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response, Workspace workspace)
          Gets an instance of the EditionService.
 

Field Detail

JNDI_NAME

static final java.lang.String JNDI_NAME
The JNDI name used to lookup the PortletServiceHome for the editionServiceProvider.

See Also:
Constant Field Values
Method Detail

getEditionService

EditionService getEditionService(javax.portlet.PortletRequest request,
                                 javax.portlet.PortletResponse response)
                                 throws EditionServiceNotAvailableException
Gets an instance of the EditionService.

Parameters:
request - PortletRequest
response - PortletResponse
Returns:
EditionService
Throws:
EditionServiceNotAvailableException

getEditionService

EditionService getEditionService(javax.portlet.PortletRequest request,
                                 javax.portlet.PortletResponse response,
                                 Workspace workspace)
                                 throws EditionServiceNotAvailableException
Gets an instance of the EditionService.

Parameters:
request - PortletRequest
response - PortletResponse
workspace - WCM workspace to be used by the service.
Returns:
EditionService
Throws:
EditionServiceNotAvailableException