| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortletStateManagerService
Portlet service which allows for creating URLs that cannot be created
via the JSR 168 API. This service also provides access to the current
state of the portlet window calling this service.
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
"portletservice/com.ibm.portal.state.service.PortletStateManagerService".
Coding example for accessing the state manager from within a JSR168 portlet:
PortletServiceHome psh; javax.naming.Context ctx = new javax.naming.InitialContext(); try { psh = (PortletServiceHome) ctx.lookup("portletservice/com.ibm.portal.state.service.PortletStateManagerService"); } catch(javax.naming.NameNotFoundException ex) { ... error handling ... } ... // use the service PortletStateManagerService service = (PortletStateManagerService) psh.getService(PortletStateManagerService.class); // get the portlet state manager for the current request PortletStateManager manager = service.getPortletStateManager(request, response); // create URLs etc. ... // dispose the portlet state manager as we do not need it any longer manager.dispose();The returned PortletServiceHome object is valid for the lifetime of the portal. It is recommended to perform the JNDI lookup in the
init
method of the portlet and store the
PortletServiceHome object home in an instance variable. That also
applies to the actual PortletStateManagerService
.PortletStateManagerService
object whenever they are
used in another request. Also note that the PortletStateManager as well as
the PortletStateManagerController are derived fron the Disposable
interface, i.e. whenever these objects are not needed any longer (at the end of a request at
the latest) their dispose() method must be invoked.
Method Summary | |
---|---|
PortletStateManager | getPortletStateManager(PortletRequest request,
PortletResponse response)
Get a portlet state manager for the current request and response. |
PortletStateManagerController | getPortletStateManagerController(ActionRequest request,
ActionResponse response)
Get a portlet state manager for the current request. |
Methods inherited from interface com.ibm.portal.state.accessors.AccessorFactory |
---|
compact |
Method Detail |
---|
PortletStateManager getPortletStateManager(PortletRequest request, PortletResponse response) throws StateManagerException
null
.null
.
PortletStateManagerController getPortletStateManagerController(ActionRequest request, ActionResponse response) throws StateManagerException
null
.null
.
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |