com.ibm.portal.resolver.friendly.service
Interface PortalFriendlySelectionServiceHome

All Superinterfaces:
FriendlySelectionServiceHome

public interface PortalFriendlySelectionServiceHome
extends FriendlySelectionServiceHome

Home interface that can be looked up in JNDI and that provides access to the friendly selection services from the context of a portal request.
Example:

       PortalFriendlySelectionServiceHome psh;
       javax.naming.Context ctx = new javax.naming.InitialContext();
       try {
            psh = (PortalFriendlySelectionServiceHome) 
               ctx.lookup("portal:service/resolver/FriendlySelectionService");
       } catch(javax.naming.NameNotFoundException ex) {
            ... error handling ...
       }
       ...
       // request the service via the home interface
       PortalFriendlySelectionService service = psh.PortalFriendlySelectionService(request, response);
       ...
       service.dispose();
  
 
NOTE: This API may only be used in the scope of an HTTP request in WebSphere Portal, i.e. within a theme. The API can not be invoked directly by a custom servlet.

Since:
6.1.0

Field Summary
static java.lang.String ATTR_CLASS
          name of the class attribute used for instantiation
static java.lang.String DEFAULT_EXTENSION_ID
          ID of the default implementation of the PortalFriendlySelectionServiceHome
static java.lang.String EXTENSION_POINT_ID
          ID of the PortalFriendlySelectionServiceHome extension point
static java.lang.String JNDI_NAME
          JNDI name of this service
 
Method Summary
 javax.servlet.http.HttpServletRequest createHttpServletRequestWrapper(javax.servlet.http.HttpServletRequest aReq)
          Creates a wrapper around the HttpServletRequest that strips the friendly path prefix from the request and stores it as a request attribute
 PortalFriendlySelectionService getPortalFriendlySelectionService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Retrieves an instance of the friendly selection service.
 
Methods inherited from interface com.ibm.portal.resolver.friendly.service.FriendlySelectionServiceHome
compact
 

Field Detail

ATTR_CLASS

static final java.lang.String ATTR_CLASS
name of the class attribute used for instantiation

See Also:
Constant Field Values

DEFAULT_EXTENSION_ID

static final java.lang.String DEFAULT_EXTENSION_ID
ID of the default implementation of the PortalFriendlySelectionServiceHome

See Also:
Constant Field Values

EXTENSION_POINT_ID

static final java.lang.String EXTENSION_POINT_ID
ID of the PortalFriendlySelectionServiceHome extension point

See Also:
Constant Field Values

JNDI_NAME

static final java.lang.String JNDI_NAME
JNDI name of this service

See Also:
Constant Field Values
Method Detail

createHttpServletRequestWrapper

javax.servlet.http.HttpServletRequest createHttpServletRequestWrapper(javax.servlet.http.HttpServletRequest aReq)
                                                                      throws java.io.IOException
Creates a wrapper around the HttpServletRequest that strips the friendly path prefix from the request and stores it as a request attribute

Parameters:
aReq - the request
Returns:
the wrapped request
Throws:
java.io.IOException

getPortalFriendlySelectionService

PortalFriendlySelectionService getPortalFriendlySelectionService(javax.servlet.http.HttpServletRequest request,
                                                                 javax.servlet.http.HttpServletResponse response)
                                                                 throws ModelException,
                                                                        StateException
Retrieves an instance of the friendly selection service. This service needs to be disposed after retrieval

Parameters:
request - current portal request
response - current portal response
Returns:
an instance of the selection service
Throws:
ModelException - - if the navigation model could not be accessed
StateException - - if the state could not be accessed