org.apache.jetspeed.container.state
Interface NavigationalState

All Known Subinterfaces:
MutableNavigationalState

public interface NavigationalState

NavigationalState gives readonly access to the state of the Portal URL and all navigational state context as well as encoding a new State for usage in a Portal URL.
Note: Support for changing the PortletMode and/or WindowState of a PortletWindow, other than for encoding a new State is moved down to the MutableNavigationState interface to cleanly define the immutable contract of this interface.

Version:
$Id: NavigationalState.java 188606 2005-05-24 17:30:46Z ate $
Author:
David Sean Taylor

Field Summary
static String NAVSTATE_SESSION_KEY
           
 
Method Summary
 String encode(org.apache.pluto.om.window.PortletWindow window, Map parameters, javax.portlet.PortletMode mode, javax.portlet.WindowState state, boolean action)
          Encodes the Navigational State with overrides for a specific PortletWindow into a string to be embedded within a PortalURL.
 String encode(org.apache.pluto.om.window.PortletWindow window, javax.portlet.PortletMode mode, javax.portlet.WindowState state)
          Encodes the Navigational State with overrides for a specific PortletWindow while retaining its (request) parameters into a string to be embedded within a renderURL.
 org.apache.pluto.om.window.PortletWindow getMaximizedWindow()
          For the current request return the (first) maximized window or return null if no windows are maximized.
 javax.portlet.PortletMode getMode(org.apache.pluto.om.window.PortletWindow window)
          Gets the portlet mode for the given portlet window.
 javax.portlet.PortletMode getMode(String windowId)
          Gets the portlet mode for the given portlet window id.
 Iterator getParameterNames(org.apache.pluto.om.window.PortletWindow window)
           
 String[] getParameterValues(org.apache.pluto.om.window.PortletWindow window, String parameterName)
           
 org.apache.pluto.om.window.PortletWindow getPortletWindowOfAction()
           
 javax.portlet.WindowState getState(org.apache.pluto.om.window.PortletWindow window)
          Gets the window state for given portlet window.
 javax.portlet.WindowState getState(String windowId)
          Gets the window state for given portlet window id.
 Iterator getWindowIdIterator()
          Returns an iterator of Portlet Window ids of all the Portlet Windows within the NavigationalState.
 void init(String encodedState, String characterEncoding)
           
 boolean isNavigationalParameterStateFull()
           
 boolean isRenderParameterStateFull()
           
 void sync(RequestContext context)
          Synchronize the Navigational State with saved state (if used).
 

Field Detail

NAVSTATE_SESSION_KEY

public static final String NAVSTATE_SESSION_KEY
See Also:
Constant Field Values
Method Detail

init

public void init(String encodedState,
                 String characterEncoding)
          throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

sync

public void sync(RequestContext context)
Synchronize the Navigational State with saved state (if used).
Should be called by the PortalURL impl right after calling #init(String)

Parameters:
context - The RequestContext for this Navigational State

getState

public javax.portlet.WindowState getState(org.apache.pluto.om.window.PortletWindow window)
Gets the window state for given portlet window.

Parameters:
window -
Returns:

getState

public javax.portlet.WindowState getState(String windowId)
Gets the window state for given portlet window id.

Parameters:
windowId -
Returns:

getMode

public javax.portlet.PortletMode getMode(org.apache.pluto.om.window.PortletWindow window)
Gets the portlet mode for the given portlet window.

Parameters:
window -
Returns:

getMode

public javax.portlet.PortletMode getMode(String windowId)
Gets the portlet mode for the given portlet window id.

Parameters:
windowId -
Returns:

getMaximizedWindow

public org.apache.pluto.om.window.PortletWindow getMaximizedWindow()
For the current request return the (first) maximized window or return null if no windows are maximized.

Returns:
The maximized window or null

getParameterNames

public Iterator getParameterNames(org.apache.pluto.om.window.PortletWindow window)

getParameterValues

public String[] getParameterValues(org.apache.pluto.om.window.PortletWindow window,
                                   String parameterName)

getPortletWindowOfAction

public org.apache.pluto.om.window.PortletWindow getPortletWindowOfAction()

getWindowIdIterator

public Iterator getWindowIdIterator()
Returns an iterator of Portlet Window ids of all the Portlet Windows within the NavigationalState.
Note: for an ActionRequest, this will include the window id of the PortletWindowOfAction.

Returns:
iterator of portletWindow ids (String)

encode

public String encode(org.apache.pluto.om.window.PortletWindow window,
                     Map parameters,
                     javax.portlet.PortletMode mode,
                     javax.portlet.WindowState state,
                     boolean action)
              throws UnsupportedEncodingException
Encodes the Navigational State with overrides for a specific PortletWindow into a string to be embedded within a PortalURL.

Parameters:
window - the PortalWindow
parameters - the new request or action parameters for the PortalWindow
mode - the new PortletMode for the PortalWindow
state - the new WindowState for the PortalWindow
action - indicates if to be used in an actionURL or renderURL
Returns:
encoded new Navigational State
Throws:
UnsupportedEncodingException

encode

public String encode(org.apache.pluto.om.window.PortletWindow window,
                     javax.portlet.PortletMode mode,
                     javax.portlet.WindowState state)
              throws UnsupportedEncodingException
Encodes the Navigational State with overrides for a specific PortletWindow while retaining its (request) parameters into a string to be embedded within a renderURL.

Parameters:
window - the PortalWindow
mode - the new PortletMode for the PortalWindow
state - the new WindowState for the PortalWindow
Returns:
encoded new Navigational State
Throws:
UnsupportedEncodingException

isNavigationalParameterStateFull

public boolean isNavigationalParameterStateFull()
Returns:
true if WindowStates and PortletModes will be saved in the Session

isRenderParameterStateFull

public boolean isRenderParameterStateFull()
Returns:
true if render parameters will be saved in the Session


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.