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


public interface PortalStateParameterServiceHome

Home interface that can be looked up via JNDI and that provides access to the state parameter service.

Accessing the service:

     PortalStateParameterServiceHome home;
     javax.naming.Context ctx = new javax.naming.InitialContext();
     try {
          home = (PortalStateParameterServiceHome) 
             ctx.lookup(PortalStateParameterServiceHome.JNDI_NAME);
     } catch(javax.naming.NameNotFoundException ex) {
          ... error handling ...
     }
     ...
     // request the service via the home interface
     final StateParameterService service = home.getStateParameterService(request, response);
     try{
          // manipulate parameters
          ...
       } finally {
          // Dispose the service
          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 JNDI_NAME
          JNDI name under which the home instance is bound
 
Method Summary
 StateParameterService getStateParameterService(HttpServletRequest req, HttpServletResponse resp)
          Returns the state parameter service.
 StateParameterService getStateParameterService(StateHolder state, HttpServletRequest req, HttpServletResponse resp)
          Returns the state parameter service.
 

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

getStateParameterService

StateParameterService getStateParameterService(HttpServletRequest req,
                                               HttpServletResponse resp)
                                               throws StateParameterException,
                                                      StateNotInRequestException
Returns the state parameter service.

Parameters:
req - The current servlet request
resp - The current serlvet response
Returns:
the state parameter service, never null
Throws:
StateNotInRequestException - if no state could be associated with the request
StateParameterException - thrown if the initialization of the StateParameterService fails.

getStateParameterService

StateParameterService getStateParameterService(StateHolder state,
                                               HttpServletRequest req,
                                               HttpServletResponse resp)
                                               throws StateParameterException
Returns the state parameter service.

Parameters:
state - state to work on
req - The current servlet request
resp - The current serlvet response
Returns:
the state parameter service, never null
Throws:
StateParameterException - thrown if the initialization of the StateParameterService fails.
Since:
8.5