Author: julien(a)jboss.com
Date: 2007-11-29 11:35:29 -0500 (Thu, 29 Nov 2007)
New Revision: 9202
Modified:
branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java
branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/PresentationContentRendererContext.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/UIWindow.java
Log:
- remove generic get/set content state on the UIWindow as the client does not need to be
aware of the kind of state and the server can manage it using a detyped access
Modified:
branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java
===================================================================
---
branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java 2007-11-29
15:15:31 UTC (rev 9201)
+++
branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java 2007-11-29
16:35:29 UTC (rev 9202)
@@ -45,6 +45,7 @@
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.invocation.response.RenderResponse;
import org.jboss.portal.presentation.client.PresentationContext;
+import org.jboss.portal.presentation.model.StateScopeType;
import org.jboss.portal.presentation.model.UIWindow;
import org.jboss.portal.presentation.protocol.ErrorResponse;
import org.jboss.portal.presentation.protocol.LinkActivation;
@@ -253,7 +254,7 @@
{
uiWindow.setMode(mode);
}
- uiWindow.setContentState(contentState);
+ uiWindow.setProperty(StateScopeType.NAVIGATIONAL, "content",
contentState);
response = new
ShowUIObjectResponse(window.getPage().getId().toString(PortalObjectPath.CANONICAL_FORMAT));
}
}
Modified:
branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/PresentationContentRendererContext.java
===================================================================
---
branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/PresentationContentRendererContext.java 2007-11-29
15:15:31 UTC (rev 9201)
+++
branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/PresentationContentRendererContext.java 2007-11-29
16:35:29 UTC (rev 9202)
@@ -37,6 +37,7 @@
import org.jboss.portal.portlet.impl.spi.AbstractUserContext;
import org.jboss.portal.portlet.invocation.RenderInvocation;
import org.jboss.portal.presentation.client.PresentationContext;
+import org.jboss.portal.presentation.model.StateScopeType;
import org.jboss.portal.presentation.model.UIWindow;
/**
@@ -82,7 +83,7 @@
windowState = WindowState.NORMAL;
}
- StateString contentState = (StateString)uiwindow.getContentState();
+ StateString contentState =
(StateString)uiwindow.getProperty(StateScopeType.NAVIGATIONAL, "content");
//
return new WindowNavigationalState(windowState, mode, contentState);
@@ -92,7 +93,7 @@
{
uiwindow.setWindowState(navigationalState.getWindowState());
uiwindow.setMode(navigationalState.getMode());
- uiwindow.setContentState(navigationalState.getContentState());
+ uiwindow.setProperty(StateScopeType.NAVIGATIONAL, "content",
navigationalState.getContentState());
}
public User getUser()
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2007-11-29
15:15:31 UTC (rev 9201)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2007-11-29
16:35:29 UTC (rev 9202)
@@ -73,16 +73,6 @@
setProperty(StateScopeType.NAVIGATIONAL, "windowstate", windowState);
}
- public Object getContentState()
- {
- return getProperty(StateScopeType.NAVIGATIONAL, "content",
Object.class);
- }
-
- public void setContentState(Object contentState)
- {
- setProperty(StateScopeType.NAVIGATIONAL, "content", contentState);
- }
-
/**
*
* @param <T>
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/UIWindow.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/UIWindow.java 2007-11-29
15:15:31 UTC (rev 9201)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/UIWindow.java 2007-11-29
16:35:29 UTC (rev 9202)
@@ -32,30 +32,30 @@
public interface UIWindow extends UIObject
{
/**
- *
- * @return
+ * Returns the window state of the window or null if it does not exist.
+ *
+ * @return the window state
*/
WindowState getWindowState();
/**
- *
- * @param windowState
+ * Update the window state of the window.
+ *
+ * @param windowState the new window state
*/
void setWindowState(WindowState windowState);
/**
- *
- * @return
+ * Returns the mode of the window or null if it does not exist.
+ *
+ * @return the mode
*/
Mode getMode();
/**
- *
- * @param mode
+ * Update the mode of the window.
+ *
+ * @param mode the new mode
*/
void setMode(Mode mode);
-
- Object getContentState();
-
- void setContentState(Object contentState);
}
Show replies by date