Author: julien(a)jboss.com
Date: 2008-04-17 09:21:54 -0400 (Thu, 17 Apr 2008)
New Revision: 10618
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationClient.java
Removed:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/
Modified:
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java
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/portlet/spi/PresentationServerContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java
Log:
move PresentationClient to client package now that it is available
Modified:
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java
===================================================================
---
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java 2008-04-17
12:48:35 UTC (rev 10617)
+++
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java 2008-04-17
13:21:54 UTC (rev 10618)
@@ -33,7 +33,7 @@
import org.jboss.portal.presentation.protocol.ErrorResponse;
import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
import org.jboss.portal.presentation.model.content.WindowContent;
-import org.jboss.portal.presentation.client2.PresentationClient;
+import org.jboss.portal.presentation.client.PresentationClient;
import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
import org.jboss.portal.presentation.impl.state.structural.StructuralNode;
import org.jboss.portal.presentation.impl.state.structural.WindowNode;
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-04-17
12:48:35 UTC (rev 10617)
+++
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-17
13:21:54 UTC (rev 10618)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.classic;
-import org.jboss.portal.presentation.client2.PresentationClient;
+import org.jboss.portal.presentation.client.PresentationClient;
import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.classic.model.DefaultPageViewPortScope;
Modified:
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationServerContext.java
===================================================================
---
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationServerContext.java 2008-04-17
12:48:35 UTC (rev 10617)
+++
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationServerContext.java 2008-04-17
13:21:54 UTC (rev 10618)
@@ -26,7 +26,7 @@
import org.jboss.portal.web.ServletContainer;
import org.jboss.portal.web.RequestDispatchCallback;
import org.jboss.portal.web.ServletContextDispatcher;
-import org.jboss.portal.presentation.client2.PresentationClient;
+import org.jboss.portal.presentation.client.PresentationClient;
import javax.servlet.ServletContext;
Copied:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationClient.java
(from rev 10617,
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java)
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationClient.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationClient.java 2008-04-17
13:21:54 UTC (rev 10618)
@@ -0,0 +1,76 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.client;
+
+import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.portlet.URLFormat;
+import org.jboss.portal.web.ServletContextDispatcher;
+
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * The contract that defines the services that the client provides to the server during a
presentation server invocation.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface PresentationClient
+{
+
+ /**
+ * Renders the provided action as an hyperlink.
+ *
+ * @param action the action to render
+ * @param format the url format
+ * @return the rendered url
+ * @throws IllegalArgumentException if the action is null or cannot be rendered
+ */
+ String renderURL(ProtocolAction action, URLFormat format) throws
IllegalArgumentException;
+
+ /**
+ * Renders the provided action as an hyperlink.
+ *
+ * @param writer the writer
+ * @param action the action to render
+ * @param format the url format
+ * @throws IllegalArgumentException if the action is null or cannot be rendered
+ * @throws IOException any IOException thrown by the writer
+ */
+ void renderURL(Writer writer, ProtocolAction action, URLFormat format) throws
IOException;
+
+ /**
+ * Returns the navigational state context provided by the client.
+ *
+ * @return the navigational state context
+ */
+ NavigationalStateContext getNavigationalStateContext();
+
+ /**
+ * Returns the servlet context dispatcher.
+ *
+ * @return the servlet context dispatcher
+ */
+ ServletContextDispatcher getDispatcher();
+}
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java 2008-04-17
12:48:35 UTC (rev 10617)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java 2008-04-17
13:21:54 UTC (rev 10618)
@@ -24,7 +24,7 @@
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.model.content.WindowContent;
-import org.jboss.portal.presentation.client2.PresentationClient;
+import org.jboss.portal.presentation.client.PresentationClient;
import org.jboss.portal.presentation.protocol.ProtocolAction;
/**