com.ibm.portal.state.service.parameters
Interface PortletStateParameterServiceHome

All Superinterfaces:
PortletService

public interface PortletStateParameterServiceHome
extends PortletService

Portlet Service that can be looked up and that provides access to the state parameter service.

Access to the service
The portlet service home is accessed by a JNDI lookup; the home object can then be used to obtain the PortletStateParameterServiceHome.
Coding example for accessing the portlet state parameter service from within a JSR168 portlet:

       PortletServiceHome psh;
       final javax.naming.Context ctx = new javax.naming.InitialContext();
       try {
            psh = (PortletServiceHome) 
               ctx.lookup(PortletStateParameterServiceHome.JNDI_NAME);
       } catch(javax.naming.NameNotFoundException ex) {
            ... error handling ...
       }
       ...
       // Get the portlet service
       final PortletStateParameterServiceHome home = (PortletStateParameterServiceHome) psh.getPortletService(PortletStateParameterServiceHome.class);
       // Obtain the service for manipulating parameters
       final StateParameterService service = home.getStateParameterService(portletRequest, portletResponse);
       try{
          // manipulate parameters
          ...
       } finally {
          // Dispose the service
          service.dispose();
       }
 

Since:
6.1.0

Field Summary
static java.lang.String JNDI_NAME
          JNDI name under which the home instance is bound
 
Method Summary
 PortletWindowStateParameterService getCurrentPortletWindowStateParameterService(javax.portlet.PortletRequest req, javax.portlet.PortletResponse resp)
          Returns a service that can be used to manipulate parameters of the given request's portlet window.
 StateParameterService getStateParameterService(javax.portlet.PortletRequest req, javax.portlet.PortletResponse resp)
          Returns a service that can be used to manipulate parameters of any portlet window.
 StateParameterService getStateParameterService(StateHolder state, javax.portlet.PortletRequest req, javax.portlet.PortletResponse resp)
          Returns a service that can be used to manipulate parameters of any portlet window.
 

Field Detail

JNDI_NAME

static final java.lang.String JNDI_NAME
JNDI name under which the home instance is bound

See Also:
Constant Field Values
Method Detail

getCurrentPortletWindowStateParameterService

PortletWindowStateParameterService getCurrentPortletWindowStateParameterService(javax.portlet.PortletRequest req,
                                                                                javax.portlet.PortletResponse resp)
                                                                                throws StateParameterException
Returns a service that can be used to manipulate parameters of the given request's portlet window.

Parameters:
req - The current portlet request
resp - The current portlet response
Returns:
The PortletWindowStateParameterService for the current portlet window
Throws:
StateParameterException - thrown if the initialization of the StateParameterService fails.

getStateParameterService

StateParameterService getStateParameterService(javax.portlet.PortletRequest req,
                                               javax.portlet.PortletResponse resp)
                                               throws StateParameterException
Returns a service that can be used to manipulate parameters of any portlet window.

Parameters:
req - The current portlet request
resp - The current portlet response
Returns:
The StateParameterService
Throws:
StateParameterException - thrown if the initialization of the StateParameterService fails.

getStateParameterService

StateParameterService getStateParameterService(StateHolder state,
                                               javax.portlet.PortletRequest req,
                                               javax.portlet.PortletResponse resp)
                                               throws StateParameterException
Returns a service that can be used to manipulate parameters of any portlet window.

Parameters:
state - state to operate on
req - The current portlet request
resp - The current portlet response
Returns:
The StateParameterService
Throws:
StateParameterException - thrown if the initialization of the StateParameterService fails.
Since:
8.5