|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortletStateParameterServiceHome
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(); }
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 |
---|
static final java.lang.String JNDI_NAME
Method Detail |
---|
PortletWindowStateParameterService getCurrentPortletWindowStateParameterService(javax.portlet.PortletRequest req, javax.portlet.PortletResponse resp) throws StateParameterException
req
- The current portlet requestresp
- The current portlet response
PortletWindowStateParameterService
for the
current portlet window
StateParameterException
- thrown if the initialization of the
StateParameterService
fails.StateParameterService getStateParameterService(javax.portlet.PortletRequest req, javax.portlet.PortletResponse resp) throws StateParameterException
req
- The current portlet requestresp
- The current portlet response
StateParameterService
StateParameterException
- thrown if the initialization of the
StateParameterService
fails.StateParameterService getStateParameterService(StateHolder state, javax.portlet.PortletRequest req, javax.portlet.PortletResponse resp) throws StateParameterException
state
- state to operate onreq
- The current portlet requestresp
- The current portlet response
StateParameterService
StateParameterException
- thrown if the initialization of the
StateParameterService
fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |