org.apache.jetspeed.container.state.impl
Class AbstractNavigationalState

java.lang.Object
  extended by org.apache.jetspeed.container.state.impl.AbstractNavigationalState
All Implemented Interfaces:
MutableNavigationalState, NavigationalState
Direct Known Subclasses:
PathNavigationalState, SessionNavigationalState

public abstract class AbstractNavigationalState
extends java.lang.Object
implements MutableNavigationalState

BaseNavigationalState

Version:
$Id: AbstractNavigationalState.java 554926 2007-07-10 13:12:26Z ate $
Author:
David Sean Taylor

Field Summary
protected  JetspeedContentCache cache
           
protected  JetspeedContentCache decorationCache
           
 
Fields inherited from interface org.apache.jetspeed.container.state.NavigationalState
NAVSTATE_SESSION_KEY
 
Constructor Summary
AbstractNavigationalState(NavigationalStateCodec codec, JetspeedContentCache cache)
           
AbstractNavigationalState(NavigationalStateCodec codec, JetspeedContentCache cache, JetspeedContentCache decorationCache)
           
 
Method Summary
 void clearParameters(org.apache.pluto.om.window.PortletWindow window)
          Clear the request parameters to emulate an action reset
 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()
           
protected  PortletWindowRequestNavigationalStates getPortletWindowRequestNavigationalStates()
           
 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)
           
 void removeState(org.apache.pluto.om.window.PortletWindow window)
          Remove state for the given (possibly invalid) portlet window
 void setMode(org.apache.pluto.om.window.PortletWindow window, javax.portlet.PortletMode portletMode)
          Sets the portlet mode for the given portlet window.
 void setState(org.apache.pluto.om.window.PortletWindow window, javax.portlet.WindowState windowState)
          Sets the window state for the given portlet window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jetspeed.container.state.NavigationalState
isNavigationalParameterStateFull, isRenderParameterStateFull, sync
 

Field Detail

cache

protected JetspeedContentCache cache

decorationCache

protected JetspeedContentCache decorationCache
Constructor Detail

AbstractNavigationalState

public AbstractNavigationalState(NavigationalStateCodec codec,
                                 JetspeedContentCache cache)

AbstractNavigationalState

public AbstractNavigationalState(NavigationalStateCodec codec,
                                 JetspeedContentCache cache,
                                 JetspeedContentCache decorationCache)
Method Detail

init

public void init(java.lang.String encodedState,
                 java.lang.String characterEncoding)
          throws java.io.UnsupportedEncodingException
Specified by:
init in interface NavigationalState
Throws:
java.io.UnsupportedEncodingException

getPortletWindowRequestNavigationalStates

protected PortletWindowRequestNavigationalStates getPortletWindowRequestNavigationalStates()

setState

public void setState(org.apache.pluto.om.window.PortletWindow window,
                     javax.portlet.WindowState windowState)
Description copied from interface: MutableNavigationalState
Sets the window state for the given portlet window.

Specified by:
setState in interface MutableNavigationalState

setMode

public void setMode(org.apache.pluto.om.window.PortletWindow window,
                    javax.portlet.PortletMode portletMode)
Description copied from interface: MutableNavigationalState
Sets the portlet mode for the given portlet window.

Specified by:
setMode in interface MutableNavigationalState

getMappedState

public javax.portlet.WindowState getMappedState(java.lang.String windowId)
Description copied from interface: NavigationalState
Gets the internal (portal) window state for given portlet window id.

Specified by:
getMappedState in interface NavigationalState
Returns:

getState

public javax.portlet.WindowState getState(java.lang.String windowId)
Deprecated. 

Description copied from interface: NavigationalState
Gets the window state for given portlet window id.

Specified by:
getState in interface NavigationalState
Returns:

getState

public javax.portlet.WindowState getState(org.apache.pluto.om.window.PortletWindow window)
Description copied from interface: NavigationalState
Gets the window state for given portlet window.

Specified by:
getState in interface NavigationalState
Returns:

getMappedState

public javax.portlet.WindowState getMappedState(org.apache.pluto.om.window.PortletWindow window)
Description copied from interface: NavigationalState
Gets the internal (portal) window state for given portlet window.

Specified by:
getMappedState in interface NavigationalState
Returns:

getMappedMode

public javax.portlet.PortletMode getMappedMode(java.lang.String windowId)
Description copied from interface: NavigationalState
Gets the internal (portal) portlet mode for the given portlet window id.

Specified by:
getMappedMode in interface NavigationalState
Returns:

getMode

public javax.portlet.PortletMode getMode(java.lang.String windowId)
Deprecated. 

Description copied from interface: NavigationalState
Gets the portlet mode for the given portlet window id.

Specified by:
getMode in interface NavigationalState
Returns:

getMode

public javax.portlet.PortletMode getMode(org.apache.pluto.om.window.PortletWindow window)
Description copied from interface: NavigationalState
Gets the portlet mode for the given portlet window.

Specified by:
getMode in interface NavigationalState
Returns:

getMappedMode

public javax.portlet.PortletMode getMappedMode(org.apache.pluto.om.window.PortletWindow window)
Description copied from interface: NavigationalState
Gets the internal (portal) portlet mode for the given portlet window.

Specified by:
getMappedMode in interface NavigationalState
Returns:

getMaximizedWindow

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

Specified by:
getMaximizedWindow in interface NavigationalState
Returns:
The maximized window or null

getParameterNames

public java.util.Iterator getParameterNames(org.apache.pluto.om.window.PortletWindow window)
Specified by:
getParameterNames in interface NavigationalState

getParameterValues

public java.lang.String[] getParameterValues(org.apache.pluto.om.window.PortletWindow window,
                                             java.lang.String parameterName)
Specified by:
getParameterValues in interface NavigationalState

getPortletWindowOfAction

public org.apache.pluto.om.window.PortletWindow getPortletWindowOfAction()
Specified by:
getPortletWindowOfAction in interface NavigationalState

getPortletWindowOfResource

public org.apache.pluto.om.window.PortletWindow getPortletWindowOfResource()
Specified by:
getPortletWindowOfResource in interface NavigationalState

encode

public 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
Description copied from interface: NavigationalState
Encodes the Navigational State with overrides for a specific PortletWindow into a string to be embedded within a PortalURL.

Specified by:
encode in interface NavigationalState
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

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

Specified by:
encode in interface NavigationalState
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

public java.lang.String encode()
                        throws java.io.UnsupportedEncodingException
Description copied from interface: NavigationalState
Encodes the current navigational State into a string to be embedded within a PortalURL.

Specified by:
encode in interface NavigationalState
Returns:
encoded new Navigational State
Throws:
java.io.UnsupportedEncodingException

getWindowIdIterator

public java.util.Iterator getWindowIdIterator()
Description copied from interface: NavigationalState
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.

Specified by:
getWindowIdIterator in interface NavigationalState
Returns:
iterator of portletWindow ids (String)

clearParameters

public void clearParameters(org.apache.pluto.om.window.PortletWindow window)
Description copied from interface: MutableNavigationalState
Clear the request parameters to emulate an action reset

Specified by:
clearParameters in interface MutableNavigationalState

removeState

public void removeState(org.apache.pluto.om.window.PortletWindow window)
Description copied from interface: MutableNavigationalState
Remove state for the given (possibly invalid) portlet window

Specified by:
removeState in interface MutableNavigationalState


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