org.apache.jetspeed.container.state
Interface MutableNavigationalState

All Superinterfaces:
NavigationalState

public interface MutableNavigationalState
extends NavigationalState

MutableNavigationalState Allows changing the PortletMode and/or WindowState of a PortletWindow state.
This interface extends the NavigationState interface to cleanly define the immutable contract of the latter.
Note: this is actually an ugly hack into the Portal as formally (per the portlet specs) the PortletMode and/or WindowState are only to be modified *and* then retained for the *next* subsequent renderRequest.
This interface is used for support of the Pluto required PortalActionProvider implementation (which definition is not undisputed, see: [todo: link to pluto-dev "Why PortalActionProvider?" mail discussion]).
Furthermore, this interface is also used by the Jetspeed-1 JetspeedFusionPortlet to synchronize the NavigationalState. Under which conditions that is done isn't clear yet (to me) but possibly that can/should be done differently also.
Modifying the Navigational State *during* a renderRequest (before the actual) rendering can result in a lost of these new states on a subsequent refresh of the Portlet if that doesn't trigger changing them again, because the state of these changes is only saved in PortletURLs created during the renderRequest, *not* in the session (if SessionNavigationalState is used). The session state has already been synchronized (if done) *before* these methods can be called.
Modifying the Navigational State *during* an actionRequest, as done by Pluto through the PortalActionProvider interface just before it sends a redirect, is kinda strange as it can more cleanly be done through the its PortalURLProvider interface (see above link to the mail discussion about this).

Version:
$Id: MutableNavigationalState.java 758136 2009-03-25 03:30:49Z ate $
Author:
Ate Douma

Field Summary
 
Fields inherited from interface org.apache.jetspeed.container.state.NavigationalState
NAVSTATE_SESSION_KEY, PRP_SESSION_KEY
 
Method Summary
 void clearParameters(PortletWindow window)
           
 void removeState(PortletWindow window)
          Remove state for the given (possibly invalid) portlet window
 void setActionScopeId(PortletWindow window, java.lang.String actionScopeId)
           
 void setActionScopeRendered(PortletWindow window, boolean actionScopeRendered)
           
 void setCacheLevel(PortletWindow window, java.lang.String cacheLevel)
           
 void setMode(PortletWindow window, javax.portlet.PortletMode portletMode)
          Sets the portlet mode for the given portlet window.
 void setParametersMap(PortletWindow window, java.util.Map<java.lang.String,java.lang.String[]> parametersMap)
           
 void setPrivateRenderParametersMap(PortletWindow window, java.util.Map<java.lang.String,java.lang.String[]> privateRenderParametersMap)
           
 void setPublicRenderParametersMap(PortletWindow window, java.util.Map<java.lang.String,java.lang.String[]> publicRenderParametersMap)
           
 void setResourceId(PortletWindow window, java.lang.String resourceId)
           
 void setState(PortletWindow window, javax.portlet.WindowState windowState)
          Sets the window state for the given portlet window.
 void setTargetted(PortletWindow window)
          Clear the request parameters to emulate an action reset
 
Methods inherited from interface org.apache.jetspeed.container.state.NavigationalState
encode, encode, encode, encode, getActionScopeId, getCacheLevel, getMappedMode, getMappedMode, getMappedState, getMappedState, getMaximizedWindow, getMode, getMode, getParameterMap, getPortletWindowOfAction, getPortletWindowOfResource, getPrivateRenderParameterMap, getPublicRenderParameterMap, getRequestParameterMap, getResourceID, getState, getState, getURLType, getWindowIdIterator, init, isActionScopedRequestAttributes, isActionScopeRendered, isNavigationalParameterStateFull, isRenderParameterStateFull, registerPortletContentCachedForPublicRenderParameters, sync
 

Method Detail

setState

void setState(PortletWindow window,
              javax.portlet.WindowState windowState)
Sets the window state for the given portlet window.

Parameters:
window -
windowState -

removeState

void removeState(PortletWindow window)
Remove state for the given (possibly invalid) portlet window


setMode

void setMode(PortletWindow window,
             javax.portlet.PortletMode portletMode)
Sets the portlet mode for the given portlet window.

Parameters:
window -
portletMode -

setTargetted

void setTargetted(PortletWindow window)
Clear the request parameters to emulate an action reset

Parameters:
window -

clearParameters

void clearParameters(PortletWindow window)

setParametersMap

void setParametersMap(PortletWindow window,
                      java.util.Map<java.lang.String,java.lang.String[]> parametersMap)

setActionScopeId

void setActionScopeId(PortletWindow window,
                      java.lang.String actionScopeId)

setActionScopeRendered

void setActionScopeRendered(PortletWindow window,
                            boolean actionScopeRendered)

setCacheLevel

void setCacheLevel(PortletWindow window,
                   java.lang.String cacheLevel)

setResourceId

void setResourceId(PortletWindow window,
                   java.lang.String resourceId)

setPrivateRenderParametersMap

void setPrivateRenderParametersMap(PortletWindow window,
                                   java.util.Map<java.lang.String,java.lang.String[]> privateRenderParametersMap)

setPublicRenderParametersMap

void setPublicRenderParametersMap(PortletWindow window,
                                  java.util.Map<java.lang.String,java.lang.String[]> publicRenderParametersMap)


Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.