org.jboss.portal.core.model.portal.navstate
Class PortalObjectNavigationalStateContext

java.lang.Object
  extended by org.jboss.portal.core.model.portal.navstate.PortalObjectNavigationalStateContext
All Implemented Interfaces:
org.jboss.portal.common.invocation.AttributeResolver, NavigationalStateContext

public class PortalObjectNavigationalStateContext
extends java.lang.Object
implements NavigationalStateContext

Version:
$Revision: 10960 $
Author:
Julien Viet

Constructor Summary
PortalObjectNavigationalStateContext(org.jboss.portal.common.invocation.AttributeResolver store)
           
 
Method Summary
 boolean applyChanges()
          Apply the navigational state changes to the real storage.
 java.lang.Object getAttribute(java.lang.Object attrKey)
           
 java.util.Iterator<NavigationalStateObjectChange> getChanges()
          Retrieve an iterator over the current changes.
 java.util.Set getKeys()
           
 PageNavigationalState getPageNavigationalState(java.lang.String pageId)
          Retrieves the navigational state associated with the specified page identifier.
 java.lang.String getViewId()
          Returns the current view id.
 WindowNavigationalState getWindowNavigationalState(java.lang.String windowId)
          Retrieves the navigational state associated with the specified window identifier.
 void setAttribute(java.lang.Object attrKey, java.lang.Object newNS)
           
 void setPageNavigationalState(java.lang.String pageId, PageNavigationalState pageNavigationalState)
          Set the navigational state associated with the page identified by the given identifier.
 void setWindowNavigationalState(java.lang.String windowId, WindowNavigationalState windowNavigationalState)
          Set the navigational state associated with the window identified by the given identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortalObjectNavigationalStateContext

public PortalObjectNavigationalStateContext(org.jboss.portal.common.invocation.AttributeResolver store)
Method Detail

getKeys

public java.util.Set getKeys()
Specified by:
getKeys in interface org.jboss.portal.common.invocation.AttributeResolver

getAttribute

public java.lang.Object getAttribute(java.lang.Object attrKey)
                              throws java.lang.IllegalArgumentException
Specified by:
getAttribute in interface org.jboss.portal.common.invocation.AttributeResolver
Throws:
java.lang.IllegalArgumentException

setAttribute

public void setAttribute(java.lang.Object attrKey,
                         java.lang.Object newNS)
                  throws java.lang.IllegalArgumentException
Specified by:
setAttribute in interface org.jboss.portal.common.invocation.AttributeResolver
Throws:
java.lang.IllegalArgumentException

getChanges

public java.util.Iterator<NavigationalStateObjectChange> getChanges()
Description copied from interface: NavigationalStateContext
Retrieve an iterator over the current changes.

Specified by:
getChanges in interface NavigationalStateContext
Returns:
an iterator over the current changes.

getWindowNavigationalState

public WindowNavigationalState getWindowNavigationalState(java.lang.String windowId)
Description copied from interface: NavigationalStateContext
Retrieves the navigational state associated with the specified window identifier.

Specified by:
getWindowNavigationalState in interface NavigationalStateContext
Parameters:
windowId - a String identifying the window which navigational state is to be retrieved
Returns:
the navigational state associated with the specified window identifier or null if the given window identifier is not known by this NavigationalStateContext or no navigational state is associated with the given identifier.

setWindowNavigationalState

public void setWindowNavigationalState(java.lang.String windowId,
                                       WindowNavigationalState windowNavigationalState)
Description copied from interface: NavigationalStateContext
Set the navigational state associated with the window identified by the given identifier.

Specified by:
setWindowNavigationalState in interface NavigationalStateContext
Parameters:
windowId - the window identifier
windowNavigationalState - the window navigational state

getPageNavigationalState

public PageNavigationalState getPageNavigationalState(java.lang.String pageId)
Description copied from interface: NavigationalStateContext
Retrieves the navigational state associated with the specified page identifier.

Specified by:
getPageNavigationalState in interface NavigationalStateContext
Parameters:
pageId - a String identifying the page which navigational state is to be retrieved
Returns:
the navigational state associated with the specified window identifier or null if the given page identifier is not known by this NavigationalStateContext or no navigational state is associated with the given identifier.

setPageNavigationalState

public void setPageNavigationalState(java.lang.String pageId,
                                     PageNavigationalState pageNavigationalState)
Description copied from interface: NavigationalStateContext
Set the navigational state associated with the page identified by the given identifier.

Specified by:
setPageNavigationalState in interface NavigationalStateContext
Parameters:
pageId - the page identifier
pageNavigationalState - the page navigational state

applyChanges

public boolean applyChanges()
Apply the navigational state changes to the real storage.

Specified by:
applyChanges in interface NavigationalStateContext
Returns:
true if state changed

getViewId

public java.lang.String getViewId()
Description copied from interface: NavigationalStateContext
Returns the current view id.

Specified by:
getViewId in interface NavigationalStateContext
Returns:
the view id