You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by cd...@apache.org on 2006/10/26 14:01:22 UTC
svn commit: r467969 - in /portals/pluto/branches/1.1-286-COMPATIBILITY:
pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/
pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/
pluto-portal-driver/src/...
Author: cdoremus
Date: Thu Oct 26 05:01:21 2006
New Revision: 467969
URL: http://svn.apache.org/viewvc?view=rev&rev=467969
Log:
Implementations for JSR-286 support. Some methods are stubbed out and throw an UnsupportedOperationException to make sure we don't forget about them.
Modified:
portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java
portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AboutPortlet.java
portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminPortlet.java
portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java
portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestPortlet.java
Modified: portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java?view=diff&rev=467969&r1=467968&r2=467969
==============================================================================
--- portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java (original)
+++ portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java Thu Oct 26 05:01:21 2006
@@ -54,6 +54,14 @@
public void setWindowState(WindowState state) {
url.setWindowState(window, state);
}
+
+ public void setResourceServing(boolean resourceServing) {
+ if (resourceServing) {
+ url.setResourceWindow(window);
+ } else {
+ url.setResourceWindow(null);
+ }
+ }
public void setAction(boolean action) {
if (action) {
Modified: portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java?view=diff&rev=467969&r1=467968&r2=467969
==============================================================================
--- portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java (original)
+++ portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java Thu Oct 26 05:01:21 2006
@@ -41,6 +41,7 @@
private String servletPath = null;
private String renderPath = null;
private String actionWindow = null;
+ private String resourceWindow = null;
/** The window states: key is the window ID, value is WindowState. */
private Map windowStates = new HashMap();
@@ -127,6 +128,14 @@
public String getActionWindow() {
return actionWindow;
}
+
+ public String getResourceWindow() {
+ return resourceWindow;
+ }
+
+ public void setResourceWindow(String resourceWindow) {
+ this.resourceWindow = resourceWindow;
+ }
public Map getPortletModes() {
return Collections.unmodifiableMap(portletModes);
Modified: portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AboutPortlet.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AboutPortlet.java?view=diff&rev=467969&r1=467968&r2=467969
==============================================================================
--- portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AboutPortlet.java (original)
+++ portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AboutPortlet.java Thu Oct 26 05:01:21 2006
@@ -23,6 +23,8 @@
import javax.portlet.PortletRequestDispatcher;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
/**
* The pluto portal driver about portlet.
@@ -60,6 +62,12 @@
context.getRequestDispatcher(HELP_PAGE);
requestDispatcher.include(request, response);
}
+
+ public void serveResource(ResourceRequest arg0, ResourceResponse arg1) throws PortletException, IOException {
+ // TODO Auto-generated method stub
+ throw new UnsupportedOperationException("This method needs to be implemented.");
+
+ }
}
Modified: portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminPortlet.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminPortlet.java?view=diff&rev=467969&r1=467968&r2=467969
==============================================================================
--- portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminPortlet.java (original)
+++ portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminPortlet.java Thu Oct 26 05:01:21 2006
@@ -23,6 +23,8 @@
import javax.portlet.PortletRequestDispatcher;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
public class AdminPortlet extends GenericPortlet {
@@ -55,5 +57,10 @@
context.getRequestDispatcher(HELP_PAGE);
requestDispatcher.include(request, response);
}
+
+ public void serveResource(ResourceRequest arg0, ResourceResponse arg1) throws PortletException, IOException {
+ // TODO Auto-generated method stub
+ throw new UnsupportedOperationException("This method needs to be implemented.");
+ }
}
Modified: portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java?view=diff&rev=467969&r1=467968&r2=467969
==============================================================================
--- portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java (original)
+++ portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java Thu Oct 26 05:01:21 2006
@@ -1,49 +1,67 @@
-package org.apache.pluto.driver.url;
-
-import javax.portlet.PortletMode;
-import javax.portlet.WindowState;
-import java.util.Collection;
-import java.util.Map;
-
-/**
- * Created by IntelliJ IDEA.
- * User: ddewolf
- * Date: Sep 4, 2006
- * Time: 5:17:34 PM
- * To change this template use File | Settings | File Templates.
- */
-public interface PortalURL extends Cloneable {
- void setRenderPath(String renderPath);
-
- String getRenderPath();
-
- void addParameter(PortalURLParameter param);
-
- Collection getParameters();
-
- void setActionWindow(String actionWindow);
-
- String getActionWindow();
-
- Map getPortletModes();
-
- PortletMode getPortletMode(String windowId);
-
- void setPortletMode(String windowId, PortletMode portletMode);
-
- Map getWindowStates();
-
- WindowState getWindowState(String windowId);
-
- void setWindowState(String windowId, WindowState windowState);
-
- void clearParameters(String windowId);
-
- String toString();
-
- String getServerURI();
-
- String getServletPath();
-
- Object clone();
-}
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.pluto.driver.url;
+
+import javax.portlet.PortletMode;
+import javax.portlet.WindowState;
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: ddewolf
+ * Date: Sep 4, 2006
+ * Time: 5:17:34 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface PortalURL extends Cloneable {
+ void setRenderPath(String renderPath);
+
+ String getRenderPath();
+
+ void addParameter(PortalURLParameter param);
+
+ Collection getParameters();
+
+ void setActionWindow(String actionWindow);
+
+ String getActionWindow();
+
+ Map getPortletModes();
+
+ PortletMode getPortletMode(String windowId);
+
+ void setPortletMode(String windowId, PortletMode portletMode);
+
+ Map getWindowStates();
+
+ WindowState getWindowState(String windowId);
+
+ void setWindowState(String windowId, WindowState windowState);
+
+ void clearParameters(String windowId);
+
+ String toString();
+
+ String getServerURI();
+
+ String getServletPath();
+
+ Object clone();
+
+ void setResourceWindow(String window);
+}
Modified: portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestPortlet.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestPortlet.java?view=diff&rev=467969&r1=467968&r2=467969
==============================================================================
--- portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestPortlet.java (original)
+++ portals/pluto/branches/1.1-286-COMPATIBILITY/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestPortlet.java Thu Oct 26 05:01:21 2006
@@ -24,6 +24,8 @@
import javax.portlet.PortletSession;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -285,4 +287,9 @@
// Return the current test ID.
return testId;
}
+
+ public void serveResource(ResourceRequest arg0, ResourceResponse arg1) throws PortletException, IOException {
+ // TODO Auto-generated method stub
+ throw new UnsupportedOperationException("This method needs to be implemented.");
+ }
}