You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2005/05/24 19:30:46 UTC
cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/state/impl AbstractNavigationalState.java
ate 2005/05/24 10:30:46
Modified: jetspeed-api/src/java/org/apache/jetspeed/container/state
NavigationalState.java
portal/src/java/org/apache/jetspeed/container/state/impl
AbstractNavigationalState.java
Log:
Added windowIdIterator to be able to get back to the recorded state.
Also added getMode(windowId) and getState(windowId) for the same reason.
Revision Changes Path
1.2 +27 -1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/container/state/NavigationalState.java
Index: NavigationalState.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/container/state/NavigationalState.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NavigationalState.java 15 Oct 2004 21:41:43 -0000 1.1
+++ NavigationalState.java 24 May 2005 17:30:46 -0000 1.2
@@ -68,6 +68,14 @@
WindowState getState(PortletWindow window);
/**
+ * Gets the window state for given portlet window id.
+ *
+ * @param windowId
+ * @return
+ */
+ WindowState getState(String windowId);
+
+ /**
* Gets the portlet mode for the given portlet window.
*
* @param window
@@ -76,6 +84,14 @@
PortletMode getMode(PortletWindow window);
/**
+ * Gets the portlet mode for the given portlet window id.
+ *
+ * @param windowId
+ * @return
+ */
+ PortletMode getMode(String windowId);
+
+ /**
* For the current request return the (first) maximized window or
* return null if no windows are maximized.
*
@@ -90,6 +106,16 @@
PortletWindow getPortletWindowOfAction();
/**
+ * Returns an iterator of Portlet Window ids of all the Portlet Windows
+ * within the NavigationalState.
+ * <br/>
+ * Note: for an ActionRequest, this will include the window id of
+ * the PortletWindowOfAction.
+ * @return iterator of portletWindow ids (String)
+ */
+ Iterator getWindowIdIterator();
+
+ /**
* Encodes the Navigational State with overrides for a specific PortletWindow into a string to be embedded within a
* PortalURL.
*
1.3 +21 -6 jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java
Index: AbstractNavigationalState.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractNavigationalState.java 9 Nov 2004 00:44:43 -0000 1.2
+++ AbstractNavigationalState.java 24 May 2005 17:30:46 -0000 1.3
@@ -94,10 +94,10 @@
}
}
- public WindowState getState(PortletWindow window)
+ public WindowState getState(String windowId)
{
WindowState windowState = null;
- PortletWindowRequestNavigationalState state = requestStates.getPortletWindowNavigationalState(window.getId().toString());
+ PortletWindowRequestNavigationalState state = requestStates.getPortletWindowNavigationalState(windowId);
if (state != null)
{
windowState = state.getWindowState();
@@ -105,16 +105,26 @@
return windowState != null ? windowState : WindowState.NORMAL;
}
- public PortletMode getMode(PortletWindow window)
+ public WindowState getState(PortletWindow window)
+ {
+ return getState(window.getId().toString());
+ }
+
+ public PortletMode getMode(String windowId)
{
PortletMode portletMode = null;
- PortletWindowRequestNavigationalState state = requestStates.getPortletWindowNavigationalState(window.getId().toString());
+ PortletWindowRequestNavigationalState state = requestStates.getPortletWindowNavigationalState(windowId);
if (state != null)
{
portletMode = state.getPortletMode();
}
return portletMode != null ? portletMode : PortletMode.VIEW;
}
+
+ public PortletMode getMode(PortletWindow window)
+ {
+ return getMode(window.getId().toString());
+ }
public PortletWindow getMaximizedWindow()
{
@@ -164,5 +174,10 @@
{
return codec.encode(requestStates, window, mode, state, isNavigationalParameterStateFull(),
isRenderParameterStateFull());
- }
+ }
+
+ public Iterator getWindowIdIterator()
+ {
+ return requestStates.getWindowIdIterator();
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org