com.ibm.portal.spa.service
Interface PortletStaticPageServiceHome

All Superinterfaces:
PortletService, StaticPageServiceHome

public interface PortletStaticPageServiceHome
extends StaticPageServiceHome, PortletService

Portlet service which allows for accessing POC services from a portlet environment
The portlet service is accessed by a JNDI lookup; the lookup returns an implementation of this interface, which allows to get the actual portlet service under the JNDI name JNDI_NAME.
Coding example for accessing the POC service from within a JSR168 portlet:

        PortletServiceHome psh;
        javax.naming.Context ctx = new javax.naming.InitialContext();
        try {
             psh = (PortletServiceHome) 
                ctx.lookup(PortletStaticPageServiceHome.JNDI_NAME);
        } catch(javax.naming.NameNotFoundException ex) {
             ... error handling ...
        }
        ...
        // use the service
        PortletStaticPageServiceHome service = (PortletStaticPageServiceHome) psh.getPortletService(PortletStaticPageServiceHome.class);
        // get the static page service for the current request
        PortletStaticPageService svc = service.getPortletStaticPageService(request, response);
        // create URLs etc.
        ...
        // dispose the poc service as we do not need it any longer
        svc.dispose();
 

Since:
6.1.0

Field Summary
static java.lang.String JNDI_NAME
          Name that can be used for the JNDI lookup of this service
 
Method Summary
 PortletStaticPageService getPortletStaticPageService(PortletRequest request, PortletResponse response)
          Get a static page service
 
Methods inherited from interface com.ibm.portal.spa.service.StaticPageServiceHome
com.ibm.portal.content.LayoutModelController)">createStaticPageContentHandler, createStaticPageZipParser, getFileTypeMap, getStaticPageParserFactory
 

Field Detail

JNDI_NAME

static final java.lang.String JNDI_NAME
Name that can be used for the JNDI lookup of this service

Method Detail

getPortletStaticPageService

PortletStaticPageService getPortletStaticPageService(PortletRequest request,
                                                     PortletResponse response)
Get a static page service

Parameters:
request - The current portlet request. Must not be null.
response - The current portlet response. Must not be null.
Returns:
A static page service service for accessing POC related functionality