Author: julien(a)jboss.com
Date: 2008-06-09 05:27:51 -0400 (Mon, 09 Jun 2008)
New Revision: 10952
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/ContentFragment.java
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/PresentationServerImpl.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/PresentationServerImpl.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/ContentHandler.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/markup/MarkupContent.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/markup/MarkupContentHandler.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/portlet/PortletContentHandler.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java
Log:
rename WindowContent to ContentFragment
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java 2008-06-09
09:23:18 UTC (rev 10951)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java 2008-06-09
09:27:51 UTC (rev 10952)
@@ -36,7 +36,7 @@
import org.jboss.portal.presentation.model.ui.UIObject;
import org.jboss.portal.presentation.model.ViewPort;
import org.jboss.portal.presentation.model.ViewPortScope;
-import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.model.content.ContentFragment;
import org.jboss.portal.presentation.model.ui.UIContext;
import org.jboss.portal.presentation.model.ui.UIPage;
import org.jboss.portal.presentation.model.ui.UIWindow;
@@ -249,7 +249,7 @@
if(navState.isStale(object.getId()) ||
this.req.getAttribute(Constants.forceRender)!=null)
{
- WindowContent content = server.renderWindow(this, object.getId());
+ ContentFragment content = server.renderWindow(this, object.getId());
clientWindow.setContent(content.getMarkup());
}
Modified:
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/PresentationServerImpl.java
===================================================================
---
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/PresentationServerImpl.java 2008-06-09
09:23:18 UTC (rev 10951)
+++
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/PresentationServerImpl.java 2008-06-09
09:27:51 UTC (rev 10952)
@@ -30,7 +30,7 @@
import org.jboss.portal.presentation.impl.state.structural.StructuralNode;
import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
import org.jboss.portal.presentation.impl.state.structural.WindowNode;
-import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.model.content.ContentFragment;
import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
import org.jboss.portal.presentation.protocol.ErrorResponse;
import org.jboss.portal.presentation.protocol.ProtocolAction;
@@ -69,7 +69,7 @@
/**
*
*/
- public WindowContent renderWindow(PresentationClient client, String windowId) throws
PresentationServerException
+ public ContentFragment renderWindow(PresentationClient client, String windowId) throws
PresentationServerException
{
StructuralNode node = structuralStateContext.getNode(windowId);
@@ -77,7 +77,7 @@
if (node instanceof WindowNode)
{
WindowNode window = (WindowNode)node;
- return new WindowContent(0, "Window " + window.getName(),
window.getContent());
+ return new ContentFragment(0, "Window " + window.getName(),
window.getContent());
}
else
{
Modified:
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
===================================================================
---
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-06-09
09:23:18 UTC (rev 10951)
+++
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-06-09
09:27:51 UTC (rev 10952)
@@ -42,7 +42,7 @@
import org.jboss.portal.presentation.model.layout.Layout;
import org.jboss.portal.presentation.model.layout.SimpleLayout;
import org.jboss.portal.presentation.model.layout.Orientation;
-import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.model.content.ContentFragment;
import org.jboss.portal.presentation.model.ui.UIContext;
import org.jboss.portal.presentation.model.ui.UIPage;
import org.jboss.portal.presentation.model.ui.UIWindow;
@@ -293,7 +293,7 @@
{
try
{
- WindowContent content = server.renderWindow(this, object.getId());
+ ContentFragment content = server.renderWindow(this, object.getId());
//
writer.print("<li class=\"element\">");
Modified:
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/PresentationServerImpl.java
===================================================================
---
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/PresentationServerImpl.java 2008-06-09
09:23:18 UTC (rev 10951)
+++
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/PresentationServerImpl.java 2008-06-09
09:27:51 UTC (rev 10952)
@@ -35,7 +35,7 @@
import org.jboss.portal.presentation.portal.content.ContentHandler;
import org.jboss.portal.presentation.portal.content.PageContentContext;
import org.jboss.portal.presentation.portal.content.WindowContentContext;
-import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.model.content.ContentFragment;
import org.jboss.portal.presentation.protocol.ErrorResponse;
import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
@@ -86,7 +86,7 @@
return structuralStateContext;
}
- public WindowContent renderWindow(PresentationClient client, String windowId) throws
PresentationServerException
+ public ContentFragment renderWindow(PresentationClient client, String windowId) throws
PresentationServerException
{
ObjectElement element = (ObjectElement)structuralAdapter.getNode(windowId);
Modified:
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/ContentHandler.java
===================================================================
---
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/ContentHandler.java 2008-06-09
09:23:18 UTC (rev 10951)
+++
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/ContentHandler.java 2008-06-09
09:27:51 UTC (rev 10952)
@@ -22,8 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.portal.content;
-import org.jboss.portal.presentation.model.content.WindowContent;
-import org.jboss.portal.presentation.portal.model.object.WindowNode;
+import org.jboss.portal.presentation.model.content.ContentFragment;
import org.jboss.portal.presentation.portal.content.protocol.ContentAction;
import org.jboss.portal.presentation.client.PresentationClient;
import org.jboss.portal.presentation.server.PresentationServerException;
@@ -38,6 +37,6 @@
ProtocolResponse process(WindowContentContext windowContentContext, PresentationClient
client, ContentAction action) throws PresentationServerException;
- WindowContent render(WindowContentContext windowContentContext, PresentationClient
client) throws PresentationServerException;
+ ContentFragment render(WindowContentContext windowContentContext, PresentationClient
client) throws PresentationServerException;
}
Modified:
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/markup/MarkupContent.java
===================================================================
---
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/markup/MarkupContent.java 2008-06-09
09:23:18 UTC (rev 10951)
+++
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/markup/MarkupContent.java 2008-06-09
09:27:51 UTC (rev 10952)
@@ -23,10 +23,6 @@
package org.jboss.portal.presentation.portal.content.markup;
import org.jboss.portal.presentation.portal.model.object.WindowNode;
-import org.jboss.portal.presentation.model.content.WindowContent;
-import org.jboss.portal.presentation.client.PresentationClient;
-import org.jboss.portal.presentation.server.PresentationServerException;
-import org.jboss.portal.portlet.PortletInvoker;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
Modified:
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/markup/MarkupContentHandler.java
===================================================================
---
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/markup/MarkupContentHandler.java 2008-06-09
09:23:18 UTC (rev 10951)
+++
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/markup/MarkupContentHandler.java 2008-06-09
09:27:51 UTC (rev 10952)
@@ -25,7 +25,7 @@
import org.jboss.portal.presentation.portal.content.ContentHandler;
import org.jboss.portal.presentation.portal.content.WindowContentContext;
import org.jboss.portal.presentation.portal.content.protocol.ContentAction;
-import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.model.content.ContentFragment;
import org.jboss.portal.presentation.client.PresentationClient;
import org.jboss.portal.presentation.server.PresentationServerException;
import org.jboss.portal.presentation.protocol.ProtocolResponse;
@@ -42,9 +42,9 @@
throw new UnsupportedOperationException();
}
- public WindowContent render(WindowContentContext windowContentContext,
PresentationClient client) throws PresentationServerException
+ public ContentFragment render(WindowContentContext windowContentContext,
PresentationClient client) throws PresentationServerException
{
String markup = ((MarkupContent)windowContentContext.getContent()).getMarkup();
- return new WindowContent(0, "blah", markup);
+ return new ContentFragment(0, "blah", markup);
}
}
Modified:
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/portlet/PortletContentHandler.java
===================================================================
---
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/portlet/PortletContentHandler.java 2008-06-09
09:23:18 UTC (rev 10951)
+++
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/portlet/PortletContentHandler.java 2008-06-09
09:27:51 UTC (rev 10952)
@@ -29,11 +29,10 @@
import
org.jboss.portal.presentation.portal.content.portlet.controller.PresentationPortletPageNavigationalState;
import
org.jboss.portal.presentation.portal.content.portlet.controller.PresentationPageContext;
import
org.jboss.portal.presentation.portal.content.portlet.protocol.PortletContainerAction;
-import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.model.content.ContentFragment;
import org.jboss.portal.presentation.client.PresentationClient;
import org.jboss.portal.presentation.server.PresentationServerException;
import org.jboss.portal.presentation.protocol.ProtocolResponse;
-import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
import org.jboss.portal.portlet.controller.PortletController;
import org.jboss.portal.portlet.controller.response.ControllerResponse;
import org.jboss.portal.portlet.controller.response.PageUpdateResponse;
@@ -146,7 +145,7 @@
return null;
}
- public WindowContent render(WindowContentContext windowContentContext,
PresentationClient client) throws PresentationServerException
+ public ContentFragment render(WindowContentContext windowContentContext,
PresentationClient client) throws PresentationServerException
{
try
{
@@ -171,11 +170,11 @@
if (response instanceof FragmentResponse)
{
FragmentResponse fragment = (FragmentResponse)response;
- return new WindowContent(0, fragment.getTitle(), fragment.getContent());
+ return new ContentFragment(0, fragment.getTitle(), fragment.getContent());
}
else
{
- return new WindowContent(0, "Unexpected response for window " +
windowContentContext.getId(), "");
+ return new ContentFragment(0, "Unexpected response for window " +
windowContentContext.getId(), "");
}
}
catch (PortletInvokerException e)
Copied:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/ContentFragment.java
(from rev 10942,
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/WindowContent.java)
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/ContentFragment.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/ContentFragment.java 2008-06-09
09:27:51 UTC (rev 10952)
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.content;
+
+/**
+ * The content of a window.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ContentFragment
+{
+
+ /** . */
+ private final long expirationMillis;
+
+ /** . */
+ private final String title;
+
+ /** . */
+ private final String markup;
+
+
+ public ContentFragment(long expirationMillis, String title, String markup)
+ {
+ this.expirationMillis = expirationMillis;
+ this.title = title;
+ this.markup = markup;
+ }
+
+ public long getExpirationMillis()
+ {
+ return expirationMillis;
+ }
+
+ public String getTitle()
+ {
+ return title;
+ }
+
+ public String getMarkup()
+ {
+ return markup;
+ }
+}
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java 2008-06-09
09:23:18 UTC (rev 10951)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java 2008-06-09
09:27:51 UTC (rev 10952)
@@ -23,8 +23,7 @@
package org.jboss.portal.presentation.server;
import org.jboss.portal.presentation.client.PresentationClient;
-import org.jboss.portal.presentation.model.content.WindowContent;
-import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.presentation.model.content.ContentFragment;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
/**
@@ -36,7 +35,7 @@
StructuralStateContext getStructuralStateContext();
- WindowContent renderWindow(PresentationClient client, String windowId) throws
PresentationServerException;
+ ContentFragment renderWindow(PresentationClient client, String windowId) throws
PresentationServerException;
PresentationResponse process(PresentationClient client, PresentationRequest request)
throws PresentationServerException;