portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r755263 [3/4] - in /portals/jetspeed-2/portal/trunk: components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/ components/jetspeed-portal/src/main/java/org...
Date Tue, 17 Mar 2009 14:23:55 GMT
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java Tue Mar 17 14:23:52 2009
@@ -63,20 +63,27 @@
         {
             request.setAttribute(PortalReservedParameters.PIPELINE, PortalReservedParameters.LOGIN_PIPELINE);
             Engine engine = Jetspeed.getEngine();
+            RequestContextComponent contextComponent = null;
+            RequestContext context = null;
             try
             {
-                RequestContextComponent contextComponent = (RequestContextComponent) Jetspeed.getComponentManager()
-                        .getComponent(RequestContextComponent.class);
-                RequestContext context = contextComponent.create(request, response, getServletConfig());
+                contextComponent = (RequestContextComponent) Jetspeed.getComponentManager().getComponent(RequestContextComponent.class);
+                context = contextComponent.create(request, response, getServletConfig());
                 engine.service(context);
-                contextComponent.release(context);
-            }
+            }            
             catch (JetspeedException e)
             {
                 log.warn("Jetspeed engine does not work properly.", e);
                 // forward to JetspeedServlet 
                 response.sendRedirect(response.encodeURL(request.getContextPath() + "/"));
             }
+            finally
+            {
+                if (contextComponent != null)
+                {
+                    contextComponent.release(context);
+                }
+            }
         }
         else
         {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/manager/ManagerServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/manager/ManagerServlet.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/manager/ManagerServlet.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/manager/ManagerServlet.java Tue Mar 17 14:23:52 2009
@@ -166,7 +166,7 @@
         while (iter.hasNext())
         {
             pa = (PortletApplication) iter.next();
-            writer.println(pa.getName() + ":" + pa.getContextRoot()
+            writer.println(pa.getName() + ":" + pa.getContextPath()
                            + ":" + (portletFactory.isPortletApplicationRegistered(pa) ? "ACTIVE" : "INACTIVE"));
         }
         return OK;
@@ -203,7 +203,7 @@
         {
             try
             {
-                ApplicationServerManagerResult result = asm.start(pa.getContextRoot());
+                ApplicationServerManagerResult result = asm.start(pa.getContextPath());
                 if (result.isOk())
                 {
                     writer.println("Portlet Application " + paName + " started");
@@ -257,7 +257,7 @@
         {
             try
             {
-                ApplicationServerManagerResult result = asm.stop(pa.getContextRoot());
+                ApplicationServerManagerResult result = asm.stop(pa.getContextPath());
                 if (result.isOk())
                 {
                     writer.println("Portlet Application " + paName + " stopped");
@@ -296,7 +296,7 @@
         PortletApplication pa = registry.getPortletApplication(paName);
         try
         {
-            ApplicationServerManagerResult result = asm.undeploy(pa.getContextRoot());
+            ApplicationServerManagerResult result = asm.undeploy(pa.getContextPath());
             if (result.isOk())
             {
                 writer.println("Portlet Application " + paName + " undeployed");

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/ActionValveImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/ActionValveImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/ActionValveImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/ActionValveImpl.java Tue Mar 17 14:23:52 2009
@@ -46,8 +46,8 @@
 import org.apache.jetspeed.pipeline.valve.ActionValve;
 import org.apache.jetspeed.pipeline.valve.ValveContext;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.pluto.PortletContainer;
-import org.apache.pluto.PortletContainerException;
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.PortletContainerException;
 
 /**
  * <p>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java Tue Mar 17 14:23:52 2009
@@ -35,6 +35,7 @@
 import org.apache.jetspeed.aggregator.ContentDispatcherCtrl;
 import org.apache.jetspeed.capabilities.CapabilityMap;
 import org.apache.jetspeed.container.PortletWindow;
+import org.apache.jetspeed.container.PortletWindowID;
 import org.apache.jetspeed.container.url.PortalURL;
 import org.apache.jetspeed.engine.servlet.ServletRequestFactory;
 import org.apache.jetspeed.engine.servlet.ServletResponseFactory;
@@ -85,9 +86,10 @@
     private PortletWindow actionWindow;
     private String encoding;
     private String requestPath = null;
-    private Map requestsForWindows;
-    private Map responsesForWindows;
+    private Map<PortletWindowID, HttpServletRequest> requestsForWindows;
+    private Map<PortletWindowID, HttpServletResponse> responsesForWindows;
     private final Map<String, Object> objects;
+    private final Map<PortletWindowID, Map<String, Object>> portletWindowAttributesMap;
     
     /**
      * Create a new Request Context
@@ -109,9 +111,10 @@
         this.response = response;
         this.config = config;
         this.session = request.getSession();
-        this.requestsForWindows = new HashMap();
-        this.responsesForWindows = new HashMap();
+        this.requestsForWindows = new HashMap<PortletWindowID, HttpServletRequest>();
+        this.responsesForWindows = new HashMap<PortletWindowID, HttpServletResponse>();
         this.objects = objects;
+        this.portletWindowAttributesMap = new HashMap<PortletWindowID,Map<String, Object>>();
 
         // set context in Request for later use
         if (null != this.request)
@@ -415,11 +418,6 @@
         return request.getParameter(key);
     }
     
-    public void setRequestParameter(String key, String value)
-    {
-        request.getParameterMap().put(key, value);
-    }
-
     /**
      * @see org.apache.jetspeed.request.RequestContext#getParameterMap()
      */
@@ -507,7 +505,7 @@
      * getPreferedLanguage
      * </p>
      * 
-     * @see org.apache.jetspeed.request.RequestContext#getPreferedLanguage(org.apache.pluto.om.portlet.PortletDefinition)
+     * @see org.apache.jetspeed.request.RequestContext#getPreferedLanguage(org.apache.pluto.container.om.portlet.PortletDefinition)
      * @param portlet
      * @return
      */
@@ -653,4 +651,20 @@
     {
         return objects;
     }
+    
+    public synchronized Map<String, Object> getPortletWindowAttributes(PortletWindow window)
+    {
+        Map<String, Object> attributes = portletWindowAttributesMap.get(window.getId());
+        if (attributes == null)
+        {
+            attributes = new HashMap<String, Object>();
+            attributes.put(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE, this);
+            if (getObjects() != null)
+            {
+                attributes.put(PortalReservedParameters.REQUEST_CONTEXT_OBJECTS, getObjects());
+            }
+            portletWindowAttributesMap.put(window.getId(), attributes);
+        }
+        return attributes;
+    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/resource/ResourceValveImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/resource/ResourceValveImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/resource/ResourceValveImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/resource/ResourceValveImpl.java Tue Mar 17 14:23:52 2009
@@ -35,8 +35,8 @@
 import org.apache.jetspeed.pipeline.valve.AbstractValve;
 import org.apache.jetspeed.pipeline.valve.ValveContext;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.pluto.PortletContainer;
-import org.apache.pluto.PortletContainerException;
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.PortletContainerException;
 import org.apache.jetspeed.container.PortletWindow;
 
 /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java Tue Mar 17 14:23:52 2009
@@ -310,7 +310,7 @@
 
 			if (paType == PortletApplication.LOCAL)
 			{
-				pa.setContextRoot("<portal>");
+				pa.setContextPath("<portal>");
 			}
 
             // Make sure existing entities are refreshed with the most

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java Tue Mar 17 14:23:52 2009
@@ -18,7 +18,6 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.Iterator;
 import java.util.Map;
 
@@ -31,8 +30,8 @@
 import org.apache.jetspeed.om.portlet.UserAttributeRef;
 import org.apache.jetspeed.om.portlet.impl.UserAttributeRefImpl;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.pluto.PortletContainerException;
-import org.apache.pluto.PortletWindow;
+import org.apache.pluto.container.PortletContainerException;
+import org.apache.pluto.container.PortletWindow;
 
 /**
  * <p> Common user info management support

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletApplicationWar.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletApplicationWar.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletApplicationWar.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletApplicationWar.java Tue Mar 17 14:23:52 2009
@@ -41,7 +41,7 @@
 import org.apache.jetspeed.util.DirectoryHelper;
 import org.apache.jetspeed.util.FileSystemHelper;
 import org.apache.jetspeed.util.MultiFileChecksumHelper;
-import org.apache.pluto.om.portlet.SecurityRoleRef;
+import org.apache.pluto.container.om.portlet.SecurityRoleRef;
 
 /**
  * <p>
@@ -162,10 +162,10 @@
         }
         try
         {
-            portletApp = descriptorService.read(webXmlStream, portletXmlStream, extStream, classLoader);
+            portletApp = descriptorService.read(paName, webAppContextRoot, webXmlStream, portletXmlStream, extStream, classLoader);
             validate();
             portletApp.setName(paName);
-            portletApp.setContextRoot(webAppContextRoot);
+            portletApp.setContextPath(webAppContextRoot);
             portletApp.setChecksum(paChecksum);
             return portletApp;
         }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedVelocityViewServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedVelocityViewServlet.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedVelocityViewServlet.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedVelocityViewServlet.java Tue Mar 17 14:23:52 2009
@@ -42,6 +42,7 @@
 import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.capabilities.CapabilityMap;
 import org.apache.jetspeed.components.ComponentManager;
+import org.apache.jetspeed.container.ContainerConstants;
 import org.apache.jetspeed.desktop.JetspeedDesktopContext;
 import org.apache.jetspeed.locator.LocatorDescriptor;
 import org.apache.jetspeed.locator.TemplateDescriptor;
@@ -50,7 +51,6 @@
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.pluto.Constants;
 import org.apache.portals.bridges.velocity.BridgesVelocityViewServlet;
 import org.apache.velocity.Template;
 import org.apache.velocity.app.VelocityEngine;
@@ -260,9 +260,9 @@
             return super.handleRequest(request, response, ctx);            
         }
         // configure velocity context
-        PortletRequest renderRequest = (PortletRequest) request.getAttribute(Constants.PORTLET_REQUEST);
-        RenderResponse renderResponse = (RenderResponse) request.getAttribute(Constants.PORTLET_RESPONSE);
-        PortletConfig portletConfig = (PortletConfig) request.getAttribute(Constants.PORTLET_CONFIG);
+        PortletRequest renderRequest = (PortletRequest) request.getAttribute(ContainerConstants.PORTLET_REQUEST);
+        RenderResponse renderResponse = (RenderResponse) request.getAttribute(ContainerConstants.PORTLET_RESPONSE);
+        PortletConfig portletConfig = (PortletConfig) request.getAttribute(ContainerConstants.PORTLET_CONFIG);
         if (renderRequest != null)
         {
             renderRequest.setAttribute(VELOCITY_CONTEXT_ATTR, ctx);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractPortalContainerTestCase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractPortalContainerTestCase.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractPortalContainerTestCase.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractPortalContainerTestCase.java Tue Mar 17 14:23:52 2009
@@ -19,7 +19,7 @@
 
 import org.apache.jetspeed.container.window.PortletWindowAccessor;
 import org.apache.jetspeed.container.window.impl.PortletWindowAccessorImpl;
-import org.apache.pluto.PortletContainer;
+import org.apache.pluto.container.PortletContainer;
 
 /**
  * @author <a href="mailto:scott.t.weaver@gmail.com">Scott T. Weaver</a>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestPortletDescriptorSecurityRoles.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestPortletDescriptorSecurityRoles.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestPortletDescriptorSecurityRoles.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestPortletDescriptorSecurityRoles.java Tue Mar 17 14:23:52 2009
@@ -32,7 +32,7 @@
 import org.apache.jetspeed.om.portlet.SecurityRoleRef;
 import org.apache.jetspeed.util.DirectoryHelper;
 import org.apache.jetspeed.util.descriptor.PortletApplicationWar;
-import org.apache.pluto.descriptors.services.jaxb.PortletAppDescriptorServiceImpl;
+import org.apache.pluto.container.impl.PortletAppDescriptorServiceImpl;
 
 /**
  * TestPortletDescriptorSecurityRoles - test and validate security roles and

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/MockUserInfoManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/MockUserInfoManager.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/MockUserInfoManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/MockUserInfoManager.java Tue Mar 17 14:23:52 2009
@@ -22,8 +22,8 @@
 import javax.portlet.PortletRequest;
 
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.pluto.PortletContainerException;
-import org.apache.pluto.PortletWindow;
+import org.apache.pluto.container.PortletContainerException;
+import org.apache.pluto.container.PortletWindow;
 
 
 public class MockUserInfoManager implements UserInfoManager
@@ -34,7 +34,7 @@
     {}
     
     /* (non-Javadoc)
-     * @see org.apache.jetspeed.userinfo.UserInfoManager#getUserInfoMap(org.apache.pluto.om.common.ObjectID, org.apache.jetspeed.request.RequestContext)
+     * @see org.apache.jetspeed.userinfo.UserInfoManager#getUserInfoMap(org.apache.pluto.container.om.common.ObjectID, org.apache.jetspeed.request.RequestContext)
      */
     public Map<String, String> getUserInfoMap(String appName, RequestContext context)
     {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java Tue Mar 17 14:23:52 2009
@@ -21,7 +21,6 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
-import java.util.Locale;
 import java.util.Map;
 
 import javax.portlet.PortletRequest;
@@ -38,10 +37,9 @@
 import org.apache.jetspeed.security.JetspeedSubjectFactory;
 import org.apache.jetspeed.security.SecurityException;
 import org.apache.jetspeed.security.User;
-import org.apache.jetspeed.security.SecurityAttributes;
 import org.apache.jetspeed.security.UserManager;
 import org.apache.jetspeed.security.impl.UserImpl;
-import org.apache.pluto.descriptors.services.jaxb.PortletAppDescriptorServiceImpl;
+import org.apache.pluto.container.impl.PortletAppDescriptorServiceImpl;
 
 /**
  * <p>
@@ -95,12 +93,9 @@
         InputStream portletDescriptor = new FileInputStream(getBaseDir()+"src/test/testdata/deploy/portlet.xml");
         InputStream jetspeedPortletDescriptor = new FileInputStream(getBaseDir()+"src/test/testdata/deploy/jetspeed-portlet.xml");
         ClassLoader paClassLoader = Thread.currentThread().getContextClassLoader();
-        portletApp = descriptorService.read(webDescriptor, portletDescriptor, jetspeedPortletDescriptor, paClassLoader);
+        portletApp = descriptorService.read("TestRegistry", "/TestRegistry", webDescriptor, portletDescriptor, jetspeedPortletDescriptor, paClassLoader);
         assertNotNull("App is null", portletApp);
         
-        portletApp.setName("TestRegistry");
-        portletApp.setContextRoot("/TestRegistry");
-        
         // persist the app
         try
         {

Copied: portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfigImpl.java (from r754582, portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java)
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfigImpl.java?p2=portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfigImpl.java&p1=portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java&r1=754582&r2=755263&rev=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfigImpl.java Tue Mar 17 14:23:52 2009
@@ -16,16 +16,18 @@
  */
 package org.apache.jetspeed.container;
 
+import java.util.Enumeration;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Locale;
+import java.util.Map;
 import java.util.ResourceBundle;
 
 import javax.portlet.PortletConfig;
 import javax.portlet.PortletContext;
+import javax.xml.namespace.QName;
 
 import org.apache.jetspeed.om.portlet.PortletDefinition;
-import org.apache.pluto.internal.impl.PortletConfigImpl;
 
 /**
  * Implements the Portlet API Portlet Config class
@@ -35,11 +37,13 @@
  * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
  * @version $Id$
  */
-public class JetspeedPortletConfig extends PortletConfigImpl implements PortletConfig, InternalPortletConfig
+public class JetspeedPortletConfigImpl implements PortletConfig, JetspeedPortletConfig
 {
-    public JetspeedPortletConfig(InternalPortletContext portletContext, PortletDefinition portlet)
+    PortletDefinition portlet;
+    
+    public JetspeedPortletConfigImpl(JetspeedPortletContext portletContext, PortletDefinition portlet)
     {
-        super(portletContext, portlet, portlet.getApplication());
+//TODO        super(portletContext, portlet, portlet.getApplication());
     }
 
     public void setPortletDefinition(PortletDefinition pd)
@@ -53,7 +57,6 @@
         return (PortletDefinition)portlet;
     }
     
-    @Override
     public ResourceBundle getResourceBundle(Locale locale)
     {
         return getPortletDefinition().getResourceBundle(locale);
@@ -67,8 +70,89 @@
         return DUMMY_CONFIGURATION;
     }
     
-    public InternalPortletContext getPortletContext()
+    public JetspeedPortletContext getPortletContext()
+    {
+        return null; // TODO (JetspeedPortletContext)super.getPortletContext();
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletConfig#getContainerRuntimeOptions()
+     */
+    public Map<String, String[]> getContainerRuntimeOptions()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletConfig#getDefaultNamespace()
+     */
+    public String getDefaultNamespace()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletConfig#getInitParameter(java.lang.String)
+     */
+    public String getInitParameter(String name)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletConfig#getInitParameterNames()
+     */
+    public Enumeration<String> getInitParameterNames()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletConfig#getPortletName()
+     */
+    public String getPortletName()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletConfig#getProcessingEventQNames()
+     */
+    public Enumeration<QName> getProcessingEventQNames()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletConfig#getPublicRenderParameterNames()
+     */
+    public Enumeration<String> getPublicRenderParameterNames()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletConfig#getPublishingEventQNames()
+     */
+    public Enumeration<QName> getPublishingEventQNames()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletConfig#getSupportedLocales()
+     */
+    public Enumeration<Locale> getSupportedLocales()
     {
-        return (InternalPortletContext)super.getPortletContext();
+        // TODO Auto-generated method stub
+        return null;
     }
 }

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfigImpl.java
------------------------------------------------------------------------------
    cvs2svn:cvs-rev = 1.7

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfigImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfigImpl.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfigImpl.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletContextImpl.java (from r754582, portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletContext.java)
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletContextImpl.java?p2=portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletContextImpl.java&p1=portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletContext.java&r1=754582&r2=755263&rev=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletContext.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletContextImpl.java Tue Mar 17 14:23:52 2009
@@ -18,8 +18,10 @@
 
 import java.io.InputStream;
 import java.util.Collection;
+import java.util.Enumeration;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Set;
 
 import javax.portlet.PortletRequestDispatcher;
 import javax.servlet.RequestDispatcher;
@@ -31,8 +33,7 @@
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.services.JetspeedPortletServices;
 import org.apache.jetspeed.services.PortletServices;
-import org.apache.pluto.internal.impl.PortletContextImpl;
-import org.apache.pluto.om.portlet.PortletApplicationDefinition;
+import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
 
 /**
  * Implements the Portlet API Portlet Context class
@@ -42,7 +43,7 @@
  * @author <a href="mailto:david@bluesunrise.com">David Sean Taylor</a>
  * @version $Id$
  */
-public class JetspeedPortletContext extends PortletContextImpl implements InternalPortletContext
+public class JetspeedPortletContextImpl implements JetspeedPortletContext
 {
     /**
      * The path to the Local Portlet Apps directory
@@ -52,9 +53,9 @@
     protected PortletFactory factory;
     protected PortalContext portalContext;
     
-    public JetspeedPortletContext(PortalContext portalContext, ServletContext servletContext, PortletApplication application, PortletFactory factory)
+    public JetspeedPortletContextImpl(PortalContext portalContext, ServletContext servletContext, PortletApplication application, PortletFactory factory)
     {
-        super(servletContext, (PortletApplicationDefinition)application);
+// TODO        super(servletContext, (PortletApplicationDefinition)application);
         this.portalContext = portalContext;
         this.factory = factory;
     }
@@ -71,44 +72,17 @@
 
     public javax.portlet.PortletRequestDispatcher getRequestDispatcher(String path)
     {
-        String localizedPath = localizePath(path, (PortletApplication)this.portletApp);
-        RequestDispatcher rd = null;        
-        try
-        {
-            rd = servletContext.getRequestDispatcher(localizedPath);
-        }
-        catch (Exception e)
-        {
-            // Portlet API says: return null
-        }
-        if (rd != null)
-        {
-            return factory.createRequestDispatcher(rd, path);
-        }
-        return null;
+        return null;// TODO
     }
 
     public PortletRequestDispatcher getNamedDispatcher(String name)
     {
-        RequestDispatcher rd = null;
-        try
-        {
-            rd = servletContext.getNamedDispatcher(name);
-        }
-        catch (Exception e)
-        {
-            // Portlet API says: return null
-        }
-        if (rd != null)
-        {
-            return factory.createRequestDispatcher(rd);
-        }
-        return null;
+        return null;// TODO
     }
 
     public InputStream getResourceAsStream(String path)
     {
-        return servletContext.getResourceAsStream(localizePath(path, (PortletApplication)this.portletApp));
+        return null;// TODO
     }
 
     public java.lang.Object getAttribute(java.lang.String name)
@@ -123,7 +97,7 @@
             String serviceName = name.substring("cps:".length());
             
             // validate service
-            Collection<JetspeedServiceReference> validServices = ((PortletApplication)portletApp).getJetspeedServices();
+            Collection<JetspeedServiceReference> validServices = getApplicationDefinition().getJetspeedServices();
             if (null == validServices)
             {
                 return null;
@@ -145,17 +119,17 @@
             PortletServices services = JetspeedPortletServices.getSingleton();
             return services.getService(serviceName);
         }
-        return servletContext.getAttribute(name);
+        return null; //TODO return servletContext.getAttribute(name);
     }
 
     public String getRealPath(String path)
     {
-        return servletContext.getRealPath(localizePath(path, (PortletApplication)this.portletApp));
+        return null; //TODO return servletContext.getRealPath(localizePath(path, (PortletApplication)this.portletApp));
     }
 
     public java.net.URL getResource(String path) throws java.net.MalformedURLException
     {
-        return servletContext.getResource(localizePath(path, (PortletApplication)this.portletApp));
+        return null; //TODO return servletContext.getResource(localizePath(path, (PortletApplication)this.portletApp));
     }
 
     public String getServerInfo()
@@ -175,7 +149,7 @@
     
     public PortletApplication getPortletApplicationDefinition()
     {
-        return (PortletApplication)this.portletApp;
+        return null; //TODO return (PortletApplication)this.portletApp;
     }
 
     private List<String> DUMMY_CONFIGURATION = new LinkedList<String>(); // TODO: 2.2 implement
@@ -188,18 +162,130 @@
 
     public PortletApplication getApplicationDefinition()
     {
-        return (PortletApplication)this.portletApp;
+        return null; //TODO return (PortletApplication)this.portletApp;
     }
     
     public String getContextPath()
     {
-        if (getApplicationDefinition().getApplicationType() == PortletApplication.WEBAPP)
-        {
-            return super.getContextPath();
-        }
-        else
-        {
-            return portalContext.getContextPath();
-        }
+        return null; //TODO 
+//        
+//        if (getApplicationDefinition().getApplicationType() == PortletApplication.WEBAPP)
+//        {
+//            return super.getContextPath();
+//        }
+//        else
+//        {
+//            return portalContext.getContextPath();
+//        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.container.JetspeedPortletContext#getServletContext()
+     */
+    public ServletContext getServletContext()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getAttributeNames()
+     */
+    public Enumeration<String> getAttributeNames()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getContainerRuntimeOptions()
+     */
+    public Enumeration<String> getContainerRuntimeOptions()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getInitParameter(java.lang.String)
+     */
+    public String getInitParameter(String name)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getInitParameterNames()
+     */
+    public Enumeration<String> getInitParameterNames()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getMimeType(java.lang.String)
+     */
+    public String getMimeType(String file)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getPortletContextName()
+     */
+    public String getPortletContextName()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getResourcePaths(java.lang.String)
+     */
+    public Set<String> getResourcePaths(String path)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#log(java.lang.String, java.lang.Throwable)
+     */
+    public void log(String message, Throwable throwable)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#log(java.lang.String)
+     */
+    public void log(String msg)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#removeAttribute(java.lang.String)
+     */
+    public void removeAttribute(String name)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#setAttribute(java.lang.String, java.lang.Object)
+     */
+    public void setAttribute(String name, Object object)
+    {
+        // TODO Auto-generated method stub
+        
     }
+    
+    
 }

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletContextImpl.java
------------------------------------------------------------------------------
    cvs2svn:cvs-rev = 1.8

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletContextImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletContextImpl.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletContextImpl.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java Tue Mar 17 14:23:52 2009
@@ -31,14 +31,14 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jetspeed.PortalContext;
-import org.apache.jetspeed.container.InternalPortletConfig;
-import org.apache.jetspeed.container.InternalPortletContext;
 import org.apache.jetspeed.container.JetspeedPortletConfig;
 import org.apache.jetspeed.container.JetspeedPortletContext;
+import org.apache.jetspeed.container.JetspeedPortletConfigImpl;
+import org.apache.jetspeed.container.JetspeedPortletContextImpl;
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.jetspeed.portlet.PortletObjectProxy;
-import org.apache.pluto.internal.impl.PortletRequestDispatcherImpl;
+import org.apache.pluto.container.impl.PortletRequestDispatcherImpl;
 
 /**
  * <p>
@@ -299,24 +299,25 @@
                         log.error(msg, e);
                         throw new UnavailableException(msg);
                     }
-                    InternalPortletContext portletContext = new JetspeedPortletContext(portalContext, servletContext, pa, this);                    
-                    InternalPortletConfig portletConfig = new JetspeedPortletConfig(portletContext, pd); 
+                    JetspeedPortletContext portletContext = new JetspeedPortletContextImpl(portalContext, servletContext, pa, this);                    
+                    JetspeedPortletConfig portletConfig = new JetspeedPortletConfigImpl(portletContext, pd); 
                     try
                     {
                         try
                         {
                             Thread.currentThread().setContextClassLoader(paCl);
-                            portlet.init(portletConfig);
+                            //TODO portlet.init(portletConfig);
                         }
                         finally
                         {
                             Thread.currentThread().setContextClassLoader(currentContextClassLoader);
                         }
                     }
-                    catch (PortletException e1)
+                    catch (RuntimeException re)
+                    // TODO catch (PortletException e1)
                     {
-                        log.error("Failed to initialize Portlet "+pd.getPortletClass()+" for Portlet Application "+paName, e1);
-                        throw e1;
+//                        log.error("Failed to initialize Portlet "+pd.getPortletClass()+" for Portlet Application "+paName, e1);
+//                        throw e1;
                     }                   
                     if (instanceCache == null)
                     {
@@ -349,7 +350,7 @@
                 PortletInstance instance = instanceCache != null ? instanceCache.get(pd.getPortletName()) : null;
                 if (instance != null)
                 {
-                    JetspeedPortletConfig config = (JetspeedPortletConfig)instance.getConfig();
+                    JetspeedPortletConfigImpl config = (JetspeedPortletConfigImpl)instance.getConfig();
                     config.setPortletDefinition(pd);
                 }                
             }            
@@ -378,12 +379,12 @@
     public PortletRequestDispatcher createRequestDispatcher(RequestDispatcher requestDispatcher)
     {
         // return new JetspeedRequestDispatcher(requestDispatcher);
-        return new PortletRequestDispatcherImpl(requestDispatcher);
+        return null; //TODO return new PortletRequestDispatcherImpl(requestDispatcher);
     }
     
     public PortletRequestDispatcher createRequestDispatcher(RequestDispatcher requestDispatcher, String path)
     {
         // return new JetspeedRequestDispatcher(requestDispatcher);
-        return new PortletRequestDispatcherImpl(requestDispatcher, path);
+        return null; //TODO return new PortletRequestDispatcherImpl(requestDispatcher, path);
     }    
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/JetspeedPortletInstance.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/JetspeedPortletInstance.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/JetspeedPortletInstance.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/JetspeedPortletInstance.java Tue Mar 17 14:23:52 2009
@@ -27,7 +27,7 @@
 import javax.portlet.RenderResponse;
 import javax.portlet.UnavailableException;
 
-import org.apache.jetspeed.container.InternalPortletConfig;
+import org.apache.jetspeed.container.JetspeedPortletConfig;
 import org.apache.jetspeed.factory.PortletInstance;
 
 /**
@@ -40,7 +40,7 @@
 public class JetspeedPortletInstance implements PortletInstance
 {
   private Portlet portlet;
-  private InternalPortletConfig config;
+  private JetspeedPortletConfig config;
   private boolean destroyed;
   private final String portletName;
   
@@ -84,10 +84,10 @@
   public void init(PortletConfig config) throws PortletException
   {
     portlet.init(config);
-    this.config = (InternalPortletConfig)config;
+    this.config = (JetspeedPortletConfig)config;
   }
   
-  public InternalPortletConfig getConfig()
+  public JetspeedPortletConfig getConfig()
   {
       return config;
   }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/PortletFactoryInfo.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/PortletFactoryInfo.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/PortletFactoryInfo.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/PortletFactoryInfo.java Tue Mar 17 14:23:52 2009
@@ -16,15 +16,15 @@
  */
 package org.apache.jetspeed.factory;
 
-import org.apache.jetspeed.container.InternalPortletContext;
+import org.apache.jetspeed.container.JetspeedPortletContext;
 
 
 class PortletFactoryInfo
 {
     private ClassLoader classLoader;
-    private InternalPortletContext context;
+    private JetspeedPortletContext context;
 
-    PortletFactoryInfo(ClassLoader loader, InternalPortletContext context)
+    PortletFactoryInfo(ClassLoader loader, JetspeedPortletContext context)
     {
         this.classLoader = loader;
         this.context = context;
@@ -35,7 +35,7 @@
         return classLoader;
     }
     
-    public InternalPortletContext getContext()
+    public JetspeedPortletContext getContext()
     {
         return context;
     }    

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/PersistenceBrokerPortletEntityAccess.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/PersistenceBrokerPortletEntityAccess.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/PersistenceBrokerPortletEntityAccess.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/PersistenceBrokerPortletEntityAccess.java Tue Mar 17 14:23:52 2009
@@ -137,7 +137,7 @@
      * getPortletEntities
      * </p>
      * 
-     * @see org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent#getPortletEntities(org.apache.pluto.om.portlet.PortletDefinition)
+     * @see org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent#getPortletEntities(org.apache.pluto.container.om.portlet.PortletDefinition)
      * @param portletDefinition
      * @return
      */

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/JetspeedPreferenceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/JetspeedPreferenceImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/JetspeedPreferenceImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/JetspeedPreferenceImpl.java Tue Mar 17 14:23:52 2009
@@ -16,8 +16,7 @@
  */
 package org.apache.jetspeed.components.portletpreferences;
 
-import org.apache.pluto.internal.InternalPortletPreference;
-import org.apache.pluto.internal.impl.PortletPreferenceImpl;
+import org.apache.pluto.container.impl.PortletPreferenceImpl;
 
 /**
  * <p>
@@ -27,7 +26,7 @@
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  * @version $Id: $
  */
-public class JetspeedPreferenceImpl extends PortletPreferenceImpl implements InternalPortletPreference
+public class JetspeedPreferenceImpl extends PortletPreferenceImpl
 {
     public JetspeedPreferenceImpl(String name, String[] values)
     {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/JetspeedPreferencesMap.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/JetspeedPreferencesMap.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/JetspeedPreferencesMap.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/JetspeedPreferencesMap.java Tue Mar 17 14:23:52 2009
@@ -22,7 +22,7 @@
 import java.util.Set;
 
 import org.apache.jetspeed.cache.DistributedCacheObject;
-import org.apache.pluto.internal.InternalPortletPreference;
+import org.apache.pluto.container.PortletPreference;
 
 /**
  * <p>
@@ -32,17 +32,17 @@
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  * @version $Id: $
  */
-public class JetspeedPreferencesMap implements Map<String, InternalPortletPreference>, DistributedCacheObject
+public class JetspeedPreferencesMap implements Map<String, PortletPreference>, DistributedCacheObject
 {
     private static final long serialVersionUID = 1L;
     
-    private Map<String, InternalPortletPreference> map = new HashMap<String, InternalPortletPreference>();
+    private Map<String, PortletPreference> map = new HashMap<String, PortletPreference>();
     
     public JetspeedPreferencesMap()
     {
     }
 
-    public JetspeedPreferencesMap(Map<String, InternalPortletPreference> copy)
+    public JetspeedPreferencesMap(Map<String, PortletPreference> copy)
     {
         this.putAll(copy);
     }
@@ -62,12 +62,12 @@
         return map.containsValue(value);
     }
 
-    public Set<java.util.Map.Entry<String, InternalPortletPreference>> entrySet()
+    public Set<java.util.Map.Entry<String, PortletPreference>> entrySet()
     {
         return map.entrySet();
     }
 
-    public InternalPortletPreference get(Object key)
+    public PortletPreference get(Object key)
     {
         return map.get(key);
     }
@@ -82,19 +82,19 @@
         return map.keySet();
     }
 
-    public InternalPortletPreference put(String key,
-            InternalPortletPreference value)
+    public PortletPreference put(String key,
+            PortletPreference value)
     {
         return map.put(key, value);
     }
 
     public void putAll(
-            Map<? extends String, ? extends InternalPortletPreference> other)
+            Map<? extends String, ? extends PortletPreference> other)
     {
         map.putAll(other);
     }
 
-    public InternalPortletPreference remove(Object key)
+    public PortletPreference remove(Object key)
     {
         return map.remove(key);
     }
@@ -104,7 +104,7 @@
         return map.size();
     }
 
-    public Collection<InternalPortletPreference> values()
+    public Collection<PortletPreference> values()
     {
         return map.values();
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java Tue Mar 17 14:23:52 2009
@@ -43,9 +43,9 @@
 import org.apache.ojb.broker.query.Criteria;
 import org.apache.ojb.broker.query.QueryByCriteria;
 import org.apache.ojb.broker.query.QueryFactory;
-import org.apache.pluto.PortletContainerException;
-import org.apache.pluto.internal.InternalPortletPreference;
-import org.apache.pluto.om.portlet.PortletDefinition;
+import org.apache.pluto.container.PortletContainerException;
+import org.apache.pluto.container.PortletPreference;
+import org.apache.pluto.container.om.portlet.PortletDefinition;
 import org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport;
 
 /**
@@ -109,14 +109,14 @@
         preloadEntities = false;
     }
     
-    public Map<String, InternalPortletPreference> getDefaultPreferences(
-            org.apache.pluto.PortletWindow pw, PortletRequest request)
+    public Map<String, PortletPreference> getDefaultPreferences(
+            org.apache.pluto.container.PortletWindow pw, PortletRequest request)
             throws PortletContainerException
     {
         PortletWindow window = (PortletWindow)pw;
         org.apache.jetspeed.om.portlet.PortletDefinition pd = window.getPortletEntity().getPortletDefinition();
         String entityId = window.getPortletEntity().getId();
-        Map<String, InternalPortletPreference> defaultsMap = this.getDefaultPreferences(pd);
+        Map<String, PortletPreference> defaultsMap = this.getDefaultPreferences(pd);
         // retrieve entity preferences
         if (useEntityPreferences)
         {
@@ -154,7 +154,7 @@
             if (entityMap != null && entityMap.size() > 0)
             {
                 JetspeedPreferencesMap mergedMap = new JetspeedPreferencesMap(defaultsMap);                 
-                for (Entry<String, InternalPortletPreference> entry : entityMap.entrySet())
+                for (Entry<String, PortletPreference> entry : entityMap.entrySet())
                 {
                     mergedMap.put(entry.getKey(), entry.getValue());
                 }
@@ -164,8 +164,8 @@
         return defaultsMap;
     }
 
-    public Map<String, InternalPortletPreference> getStoredPreferences(
-            org.apache.pluto.PortletWindow pw, PortletRequest request)
+    public Map<String, PortletPreference> getStoredPreferences(
+            org.apache.pluto.container.PortletWindow pw, PortletRequest request)
             throws PortletContainerException
     {
         PortletWindow window = (PortletWindow)pw;
@@ -211,8 +211,8 @@
         return map;        
     }
 
-    public void store(org.apache.pluto.PortletWindow pw, PortletRequest request,
-            Map<String, InternalPortletPreference> map)
+    public void store(org.apache.pluto.container.PortletWindow pw, PortletRequest request,
+            Map<String, PortletPreference> map)
             throws PortletContainerException
     {
         PortletWindow window = (PortletWindow)pw;
@@ -241,12 +241,12 @@
         Map<String, DatabasePreference> mergeMap = new HashMap<String, DatabasePreference>();
         List<DatabasePreference> deletes = new LinkedList<DatabasePreference>();
         List<DatabasePreference> updates = new LinkedList<DatabasePreference>();
-        List<InternalPortletPreference> inserts = new LinkedList<InternalPortletPreference>();        
+        List<PortletPreference> inserts = new LinkedList<PortletPreference>();        
         Iterator<DatabasePreference> preferences = getPersistenceBrokerTemplate().getIteratorByQuery(query);
         while (preferences.hasNext())
         {
             DatabasePreference preference = preferences.next();
-            InternalPortletPreference found = map.get(preference.getName());
+            PortletPreference found = map.get(preference.getName());
             if (found == null)
             {
                 deletes.add(preference);
@@ -258,7 +258,7 @@
             mergeMap.put(preference.getName(), preference); 
             
         }
-        for (InternalPortletPreference preference : map.values())
+        for (PortletPreference preference : map.values())
         {
             DatabasePreference dbPref = mergeMap.get(preference.getName());
             if (dbPref == null)
@@ -271,7 +271,7 @@
         {
             getPersistenceBrokerTemplate().delete(dbPref);
         }
-        for (InternalPortletPreference preference : inserts)
+        for (PortletPreference preference : inserts)
         {
             DatabasePreference dbPref = new DatabasePreference();
             dbPref.setDtype(DISCRIMINATOR_USER);
@@ -295,7 +295,7 @@
         for (DatabasePreference dbPref : updates)
         {
             dbPref.getPreferenceValues().clear();
-            InternalPortletPreference preference = map.get(dbPref.getName());
+            PortletPreference preference = map.get(dbPref.getName());
             short index = 0;
             for (String value : preference.getValues())
             {
@@ -449,7 +449,7 @@
         preferenceCache.put(preferenceCache.createElement(defaultsCacheKey, map));                    
     }
 
-    public  Map<String, InternalPortletPreference>  retrieveEntityPreferences(PortletWindow window, PortletRequest request)
+    public  Map<String, PortletPreference>  retrieveEntityPreferences(PortletWindow window, PortletRequest request)
     {
         // TODO: 2.2 implement - need to better look at use cases for edit defaults mode
         // we are currently not storing entity preferences in the database. 
@@ -457,7 +457,7 @@
     }
     
     public void storeEntityPreferences(PortletWindow pw, PortletRequest request,
-            Map<String, InternalPortletPreference> map)
+            Map<String, PortletPreference> map)
             throws PortletContainerException
     {
         // TODO: 2.2 implement - need to better look at use cases for edit defaults mode
@@ -493,7 +493,7 @@
         }
     }
 
-    public Map<String, InternalPortletPreference> getDefaultPreferences(org.apache.jetspeed.om.portlet.PortletDefinition pd)
+    public Map<String, PortletPreference> getDefaultPreferences(org.apache.jetspeed.om.portlet.PortletDefinition pd)
     {
         String appName = pd.getApplication().getName();
         String portletName = pd.getPortletName();        

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/descriptor/JetspeedDescriptorServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/descriptor/JetspeedDescriptorServiceImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/descriptor/JetspeedDescriptorServiceImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/descriptor/JetspeedDescriptorServiceImpl.java Tue Mar 17 14:23:52 2009
@@ -20,6 +20,7 @@
 import java.io.InputStream;
 import java.util.Iterator;
 import java.util.Locale;
+import java.util.Map;
 import java.util.ResourceBundle;
 
 import javax.xml.XMLConstants;
@@ -62,12 +63,12 @@
 import org.apache.jetspeed.om.portlet.jetspeed.jaxb.PortletApp;
 import org.apache.jetspeed.om.portlet.jetspeed.jaxb.Service;
 import org.apache.jetspeed.util.JetspeedLocale;
-import org.apache.pluto.om.portlet.CustomPortletMode;
-import org.apache.pluto.om.portlet.CustomWindowState;
-import org.apache.pluto.om.portlet.Description;
-import org.apache.pluto.om.portlet.PortletApplicationDefinition;
-import org.apache.pluto.om.portlet.PortletInfo;
-import org.apache.pluto.services.PortletAppDescriptorService;
+import org.apache.pluto.container.om.portlet.CustomPortletMode;
+import org.apache.pluto.container.om.portlet.CustomWindowState;
+import org.apache.pluto.container.om.portlet.Description;
+import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
+import org.apache.pluto.container.om.portlet.PortletInfo;
+import org.apache.pluto.container.PortletAppDescriptorService;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
@@ -138,9 +139,9 @@
         this.plutoDescriptorService = plutoDescriptorService;
     }
     
-    public PortletApplication read(InputStream webDescriptor, InputStream portletDescriptor, InputStream jetspeedPortletDescriptor, ClassLoader paClassLoader) throws Exception
+    public PortletApplication read(String name, String contextPath, InputStream webDescriptor, InputStream portletDescriptor, InputStream jetspeedPortletDescriptor, ClassLoader paClassLoader) throws Exception
     {
-        PortletApplicationDefinition pad = plutoDescriptorService.read(portletDescriptor);
+        PortletApplicationDefinition pad = plutoDescriptorService.read(name, contextPath, portletDescriptor);
         PortletApplication pa = null;
         ClassLoader cl = Thread.currentThread().getContextClassLoader();
         try
@@ -315,12 +316,12 @@
         jpa.setDefaultNamespace(pa.getDefaultNamespace());
         jpa.setResourceBundle(pa.getResourceBundle());
         jpa.setVersion(pa.getVersion());
-        for (org.apache.pluto.om.portlet.PortletDefinition pd : pa.getPortlets())
+        for (org.apache.pluto.container.om.portlet.PortletDefinition pd : pa.getPortlets())
         {
             PortletDefinition jpd = jpa.addPortlet(pd.getPortletName());
             upgradePortlet(jpd, pd);
         }
-        for (org.apache.pluto.om.portlet.ContainerRuntimeOption cro : pa.getContainerRuntimeOptions())
+        for (org.apache.pluto.container.om.portlet.ContainerRuntimeOption cro : pa.getContainerRuntimeOptions())
         {
             ContainerRuntimeOption jcro = jpa.addContainerRuntimeOption(cro.getName());
             for (String value : cro.getValues())
@@ -328,26 +329,26 @@
                 jcro.addValue(value);
             }
         }
-        for (org.apache.pluto.om.portlet.CustomPortletMode cpm : pa.getCustomPortletModes())
+        for (org.apache.pluto.container.om.portlet.CustomPortletMode cpm : pa.getCustomPortletModes())
         {
             CustomPortletMode jcpm = jpa.addCustomPortletMode(cpm.getPortletMode());
             jcpm.setPortalManaged(cpm.isPortalManaged());
-            for (org.apache.pluto.om.portlet.Description desc : cpm.getDescriptions())
+            for (org.apache.pluto.container.om.portlet.Description desc : cpm.getDescriptions())
             {
                 Description jdesc = jcpm.addDescription(desc.getLang());
                 jdesc.setDescription(desc.getDescription());
             }            
         }
-        for (org.apache.pluto.om.portlet.CustomWindowState cws : pa.getCustomWindowStates())
+        for (org.apache.pluto.container.om.portlet.CustomWindowState cws : pa.getCustomWindowStates())
         {
             CustomWindowState jcws = jpa.addCustomWindowState(cws.getWindowState());
-            for (org.apache.pluto.om.portlet.Description desc : cws.getDescriptions())
+            for (org.apache.pluto.container.om.portlet.Description desc : cws.getDescriptions())
             {
                 Description jdesc = jcws.addDescription(desc.getLang());
                 jdesc.setDescription(desc.getDescription());
             }            
         }        
-        for (org.apache.pluto.om.portlet.EventDefinition ed : pa.getEventDefinitions())
+        for (org.apache.pluto.container.om.portlet.EventDefinition ed : pa.getEventDefinitions())
         {
             EventDefinition jed = null;
             if (ed.getQName() != null)
@@ -363,13 +364,13 @@
             {
                 jed.addAlias(alias);
             }
-            for (org.apache.pluto.om.portlet.Description desc : ed.getDescriptions())
+            for (org.apache.pluto.container.om.portlet.Description desc : ed.getDescriptions())
             {
                 Description jdesc = jed.addDescription(desc.getLang());
                 jdesc.setDescription(desc.getDescription());
             }                        
         }
-        for (org.apache.pluto.om.portlet.FilterMapping fm : pa.getFilterMappings())
+        for (org.apache.pluto.container.om.portlet.FilterMapping fm : pa.getFilterMappings())
         {
             FilterMapping jfm = jpa.addFilterMapping(fm.getFilterName());
             for (String portletName : fm.getPortletNames())
@@ -377,25 +378,25 @@
                 jfm.addPortletName(portletName);
             }
         }
-        for (org.apache.pluto.om.portlet.Filter f : pa.getFilters())
+        for (org.apache.pluto.container.om.portlet.Filter f : pa.getFilters())
         {
             Filter jf = jpa.addFilter(f.getFilterName());
             jf.setFilterClass(f.getFilterClass());
-            for (org.apache.pluto.om.portlet.Description desc : f.getDescriptions())
+            for (org.apache.pluto.container.om.portlet.Description desc : f.getDescriptions())
             {
                 Description jdesc = jf.addDescription(desc.getLang());
                 jdesc.setDescription(desc.getDescription());
             }                                   
-            for (org.apache.pluto.om.portlet.DisplayName dn : f.getDisplayNames())
+            for (org.apache.pluto.container.om.portlet.DisplayName dn : f.getDisplayNames())
             {
                 DisplayName jdn = jf.addDisplayName(dn.getLang());
                 jdn.setDisplayName(dn.getDisplayName());
             }
-            for (org.apache.pluto.om.portlet.InitParam ip : f.getInitParams())
+            for (org.apache.pluto.container.om.portlet.InitParam ip : f.getInitParams())
             {
                 InitParam jip = jf.addInitParam(ip.getParamName());
                 jip.setParamValue(ip.getParamValue());
-                for (org.apache.pluto.om.portlet.Description desc : ip.getDescriptions())
+                for (org.apache.pluto.container.om.portlet.Description desc : ip.getDescriptions())
                 {
                     Description jdesc = jip.addDescription(desc.getLang());
                     jdesc.setDescription(desc.getDescription());
@@ -406,21 +407,21 @@
                 jf.addLifecycle(lc);
             }            
         }
-        for (org.apache.pluto.om.portlet.Listener l : pa.getListeners())
+        for (org.apache.pluto.container.om.portlet.Listener l : pa.getListeners())
         {
             Listener jl = jpa.addListener(l.getListenerClass());
-            for (org.apache.pluto.om.portlet.Description desc : l.getDescriptions())
+            for (org.apache.pluto.container.om.portlet.Description desc : l.getDescriptions())
             {
                 Description jdesc = jl.addDescription(desc.getLang());
                 jdesc.setDescription(desc.getDescription());
             }                                        
-            for (org.apache.pluto.om.portlet.DisplayName dn : l.getDisplayNames())
+            for (org.apache.pluto.container.om.portlet.DisplayName dn : l.getDisplayNames())
             {
                 DisplayName jdn = jl.addDisplayName(dn.getLang());
                 jdn.setDisplayName(dn.getDisplayName());
             }
         }
-        for (org.apache.pluto.om.portlet.PublicRenderParameter prd : pa.getPublicRenderParameters())
+        for (org.apache.pluto.container.om.portlet.PublicRenderParameter prd : pa.getPublicRenderParameters())
         {            
             PublicRenderParameter jprp = null;
             if (prd.getQName() != null)
@@ -435,16 +436,16 @@
             {
                 jprp.addAlias(alias);
             }
-            for (org.apache.pluto.om.portlet.Description desc : prd.getDescriptions())
+            for (org.apache.pluto.container.om.portlet.Description desc : prd.getDescriptions())
             {
                 Description jdesc = jprp.addDescription(desc.getLang());
                 jdesc.setDescription(desc.getDescription());
             }
         }
-        for (org.apache.pluto.om.portlet.SecurityConstraint sc :  pa.getSecurityConstraints())
+        for (org.apache.pluto.container.om.portlet.SecurityConstraint sc :  pa.getSecurityConstraints())
         {
             SecurityConstraint jsc = jpa.addSecurityConstraint(sc.getUserDataConstraint().getTransportGuarantee());
-            for (org.apache.pluto.om.portlet.DisplayName dn : sc.getDisplayNames())
+            for (org.apache.pluto.container.om.portlet.DisplayName dn : sc.getDisplayNames())
             {
                 DisplayName jdn = jsc.addDisplayName(dn.getLang());
                 jdn.setDisplayName(dn.getDisplayName());
@@ -454,26 +455,35 @@
                 jsc.addPortletName(portletName);
             }            
         }
-        for (org.apache.pluto.om.portlet.UserAttribute ua : pa.getUserAttributes())
+        for (org.apache.pluto.container.om.portlet.UserAttribute ua : pa.getUserAttributes())
         {
             UserAttribute jua = jpa.addUserAttribute(ua.getName());
-            for (org.apache.pluto.om.portlet.Description desc : ua.getDescriptions())
+            for (org.apache.pluto.container.om.portlet.Description desc : ua.getDescriptions())
             {
                 Description jdesc = jua.addDescription(desc.getLang());
                 jdesc.setDescription(desc.getDescription());
             }                                                    
         }
+        for (String urlPattern : pa.getServletMappingURLPatterns())
+        {
+            jpa.addServletMappingURLPattern(urlPattern);
+        }
+        
+        for (Map.Entry<Locale, String> entry : pa.getLocaleEncodingMappings().entrySet())
+        {
+            jpa.addLocaleEncodingMapping(entry.getKey(), entry.getValue());
+        }
         return jpa;
     }
 
-    protected void upgradePortlet(PortletDefinition jpd, org.apache.pluto.om.portlet.PortletDefinition pd)
+    protected void upgradePortlet(PortletDefinition jpd, org.apache.pluto.container.om.portlet.PortletDefinition pd)
     {
         jpd.setCacheScope(pd.getCacheScope());
         jpd.setExpirationCache(pd.getExpirationCache());
         jpd.setPortletClass(pd.getPortletClass());
         jpd.setResourceBundle(pd.getResourceBundle());
         jpd.setPreferenceValidatorClassname(pd.getPortletPreferences().getPreferencesValidator());
-        for (org.apache.pluto.om.portlet.Preference preference : pd.getPortletPreferences().getPortletPreferences())
+        for (org.apache.pluto.container.om.portlet.Preference preference : pd.getPortletPreferences().getPortletPreferences())
         {
             Preference jpref = jpd.getDescriptorPreferences().addPreference(preference.getName());
             jpref.setReadOnly(preference.isReadOnly());
@@ -483,7 +493,7 @@
             }
             
         }        
-        for (org.apache.pluto.om.portlet.ContainerRuntimeOption cro : pd.getContainerRuntimeOptions())
+        for (org.apache.pluto.container.om.portlet.ContainerRuntimeOption cro : pd.getContainerRuntimeOptions())
         {
             ContainerRuntimeOption jcro = jpd.addContainerRuntimeOption(cro.getName());
             for (String value : cro.getValues())
@@ -491,27 +501,27 @@
                 jcro.addValue(value);
             }
         }
-        for (org.apache.pluto.om.portlet.Description desc : pd.getDescriptions())
+        for (org.apache.pluto.container.om.portlet.Description desc : pd.getDescriptions())
         {
             Description jdesc = jpd.addDescription(desc.getLang());
             jdesc.setDescription(desc.getDescription());
         }                        
-        for (org.apache.pluto.om.portlet.DisplayName dn : pd.getDisplayNames())
+        for (org.apache.pluto.container.om.portlet.DisplayName dn : pd.getDisplayNames())
         {
             DisplayName jdn = jpd.addDisplayName(dn.getLang());
             jdn.setDisplayName(dn.getDisplayName());
         }
-        for (org.apache.pluto.om.portlet.InitParam ip : pd.getInitParams())
+        for (org.apache.pluto.container.om.portlet.InitParam ip : pd.getInitParams())
         {
             InitParam jip = jpd.addInitParam(ip.getParamName());
             jip.setParamValue(ip.getParamValue());
-            for (org.apache.pluto.om.portlet.Description desc : ip.getDescriptions())
+            for (org.apache.pluto.container.om.portlet.Description desc : ip.getDescriptions())
             {
                 Description jdesc = jip.addDescription(desc.getLang());
                 jdesc.setDescription(desc.getDescription());
             }                                        
         }
-        for (org.apache.pluto.om.portlet.SecurityRoleRef srr : pd.getSecurityRoleRefs())
+        for (org.apache.pluto.container.om.portlet.SecurityRoleRef srr : pd.getSecurityRoleRefs())
         {
             SecurityRoleRef jsrr = jpd.addSecurityRoleRef(srr.getRoleName());
             jsrr.setRoleLink(srr.getRoleLink());
@@ -528,7 +538,7 @@
             }
         }
         
-        for (org.apache.pluto.om.portlet.EventDefinitionReference ed : pd.getSupportedProcessingEvents())
+        for (org.apache.pluto.container.om.portlet.EventDefinitionReference ed : pd.getSupportedProcessingEvents())
         {
             if (ed.getQName() != null)
             {
@@ -543,7 +553,7 @@
         {
             jpd.addSupportedPublicRenderParameter(sprd);
         }
-        for (org.apache.pluto.om.portlet.EventDefinitionReference ed : pd.getSupportedPublishingEvents())
+        for (org.apache.pluto.container.om.portlet.EventDefinitionReference ed : pd.getSupportedPublishingEvents())
         {
             if (ed.getQName() != null)
             {
@@ -554,7 +564,7 @@
                 jpd.addSupportedPublishingEvent(ed.getName());
             }
         }
-        for (org.apache.pluto.om.portlet.Supports supports : pd.getSupports())
+        for (org.apache.pluto.container.om.portlet.Supports supports : pd.getSupports())
         {
             Supports jsupports = jpd.addSupports(supports.getMimeType());
             for (String pm : supports.getPortletModes())

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/InlinePortletResourceBundle.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/InlinePortletResourceBundle.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/InlinePortletResourceBundle.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/InlinePortletResourceBundle.java Tue Mar 17 14:23:52 2009
@@ -19,8 +19,6 @@
 import java.util.ListResourceBundle;
 import java.util.ResourceBundle;
 
-import org.apache.pluto.Constants;
-
 /**
  * InlinePortletResourceBundle implementation which provides the inline title, short-title, and keywords as properties
  * from the bundle. Borrowed and improved upon the one provided by the Pluto container.
@@ -29,6 +27,10 @@
  */
 class InlinePortletResourceBundle extends ListResourceBundle
 {
+    private final static String TITLE_KEY = "javax.portlet.title";
+    private final static String SHORT_TITLE_KEY = "javax.portlet.short-title";
+    private final static String KEYWORDS_KEY = "javax.portlet.keywords";
+
     private Object[][] contents;
 
     public InlinePortletResourceBundle(String title, String shortTitle, String keywords)
@@ -38,9 +40,9 @@
     
     public InlinePortletResourceBundle(String title, String shortTitle, String keywords, ResourceBundle parent)
     {
-        contents = new Object[][]{ { Constants.TITLE_KEY, deriveValue(parent, Constants.TITLE_KEY, title) },
-                                   { Constants.SHORT_TITLE_KEY, deriveValue(parent, Constants.SHORT_TITLE_KEY, shortTitle) },
-                                   { Constants.KEYWORDS_KEY, deriveValue(parent, Constants.KEYWORDS_KEY, keywords) }};
+        contents = new Object[][]{ { TITLE_KEY, deriveValue(parent, TITLE_KEY, title) },
+                                   { SHORT_TITLE_KEY, deriveValue(parent, SHORT_TITLE_KEY, shortTitle) },
+                                   { KEYWORDS_KEY, deriveValue(parent, KEYWORDS_KEY, keywords) }};
         setParent(parent);
     }
     

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java Tue Mar 17 14:23:52 2009
@@ -22,9 +22,11 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Set;
 
 import javax.portlet.PortletMode;
 import javax.portlet.WindowState;
@@ -55,7 +57,7 @@
 import org.apache.ojb.broker.PersistenceBroker;
 import org.apache.ojb.broker.PersistenceBrokerAware;
 import org.apache.ojb.broker.PersistenceBrokerException;
-import org.apache.pluto.om.portlet.UserDataConstraint;
+import org.apache.pluto.container.om.portlet.UserDataConstraint;
 
 /**
  *
@@ -80,7 +82,7 @@
     /** Holds value of property name. */
     private String name;
     
-    private String contextRoot;
+    private String contextPath;
 
     /** Metadata property */
     private Collection<LocalizedField> metadataFields = null;
@@ -107,6 +109,9 @@
 
     private List<UserAttributeRef> userAttributeRefs;
     private List<JetspeedServiceReference> services = new ArrayList<JetspeedServiceReference>();
+
+    private Set<String> servletMappingURLPatterns;
+    private Map<Locale, String> localeEncodingMappings;
     
     private transient Map<PortletMode,PortletMode> supportedCustomModes;
     private transient Map<WindowState,WindowState> supportedCustomStates;
@@ -193,14 +198,14 @@
         this.revision = revision;
     }
     
-    public void setContextRoot(String contextRoot)
+    public void setContextPath(String contextPath)
     {
-        this.contextRoot = contextRoot;
+        this.contextPath = contextPath;
     }
     
-    public String getContextRoot()
+    public String getContextPath()
     {
-        return contextRoot;
+        return contextPath;
     }
     
     public String getDefaultNamespace()
@@ -475,7 +480,7 @@
         {
             // make sure transient cache is setup
             getSupportedPortletModes();
-            return (PortletMode)supportedCustomModes.get(mode);
+            return supportedCustomModes.get(mode);
         }
         return null;            
     }
@@ -529,7 +534,7 @@
         {
             // make sure transient cache is setup
             getSupportedWindowStates();
-            return (WindowState)supportedCustomStates.get(state);
+            return supportedCustomStates.get(state);
         }
         return null;            
     }
@@ -613,7 +618,7 @@
         }
         else if ( getSupportedPortletModes().contains(mode) )
         {
-            return (PortletMode)mappedCustomModes.get(mode);
+            return mappedCustomModes.get(mode);
         }
         return null;
     }
@@ -626,7 +631,7 @@
         }
         else if ( getSupportedWindowStates().contains(state) )
         {
-            return (WindowState)mappedCustomStates.get(state);
+            return mappedCustomStates.get(state);
         }
         return null;
     }
@@ -871,7 +876,35 @@
         getContainerRuntimeOptions().add(cro);
         return cro;        
     }
-
+    
+    public Set<String> getServletMappingURLPatterns()
+    {
+        if (servletMappingURLPatterns == null)
+        {
+            servletMappingURLPatterns = new HashSet<String>();
+        }
+        return servletMappingURLPatterns;
+    }
+    
+    public void addServletMappingURLPattern(String servletMappingURLPattern)
+    {
+        getServletMappingURLPatterns().add(servletMappingURLPattern);
+    }
+    
+    public Map<Locale, String> getLocaleEncodingMappings()
+    {
+        if (localeEncodingMappings == null)
+        {
+            localeEncodingMappings = new HashMap<Locale,String>();
+        }
+        return localeEncodingMappings;
+    }
+    
+    public void addLocaleEncodingMapping(Locale locale, String encoding)
+    {
+        getLocaleEncodingMappings().put(locale, encoding);
+    }
+    
     public List<JetspeedServiceReference> getJetspeedServices()
     {
         if (services == null)
@@ -899,7 +932,7 @@
     {
         if (this.getMetadata() != null)
         {
-            Collection c = this.getMetadata().getFields("layout-app");
+            Collection<LocalizedField> c = this.getMetadata().getFields("layout-app");
             if (c != null)
             {
                 if (!c.isEmpty())

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java Tue Mar 17 14:23:52 2009
@@ -56,7 +56,7 @@
 import org.apache.ojb.broker.PersistenceBroker;
 import org.apache.ojb.broker.PersistenceBrokerAware;
 import org.apache.ojb.broker.PersistenceBrokerException;
-import org.apache.pluto.internal.InternalPortletPreference;
+import org.apache.pluto.container.PortletPreference;
 
 /**
  * 
@@ -202,10 +202,10 @@
         {
             return new PreferencesImpl();            
         }
-        Map<String, InternalPortletPreference> prefMap = PortletDefinitionImpl.portletPreferencesProvider.getDefaultPreferences(this);        
+        Map<String, PortletPreference> prefMap = PortletDefinitionImpl.portletPreferencesProvider.getDefaultPreferences(this);        
         Preferences preferences = new PreferencesImpl();
         List<Preference> list = preferences.getPortletPreferences();
-        for (InternalPortletPreference pref : prefMap.values())
+        for (PortletPreference pref : prefMap.values())
         {
             Preference p = preferences.addPreference(pref.getName());
             p.setReadOnly(pref.isReadOnly());
@@ -473,7 +473,7 @@
      * portletDefinition.
      * </p>
      * 
-     * @see org.apache.pluto.om.portlet.PortletDefinition#store()
+     * @see org.apache.pluto.container.om.portlet.PortletDefinition#store()
      * @throws java.io.IOException
      */
     public void store() throws IOException

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletentity/TestPortletEntityDAO.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletentity/TestPortletEntityDAO.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletentity/TestPortletEntityDAO.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletentity/TestPortletEntityDAO.java Tue Mar 17 14:23:52 2009
@@ -36,7 +36,7 @@
 import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl;
 
-import org.apache.pluto.om.portlet.PortletApplicationDefinition;
+import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
 
 import org.jmock.Mock;
 import org.jmock.core.matcher.InvokeAtLeastOnceMatcher;
@@ -260,7 +260,7 @@
 
         PortletApplicationDefinitionImpl app = new PortletApplicationDefinitionImpl();
         app.setName(TEST_APP);
-        app.setContextRoot("/app1");
+        app.setContextPath("/app1");
 
         PortletDefinition portlet = app.addPortlet(TEST_PORTLET);
         portlet.setPortletClass("org.apache.Portlet");



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message