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 554926 2007-07-10 13:12:26Z ate $
Author:
David Sean Taylor

Field Summary
static String NAVSTATE_SESSION_KEY
           
 
Method Summary
 String encode()
          Encodes the current navigational State into a string to be embedded within a PortalURL.
 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.
 javax.portlet.PortletMode getMappedMode(org.apache.pluto.om.window.PortletWindow window)
          Gets the internal (portal) portlet mode for the given portlet window.
 javax.portlet.PortletMode getMappedMode(String windowId)
          Gets the internal (portal) portlet mode for the given portlet window id.
 javax.portlet.WindowState getMappedState(org.apache.pluto.om.window.PortletWindow window)
          Gets the internal (portal) window state for given portlet window.
 javax.portlet.WindowState getMappedState(String windowId)
          Gets the internal (portal) window state for given portlet window id.
 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)
          Deprecated.  
 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()
           
 org.apache.pluto.om.window.PortletWindow getPortletWindowOfResource()
           
 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)
          Deprecated.  
 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

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

init

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

sync

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

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

Parameters:
window -
Returns:

getMappedState

javax.portlet.WindowState getMappedState(org.apache.pluto.om.window.PortletWindow window)
Gets the internal (portal) window state for given portlet window.

Parameters:
window -
Returns:

getState

javax.portlet.WindowState getState(String windowId)
Deprecated. 

Gets the window state for given portlet window id.

Parameters:
windowId -
Returns:

getMappedState

javax.portlet.WindowState getMappedState(String windowId)
Gets the internal (portal) window state for given portlet window id.

Parameters:
windowId -
Returns:

getMode

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

Parameters:
window -
Returns:

getMappedMode

javax.portlet.PortletMode getMappedMode(org.apache.pluto.om.window.PortletWindow window)
Gets the internal (portal) portlet mode for the given portlet window.

Parameters:
window -
Returns:

getMode

javax.portlet.PortletMode getMode(String windowId)
Deprecated. 

Gets the portlet mode for the given portlet window id.

Parameters:
windowId -
Returns:

getMappedMode

javax.portlet.PortletMode getMappedMode(String windowId)
Gets the internal (portal) portlet mode for the given portlet window id.

Parameters:
windowId -
Returns:

getMaximizedWindow

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

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

getParameterValues

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

getPortletWindowOfAction

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

getPortletWindowOfResource

org.apache.pluto.om.window.PortletWindow getPortletWindowOfResource()

getWindowIdIterator

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

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

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

encode

String encode()
              throws UnsupportedEncodingException
Encodes the current navigational State into a string to be embedded within a PortalURL.

Returns:
encoded new Navigational State
Throws:
UnsupportedEncodingException

isNavigationalParameterStateFull

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

isRenderParameterStateFull

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


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