org.apache.jetspeed.container.state
Interface NavigationalState

All Known Subinterfaces:
MutableNavigationalState
All Known Implementing Classes:
AbstractNavigationalState, HybridNavigationalState, PathNavigationalState, SessionFullExtendedNavigationalState, SessionFullNavigationalState, SessionNavigationalState

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 java.lang.String NAVSTATE_SESSION_KEY
           
 
Method Summary
 java.lang.String encode()
          Encodes the current navigational State into a string to be embedded within a PortalURL.
 java.lang.String encode(org.apache.pluto.om.window.PortletWindow window, java.util.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.
 java.lang.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(java.lang.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(java.lang.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(java.lang.String windowId)
          Deprecated.  
 java.util.Iterator getParameterNames(org.apache.pluto.om.window.PortletWindow window)
           
 java.lang.String[] getParameterValues(org.apache.pluto.om.window.PortletWindow window, java.lang.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(java.lang.String windowId)
          Deprecated.  
 java.util.Iterator getWindowIdIterator()
          Returns an iterator of Portlet Window ids of all the Portlet Windows within the NavigationalState.
 void init(java.lang.String encodedState, java.lang.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 java.lang.String NAVSTATE_SESSION_KEY
See Also:
Constant Field Values
Method Detail

init

void init(java.lang.String encodedState,
          java.lang.String characterEncoding)
          throws java.io.UnsupportedEncodingException
Throws:
java.io.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(java.lang.String windowId)
Deprecated. 

Gets the window state for given portlet window id.

Parameters:
windowId -
Returns:

getMappedState

javax.portlet.WindowState getMappedState(java.lang.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(java.lang.String windowId)
Deprecated. 

Gets the portlet mode for the given portlet window id.

Parameters:
windowId -
Returns:

getMappedMode

javax.portlet.PortletMode getMappedMode(java.lang.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

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

getParameterValues

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

getPortletWindowOfAction

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

getPortletWindowOfResource

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

getWindowIdIterator

java.util.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

java.lang.String encode(org.apache.pluto.om.window.PortletWindow window,
                        java.util.Map parameters,
                        javax.portlet.PortletMode mode,
                        javax.portlet.WindowState state,
                        boolean action)
                        throws java.io.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:
java.io.UnsupportedEncodingException

encode

java.lang.String encode(org.apache.pluto.om.window.PortletWindow window,
                        javax.portlet.PortletMode mode,
                        javax.portlet.WindowState state)
                        throws java.io.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:
java.io.UnsupportedEncodingException

encode

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

Returns:
encoded new Navigational State
Throws:
java.io.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-2010 Apache Software Foundation. All Rights Reserved.