|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IProxyPortletStateManager
An SPI for managing state of proxy portlets. WebLogic Portal provides a default implementation of this interface. The default implementation requires that proxy portlet be aggregated as part of a desktop, and that the current user is not anonymous. If your applications do not meet these requirements, you may replace the default implementation with your own.
You can specify an implementation in netuix-config.xml of your consumer webapp. Here is an example.
<proxy-portlet-state-manager-spi-class>myspi.ProxyPortletStateManagerImpl<proxy-portlet-state-manager-spi-class>
Note that, when an SPI is deployed like this, you will not be able to use portal admin tools to manage the state of proxy portlets. For instance, when you try to clone a proxy portlet or try to change preferences of a proxy portlet using admin tools, admin tools will not invoke the SPI to manage the state.
Nested Class Summary | |
---|---|
static class |
IProxyPortletStateManager.Factory Return an SPI implementation. |
Method Summary | |
---|---|
String |
getPortletHandle(String definitionLabel, String instanceLabel, String defaultPortletHandle, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.ServletContext servletContext) Given the definition and instance labels of a portlet, return the portletHandle. |
byte[] |
getPortletState(String definitionLabel, String instanceLabel, PortletInstanceId instanceId, String portletHandle, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.ServletContext servletContext) Given the definition and instance labels, and the portlet's portletHandle, return the opaque state of the portlet. |
PortletStateChange |
getPortletStateChange(String definitionLabel, String instanceLabel, PortletInstanceId instanceId, String portletHandle, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.ServletContext servletContext) Returns a flag indicating how to treat the portlet's state. |
PortletInstanceId |
updatePortletState(String definitionLabel, String instanceLabel, PortletInstanceId instanceId, IPortletContext currentState, IPortletContext newState, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.ServletContext servletContext) Ths consumer will call this method when the producer returns new state for a proxy portlet. |
Method Detail |
---|
String getPortletHandle(String definitionLabel, String instanceLabel, String defaultPortletHandle, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.ServletContext servletContext)
Given the definition and instance labels of a portlet, return the portletHandle.
Typically, if the return value is different from supplied defaultPortletHandle, it would be a result of the consumer calling the SPI's updatePortletState method.
definitionLabel
- definition labelinstanceLabel
- instance label, if availabledefaultPortletHandle
- default portlet handle (typically specified at the time of creating the proxy portlethttpRequest
- HTTP requestservletContext
- servlet contextbyte[] getPortletState(String definitionLabel, String instanceLabel, PortletInstanceId instanceId, String portletHandle, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.ServletContext servletContext) throws ProxyPortletManagerException
Given the definition and instance labels, and the portlet's portletHandle, return the opaque state of the portlet.
By default, this state would be null. However, on some invocations, producers may return this opaque state to the consumer, and when that happens, the consumer will notify the SPI by calling the updatePortletState method.
definitionLabel
- definition labelinstanceLabel
- instance label, if availableinstanceId
- instance ID, if availableportletHandle
- portlet handlehttpRequest
- HTTP requestservletContext
- servlet contextProxyPortletManagerException
PortletStateChange getPortletStateChange(String definitionLabel, String instanceLabel, PortletInstanceId instanceId, String portletHandle, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.ServletContext servletContext) throws ProxyPortletManagerException
Returns a flag indicating how to treat the portlet's state. If the SPI is not unable to accept state changes, it should always return PortletStateChange.readOnly. When updatePortletState has not been called for a portlet, the portlet may consider returning PortletStateChange.cloneBeforeWrite to let the producer know that it should clone the portlet before attempting to make persistent state changes (such as changing portlet preferences). When this value is supplied, if the producer did clone the portlet, the consumer will notify the SPI by calling updatePortletState. Subsequently, the SPI may consider returning PortletStateChange.readWrite so that additional cloning will not performed by the producer.
definitionLabel
- definition labelinstanceLabel
- instance label, if availableinstanceId
- instance ID, if availableportletHandle
- portlet handlehttpRequest
- HTTP requestservletContext
- servlet contextProxyPortletManagerException
PortletStateChange
PortletInstanceId updatePortletState(String definitionLabel, String instanceLabel, PortletInstanceId instanceId, IPortletContext currentState, IPortletContext newState, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.ServletContext servletContext) throws ProxyPortletManagerException
Ths consumer will call this method when the producer returns new state for a proxy portlet. Note that this happens only when the SPI returns PortletStateChange.cloneBeforeWrite or PortletStateChange.readWrite for the getPortletStateChange method.
The SPI is responsible to storing the updates, and return the updated values when the consumer calls one of the getter methods on this interface.
The SPI may return a new instance ID. However, the consumer will not retain the instance ID beyond the current request.
definitionLabel
- definition labelinstanceLabel
- instance labelinstanceId
- instance IDcurrentState
- current statenewState
- new statehttpRequest
- HTTP requestservletContext
- servlet contextProxyPortletManagerException
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010, Oracle. All rights reserved.