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 dd...@apache.org on 2005/10/27 17:18:12 UTC
svn commit: r328893 - in /portals/pluto/branches/pluto-1.1:
pluto-container/src/main/java/org/apache/pluto/core/
pluto-container/src/main/java/org/apache/pluto/services/ pluto-portal/
Author: ddewolf
Date: Thu Oct 27 08:18:03 2005
New Revision: 328893
URL: http://svn.apache.org/viewcvs?rev=328893&view=rev
Log:
Finishing refactoring. Adding new services
Added:
portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalServices.java
portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/services/OptionalPortletContainerServices.java
portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/services/PortalCallbackService.java
portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/services/PortletPreferencesService.java
Modified:
portals/pluto/branches/pluto-1.1/pluto-portal/pom.xml
Added: portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalServices.java
URL: http://svn.apache.org/viewcvs/portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalServices.java?rev=328893&view=auto
==============================================================================
--- portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalServices.java (added)
+++ portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalServices.java Thu Oct 27 08:18:03 2005
@@ -0,0 +1,80 @@
+/*
+ * Copyright 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.core;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequest;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.pluto.PortletContainer;
+import org.apache.pluto.PortletContainerException;
+import org.apache.pluto.PortletWindow;
+import org.apache.pluto.core.impl.ActionRequestImpl;
+import org.apache.pluto.core.impl.ActionResponseImpl;
+import org.apache.pluto.core.impl.RenderRequestImpl;
+import org.apache.pluto.core.impl.RenderResponseImpl;
+import org.apache.pluto.services.PortletContainerServices;
+import org.apache.pluto.services.PortletURLProvider;
+import org.apache.pluto.services.OptionalPortletContainerServices;
+import org.apache.pluto.services.PortletPreferencesService;
+
+/**
+ * Default Optional Services implementation.
+ *
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Sep 18, 2004
+ */
+public class DefaultOptionalServices implements OptionalPortletContainerServices {
+
+ private static final Log LOG =
+ LogFactory.getLog(DefaultOptionalServices.class);
+
+ private PortletPreferencesService preferenceService;
+
+ public DefaultOptionalServices() {
+ this.preferenceService = new PortletPreferencesServiceImpl();
+ }
+
+
+ public PortletPreferencesService getPortletPreferencesService() {
+ return preferenceService;
+ }
+
+ public class PortletPreferencesServiceImpl
+ implements PortletPreferencesService {
+
+ public PortletPreference[] getStoredPreferences(PortletWindow window,
+ PortletRequest req)
+ throws PortletContainerException {
+ return new PortletPreference[0];
+ }
+
+ public void store(PortletWindow window,
+ PortletRequest req,
+ PortletPreference[] preferences) throws PortletContainerException {
+
+ }
+ }
+}
+
Added: portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/services/OptionalPortletContainerServices.java
URL: http://svn.apache.org/viewcvs/portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/services/OptionalPortletContainerServices.java?rev=328893&view=auto
==============================================================================
--- portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/services/OptionalPortletContainerServices.java (added)
+++ portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/services/OptionalPortletContainerServices.java Thu Oct 27 08:18:03 2005
@@ -0,0 +1,16 @@
+package org.apache.pluto.services;
+
+import javax.portlet.PortalContext;
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Defines the services necessary for integration between the Pluto Container
+ * and a Portal.
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ */
+public interface OptionalPortletContainerServices {
+
+ PortletPreferencesService getPortletPreferencesService();
+
+
+}
Added: portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/services/PortalCallbackService.java
URL: http://svn.apache.org/viewcvs/portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/services/PortalCallbackService.java?rev=328893&view=auto
==============================================================================
--- portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/services/PortalCallbackService.java (added)
+++ portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/services/PortalCallbackService.java Thu Oct 27 08:18:03 2005
@@ -0,0 +1,70 @@
+/*
+ * Copyright 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.services;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.pluto.PortletWindow;
+
+import java.util.Map;
+
+/**
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Sep 21, 2004
+ */
+public interface PortalCallbackService extends ContainerService {
+
+ /**
+ * Set the title to be used for this portlet.
+ * @param request
+ * @param window
+ * @param title
+ */
+ public void setTitle(HttpServletRequest request,
+ PortletWindow window,
+ String title);
+
+ /**
+ * Returns an URL pointing to the given portlet window
+ * @param portletWindow the portlet Window
+ * @return the URL to the given portlet
+ */
+ public PortletURLProvider getPortletURLProvider(HttpServletRequest req,
+ PortletWindow portletWindow);
+
+ /**
+ * Returns the ResourceURLProvider to create URLs pointing to a resource in
+ * a web application.
+ * @param portletWindow the portlet Window
+ * @return the URL to a resource
+ */
+ public ResourceURLProvider getResourceURLProvider(HttpServletRequest req,
+ PortletWindow portletWindow);
+
+ public Map getRequestProperties(HttpServletRequest req,
+ PortletWindow portletWindow);
+
+ public void setResponseProperty(HttpServletRequest req,
+ PortletWindow window,
+ String property, String value);
+
+ public void addResponseProperty(HttpServletRequest req,
+ PortletWindow window,
+ String property, String value);
+
+}
Added: portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/services/PortletPreferencesService.java
URL: http://svn.apache.org/viewcvs/portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/services/PortletPreferencesService.java?rev=328893&view=auto
==============================================================================
--- portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/services/PortletPreferencesService.java (added)
+++ portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/services/PortletPreferencesService.java Thu Oct 27 08:18:03 2005
@@ -0,0 +1,39 @@
+/*
+ * 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.services;
+
+import javax.portlet.PortletRequest;
+
+import org.apache.pluto.PortletWindow;
+import org.apache.pluto.PortletContainerException;
+import org.apache.pluto.core.PortletPreference;
+
+public interface PortletPreferencesService extends ContainerService {
+
+ PortletPreference[] getStoredPreferences(PortletWindow window,
+ PortletRequest req)
+ throws PortletContainerException;
+
+ void store(PortletWindow window,
+ PortletRequest req,
+ PortletPreference[] preferences)
+ throws PortletContainerException;
+
+}
Modified: portals/pluto/branches/pluto-1.1/pluto-portal/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/branches/pluto-1.1/pluto-portal/pom.xml?rev=328893&r1=328892&r2=328893&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1/pluto-portal/pom.xml (original)
+++ portals/pluto/branches/pluto-1.1/pluto-portal/pom.xml Thu Oct 27 08:18:03 2005
@@ -16,6 +16,24 @@
<artifactId>pluto-portal-driver</artifactId>
<version>${pom.version}</version>
<scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.xerces</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commmons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
<build>