portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r553375 - in /portals/jetspeed-2/trunk: applications/j2-admin/src/webapp/WEB-INF/view/site/ commons/src/java/org/apache/jetspeed/ components/portal-site/src/java/org/apache/jetspeed/om/folder/proxy/ components/portal-site/src/java/org/apach...
Date Thu, 05 Jul 2007 05:37:03 GMT
Author: taylor
Date: Wed Jul  4 22:37:00 2007
New Revision: 553375

URL: http://svn.apache.org/viewvc?view=rev&rev=553375
Log:
https://issues.apache.org/jira/browse/JS2-675

Site Manager Admin portlet: cannot view pages located via profiling rules with navigations
or controls
Viewing of any page with controls or navigations is now possible from /portal
Still having some difficulties with Desktop, so for now, when the View button is pressed from
the SiteManager in Desktop
it goes to /configure not /dtconfigure

Had some build cycles with the Jetspeed static accessor class
Decided to bite the bullet and move it to commons, and factor out the Engine, PortalContext
interfaces into Jetspeed API proper

Added:
    portals/jetspeed-2/trunk/commons/src/java/org/apache/jetspeed/Jetspeed.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalContext.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/engine/Engine.java
Removed:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/Jetspeed.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/PortalContext.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/Engine.java
Modified:
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/site-view.vm
    portals/jetspeed-2/trunk/components/portal-site/src/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java
    portals/jetspeed-2/trunk/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/JetspeedPortalContext.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/administration/PortalConfigurationImpl.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/url/impl/AbstractPortalURL.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedEngine.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/core/PortalContextProviderImpl.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/profiler/impl/ProfilerValveImpl.java
    portals/jetspeed-2/trunk/etc/schema/phase1-schema.xml
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/PortalConfiguration.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/desktop/JetspeedDesktop.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/portalsite/PortalSiteSessionContext.java
    portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/pipelines.xml
    portals/jetspeed-2/trunk/src/webapp/WEB-INF/web.xml

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/site-view.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/site-view.vm?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/site-view.vm
(original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/site/site-view.vm
Wed Jul  4 22:37:00 2007
@@ -1185,13 +1185,13 @@
         var servletPath = "${req.ServletPath}";
         var regex = new RegExp("/portal.*");
         if (servletPath.match(regex))
-            servletPath = "portal";
+            servletPath = "configure";
         else
         {
             if (servletPath == "/")
-                servletPath = "portal";
+                servletPath = "configure";
             else
-                servletPath = "desktop";
+                servletPath = "configure";
         }
         window.open("${rooturl}" + servletPath + node.widgetId, 'w-' + node.title);
     }

Added: portals/jetspeed-2/trunk/commons/src/java/org/apache/jetspeed/Jetspeed.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/commons/src/java/org/apache/jetspeed/Jetspeed.java?view=auto&rev=553375
==============================================================================
--- portals/jetspeed-2/trunk/commons/src/java/org/apache/jetspeed/Jetspeed.java (added)
+++ portals/jetspeed-2/trunk/commons/src/java/org/apache/jetspeed/Jetspeed.java Wed Jul  4
22:37:00 2007
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed;
+
+import java.util.Locale;
+
+import org.apache.jetspeed.administration.PortalConfiguration;
+import org.apache.jetspeed.components.ComponentManager;
+import org.apache.jetspeed.engine.Engine;
+import org.apache.jetspeed.exception.JetspeedException;
+import org.apache.jetspeed.request.RequestContext;
+
+/**
+ * Jetspeed environment
+ * <br/>
+ * Provides an easy way to access the current running environment 
+ * of jetspeed.
+ *
+ * @author <a href="mailto:david@bluesunrise.com">David Sean Taylor</a>
+ * @version $Id: Jetspeed.java 552657 2007-07-03 03:57:47Z taylor $
+ */
+public class Jetspeed
+{
+    private static Engine engine = null;
+    /**
+     * Shuts down the currently running instance of the portal
+     * Engine.
+     * @throws JetspeedException
+     */
+    public static void shutdown() throws JetspeedException
+    {
+        if (engine != null)
+            engine.shutdown();
+    }
+
+    public static Engine getEngine()
+    {
+        return engine;
+    }
+
+    public static PortalContext getContext()
+    {
+        if (engine == null)
+        {
+            throw new NullPointerException("The engine is null, have you called createEngine()
yet?");
+        }
+        return engine.getContext();
+    }
+
+    /**
+     * Given a application relative path, returns the real path relative to the application
root
+     *
+     */
+    public static String getRealPath(String path)
+    {
+        if (engine == null)
+        {
+            return null;
+        }
+        return engine.getRealPath(path);
+    }
+
+    /**
+     * Delegtes to the current Engine to retreive the RequestContext
+     * appropriate for the current thread.
+     * 
+     * @see org.apache.jetspeed.engine.Engine#getCurrentRequestContext()
+     * 
+     * @return The RequestContext for this current Thread.
+     */
+    public static RequestContext getCurrentRequestContext()
+    {
+        if (engine != null)
+            return engine.getCurrentRequestContext();
+        return null;
+    }
+
+    // TODO We need to get this from the Engine and the engine should get it from the configuration.

+
+    public static Locale getDefaultLocale()
+    {
+        return Locale.getDefault();
+    }
+
+    public static ComponentManager getComponentManager()
+    {
+        if (engine == null)
+            return null;
+        return engine.getComponentManager();
+    }
+
+    public static void setEngine(Engine engine)
+    {
+        Jetspeed.engine = engine;
+    }
+    
+    public static PortalConfiguration getConfiguration()
+    {
+        ComponentManager manager = getComponentManager(); 
+        if (manager != null)
+            return (PortalConfiguration)manager.getComponent("PortalConfiguration");
+        return null;        
+    }
+    
+}
\ No newline at end of file

Modified: portals/jetspeed-2/trunk/components/portal-site/src/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal-site/src/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/components/portal-site/src/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java
(original)
+++ portals/jetspeed-2/trunk/components/portal-site/src/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java
Wed Jul  4 22:37:00 2007
@@ -26,6 +26,8 @@
 import java.util.List;
 import java.util.Locale;
 
+import org.apache.jetspeed.Jetspeed;
+import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.om.common.GenericMetadata;
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.folder.FolderNotFoundException;
@@ -44,6 +46,7 @@
 import org.apache.jetspeed.page.document.proxy.NodeSetImpl;
 import org.apache.jetspeed.portalsite.view.SiteView;
 import org.apache.jetspeed.portalsite.view.SiteViewSearchPath;
+import org.apache.jetspeed.request.RequestContext;
 
 /**
  * This class proxies PSML Folder instances to create a logical view
@@ -151,7 +154,7 @@
      *                      least specific order
      */
     private List inheritanceFolders;
-
+        
     /**
      * newInstance - creates a new proxy instance that implements the Folder interface
      *
@@ -772,8 +775,20 @@
                     // accessed only via SiteView search path
                     // aggregation that directly utilizes the
                     // current view page manager
-                    if (!(child instanceof Folder) || (!childName.startsWith(Folder.RESERVED_SUBSITE_FOLDER_PREFIX)
&&
-                                                       !childName.startsWith(Folder.RESERVED_FOLDER_PREFIX)))
+                    boolean visible = (!(child instanceof Folder) || (!childName.startsWith(Folder.RESERVED_SUBSITE_FOLDER_PREFIX)
&&
+                                                       !childName.startsWith(Folder.RESERVED_FOLDER_PREFIX)));
+                    RequestContext rc = Jetspeed.getCurrentRequestContext();
+                    boolean configureMode = false;
+                    if (rc != null)
+                    {
+                        if (rc.getPipeline().getName().equals(PortalReservedParameters.CONFIG_PIPELINE_NAME)
||
+                            rc.getPipeline().getName().equals(PortalReservedParameters.DESKTOP_CONFIG_PIPELINE_NAME))
   
+                        {
+                            configureMode = true;
+                        }
+                    }
+                    
+                    if (visible || configureMode)
                     {
                         // test child name uniqueness
                         boolean childUnique = true ;

Modified: portals/jetspeed-2/trunk/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
Wed Jul  4 22:37:00 2007
@@ -123,6 +123,12 @@
     private transient boolean stale;
 
     /**
+     * store which pipeline we are serving
+     * 
+     */
+    private transient String pipeline = "";
+    
+    /**
      * PortalSiteSessionContextImpl - constructor
      *
      * @param pageManager PageManager component instance
@@ -130,6 +136,7 @@
     public PortalSiteSessionContextImpl(PageManager pageManager)
     {
         this.pageManager = pageManager;
+        this.pipeline = "";
     }
 
     /**
@@ -1259,4 +1266,14 @@
 		}
 		return folderPageHistory;
 	}
+    
+    public void setPipeline(String pipeline)
+    {
+        this.pipeline = pipeline;
+    }
+    
+    public String getPipeline()
+    {
+        return this.pipeline;
+    }
 }

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/JetspeedPortalContext.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/JetspeedPortalContext.java?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/JetspeedPortalContext.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/JetspeedPortalContext.java
Wed Jul  4 22:37:00 2007
@@ -23,7 +23,7 @@
 import javax.portlet.PortletMode;
 import javax.portlet.WindowState;
 
-import org.apache.commons.configuration.Configuration;
+import org.apache.jetspeed.administration.PortalConfiguration;
 import org.apache.jetspeed.container.PortletRequestContext;
 import org.apache.jetspeed.engine.Engine;
 import org.apache.jetspeed.om.common.portlet.PortletApplication;
@@ -55,7 +55,7 @@
     /**
      * Configuration state
      */
-    private Configuration configuration = null;
+    private PortalConfiguration configuration = null;
 
     /**
      * The base from which the Jetspped application will operate.
@@ -64,7 +64,7 @@
     
     private final String portalInfo;
 
-    public JetspeedPortalContext(Engine engine, Configuration configuration, String applicationRoot)
+    public JetspeedPortalContext(Engine engine, PortalConfiguration configuration, String
applicationRoot)
     {
         this.engine = engine;
         this.configuration = configuration;
@@ -87,7 +87,7 @@
      *
      * @return a <code>Configuration</code> containing the configuration properties
for this Jetspeed context.
      */
-    public Configuration getConfiguration()
+    public PortalConfiguration getConfiguration()
     {
         return configuration;
     }
@@ -107,7 +107,7 @@
      *
      * @param configuration - the configuration properties
      */
-    public void setConfiguration(Configuration configuration)
+    public void setConfiguration(PortalConfiguration configuration)
     {
         this.configuration = configuration;
     }
@@ -173,7 +173,7 @@
         {
             throw new IllegalArgumentException("Property name == null");
         }
-        return(String) configuration.getProperty(name);
+        return(String) configuration.getString(name);
     }
 
     /* (non-Javadoc)

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/administration/PortalConfigurationImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/administration/PortalConfigurationImpl.java?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/administration/PortalConfigurationImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/administration/PortalConfigurationImpl.java
Wed Jul  4 22:37:00 2007
@@ -16,6 +16,7 @@
  */
 package org.apache.jetspeed.administration;
 
+import java.util.Iterator;
 import java.util.List;
 
 import org.apache.commons.configuration.Configuration;
@@ -109,5 +110,15 @@
     public String[] getStringArray(String key)
     {
         return configuration.getStringArray(key);                
+    }
+    
+    public Iterator getKeys()
+    {
+        return configuration.getKeys();
+    }
+    
+    public void setString(String key, String value)
+    {
+        configuration.setProperty(key, value);
     }
 }

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/url/impl/AbstractPortalURL.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/url/impl/AbstractPortalURL.java?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/url/impl/AbstractPortalURL.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/url/impl/AbstractPortalURL.java
Wed Jul  4 22:37:00 2007
@@ -75,7 +75,7 @@
         this.navState = navState;
         if ( relativeOnly == null )
         {
-            relativeOnly = portalContext.getConfiguration().getBoolean("portalurl.relative.only",
Boolean.FALSE);
+            relativeOnly = new Boolean(portalContext.getConfiguration().getBoolean("portalurl.relative.only",
false));
         }
     }
     

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedEngine.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedEngine.java?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedEngine.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedEngine.java
Wed Jul  4 22:37:00 2007
@@ -28,13 +28,14 @@
 import org.apache.jetspeed.JetspeedPortalContext;
 import org.apache.jetspeed.PortalContext;
 import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.administration.PortalConfiguration;
+import org.apache.jetspeed.administration.PortalConfigurationImpl;
 import org.apache.jetspeed.components.ComponentManager;
 import org.apache.jetspeed.exception.JetspeedException;
 import org.apache.jetspeed.pipeline.Pipeline;
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.request.RequestContextComponent;
 import org.apache.jetspeed.statistics.PortalStatistics;
-import org.apache.jetspeed.tools.pamanager.PortletApplicationManagement;
 import org.apache.ojb.broker.util.ClassHelper;
 import org.apache.pluto.PortletContainer;
 import org.apache.pluto.PortletContainerException;
@@ -69,6 +70,11 @@
 
     public JetspeedEngine(Configuration configuration, String applicationRoot, ServletConfig
config, ComponentManager componentManager )
     {
+        this(new PortalConfigurationImpl(configuration), applicationRoot, config, componentManager);
+    }
+    
+    public JetspeedEngine(PortalConfiguration configuration, String applicationRoot, ServletConfig
config, ComponentManager componentManager )
+    {
         this.componentManager = componentManager;
         this.context = new JetspeedPortalContext(this, configuration, applicationRoot);
         this.config = config;
@@ -76,7 +82,7 @@
         context.setConfiguration(configuration);           
 
         defaultPipelineName = configuration.getString(PIPELINE_DEFAULT, "jetspeed-pipeline");
-        configuration.setProperty(JetspeedEngineConstants.APPLICATION_ROOT_KEY, applicationRoot);
+        configuration.setString(JetspeedEngineConstants.APPLICATION_ROOT_KEY, applicationRoot);
         
         // Make these availble as beans to Spring
         componentManager.addComponent("Engine", this);

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/core/PortalContextProviderImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/core/PortalContextProviderImpl.java?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/core/PortalContextProviderImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/core/PortalContextProviderImpl.java
Wed Jul  4 22:37:00 2007
@@ -174,7 +174,7 @@
         {
             throw new IllegalArgumentException("Property name == null");
         }
-        portalContext.getConfiguration().setProperty(name, value);
+        portalContext.getConfiguration().setString(name, value);
     }      
 
     // expects enumeration of PortletMode objects

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
Wed Jul  4 22:37:00 2007
@@ -135,9 +135,9 @@
         if (mergePortalParametersWithPortletParameters == null )
         {
             mergePortalParametersWithPortletParameters = 
-                Jetspeed.getContext().getConfiguration().getBoolean("merge.portal.parameters.with.portlet.parameters",
Boolean.FALSE);
+                new Boolean(Jetspeed.getContext().getConfiguration().getBoolean("merge.portal.parameters.with.portlet.parameters",
false));
             mergePortalParametersBeforePortletParameters = 
-                Jetspeed.getContext().getConfiguration().getBoolean("merge.portal.parameters.before.portlet.parameters",
Boolean.FALSE);
+                new Boolean(Jetspeed.getContext().getConfiguration().getBoolean("merge.portal.parameters.before.portlet.parameters",
false));
         }
                 
         

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/profiler/impl/ProfilerValveImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/profiler/impl/ProfilerValveImpl.java?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/profiler/impl/ProfilerValveImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/profiler/impl/ProfilerValveImpl.java
Wed Jul  4 22:37:00 2007
@@ -204,9 +204,11 @@
                 // and is now being reloaded in a new server), it must be
                 // replaced with a newly created session context
                 PortalSiteSessionContext sessionContext = (PortalSiteSessionContext)request.getSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY);
-                if ((sessionContext == null) || !sessionContext.isValid())
-                {
+                String pipeline = request.getPipeline().getName();
+                if ((sessionContext == null) || !sessionContext.isValid() || !pipeline.equals(sessionContext.getPipeline()))
+                {                    
                     sessionContext = portalSite.newSessionContext();
+                    sessionContext.setPipeline(pipeline);
                     request.setSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY, sessionContext);
                 }
 

Modified: portals/jetspeed-2/trunk/etc/schema/phase1-schema.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/etc/schema/phase1-schema.xml?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/etc/schema/phase1-schema.xml (original)
+++ portals/jetspeed-2/trunk/etc/schema/phase1-schema.xml Wed Jul  4 22:37:00 2007
@@ -122,4 +122,21 @@
 		<column name='ELAPSED_TIME' type='BIGINT'/>
 	</table>    
 	
+	<table name='ADMIN_ACTIVITY'>
+		<column name='USER_NAME' type='VARCHAR' size="80"/>
+		<column name='ADMIN' type='VARCHAR' size="80"/>
+		<column name='TIME_STAMP' type='TIMESTAMP'/>
+		<column name='IPADDRESS' type='VARCHAR' size="80"/>
+		<column name='ACTIVITY' type='VARCHAR' size="40"/>
+		<column name='DESCRIPTION' type='VARCHAR' size="128"/>			    
+	</table>
+
+	<table name='USER_ACTIVITY'>
+		<column name='USER_NAME' type='VARCHAR' size="80"/>
+		<column name='TIME_STAMP' type='TIMESTAMP'/>
+		<column name='IPADDRESS' type='VARCHAR' size="80"/>
+		<column name='ACTIVITY' type='VARCHAR' size="40"/>
+		<column name='DESCRIPTION' type='VARCHAR' size="128"/>			    
+	</table>
+	
 </database>

Added: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalContext.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalContext.java?view=auto&rev=553375
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalContext.java
(added)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalContext.java
Wed Jul  4 22:37:00 2007
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed;
+
+import javax.portlet.PortletMode;
+import javax.portlet.WindowState;
+
+import org.apache.jetspeed.administration.PortalConfiguration;
+import org.apache.jetspeed.engine.Engine;
+
+/**
+ * Portal Context associated with running thread of the engine
+ *
+ * @author <a href="mailto:david@bluesunrise.com">David Sean Taylor</a>
+ * @version $Id: PortalContext.java 185962 2004-03-08 01:03:33Z jford $
+ */
+public interface PortalContext extends javax.portlet.PortalContext
+{
+    public Engine getEngine();
+
+    public PortalConfiguration getConfiguration();
+    public void setConfiguration(PortalConfiguration configuration);
+
+    public String getConfigurationProperty(String key);
+    public String getConfigurationProperty(String key, String defaultValue);
+
+    public void setAttribute(String name, Object value);
+    public Object getAttribute(String name);
+
+    /**
+     * Returns the application root for this Jetspeed engine context.
+     *
+     * @return a <code>String</code> containing the application root path for
this Jetspeed context.
+     */
+    public String getApplicationRoot();
+
+    /**
+     * Sets the application root path for this Jetspeed engine context.
+     *
+     * @param applicationRoot - the applicationRoot path on the file system.
+     */
+    public void setApplicationRoot(String applicationRoot);
+    
+    public boolean isPortletModeAllowed(PortletMode mode);
+    public boolean isWindowStateAllowed(WindowState state);
+}

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java
Wed Jul  4 22:37:00 2007
@@ -33,6 +33,10 @@
     public final static String PORTLET_PIPELINE = "portlet-pipeline";
     public final static String ACTION_PIPELINE = "action-pipeline";
     public final static String LOGIN_PIPELINE = "login-pipeline";
+    public final static String CONFIG_PIPELINE = "config-pipeline";
+    public final static String DESKTOP_CONFIG_PIPELINE = "dtconfig-pipeline";
+    public final static String CONFIG_PIPELINE_NAME = "ConfigurePipeline";
+    public final static String DESKTOP_CONFIG_PIPELINE_NAME = "DesktopConfigurePipeline";
     
     // Session and Request attribute keys
     public static final String PAGE_ATTRIBUTE = "org.apache.jetspeed.Page";
@@ -65,7 +69,7 @@
     public static final String PAGE_LAYOUT_HELP = "org.apache.jetspeed.layout.help";
     public static final String PAGE_LAYOUT_EDIT = "org.apache.jetspeed.layout.edit";
     public static final String PAGE_LAYOUT_SOLO = "org.apache.jetspeed.layout.solo";
-    
+
     /**
      * Setting this as a session attribute will override all themes declared in
      * psml. Sample values are "Simple", "tigris", "jetspeed"

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/PortalConfiguration.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/PortalConfiguration.java?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/PortalConfiguration.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/PortalConfiguration.java
Wed Jul  4 22:37:00 2007
@@ -16,6 +16,7 @@
  */
 package org.apache.jetspeed.administration;
 
+import java.util.Iterator;
 import java.util.List;
 
 /**
@@ -45,5 +46,7 @@
     List getList(String key);    
     long getLong(String key);
     long getLong(String key, long defaultValue);        
-    String[] getStringArray(String key);    
+    String[] getStringArray(String key);
+    Iterator getKeys();
+    void setString(String key, String value);
 }

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/desktop/JetspeedDesktop.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/desktop/JetspeedDesktop.java?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/desktop/JetspeedDesktop.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/desktop/JetspeedDesktop.java
Wed Jul  4 22:37:00 2007
@@ -35,7 +35,7 @@
     String DEFAULT_DESKTOP_PIPELINE_PATH = "/desktop";
     String DEFAULT_DESKTOP_ACTION_PIPELINE_PATH = "/action";
     String DEFAULT_DESKTOP_RENDER_PIPELINE_PATH = "/render";
-    
+    String DEFAULT_DESKTOP_CONFIGURE_PIPELINE_PATH = "/dtconfigure";
 
     /**
      * Render a desktop theme.

Added: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/engine/Engine.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/engine/Engine.java?view=auto&rev=553375
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/engine/Engine.java
(added)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/engine/Engine.java
Wed Jul  4 22:37:00 2007
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.engine;
+
+import javax.servlet.ServletConfig;
+
+import org.apache.jetspeed.PortalContext;
+import org.apache.jetspeed.components.ComponentManager;
+import org.apache.jetspeed.exception.JetspeedException;
+import org.apache.jetspeed.pipeline.Pipeline;
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.pluto.services.PortletContainerEnvironment;
+import org.apache.pluto.services.factory.FactoryManagerService;
+
+
+/**
+ * Engine Abstraction - to run from both unit tests and servlet
+ *
+ * @author <a href="mailto:david@bluesunrise.com">David Sean Taylor</a>
+ * @version $Id: Engine.java 187178 2004-08-02 19:00:15Z weaver $
+ */
+public interface Engine extends JetspeedEngineConstants, FactoryManagerService, PortletContainerEnvironment

+{
+    /**
+     * Initializes the engine with a commons configuration, starting all early initable services.
+     *
+     * @throws JetspeedException when the engine fails to initilialize
+     */
+    public void start()
+       throws JetspeedException;
+
+    
+    /**
+     * Shuts down the Jetspeed engine and all associated services
+     *
+     * @throws JetspeedException when the engine fails to shutdown
+     */
+    public void shutdown()
+       throws JetspeedException;
+
+    /**
+     * Makes a service request to the engine.
+     *
+     * @param context a <code>RequestContext</code> with the state of the request.
+     * @throws JetspeedException when the engine fails to initilialize
+     */
+    public void service(RequestContext context)
+       throws JetspeedException;
+
+    /**
+     * Gets the engine's request default pipeline.
+     * 
+     * @return Pipeline The engine's request pipeline.
+     */
+    public Pipeline getPipeline();
+ 
+    /**
+     * Gets the specified engine's request pipeline.
+     * 
+     * @return Pipeline A specific request pipeline.
+     */ 
+    public Pipeline getPipeline(String pipelineName);
+ 
+    /**
+     * Get the Portal Context associated with running thread of the engine
+     * 
+     * @return PortalContext associated with this engine's thread
+     */
+    public PortalContext getContext();
+
+    /**
+     * Gets the real path to an application relative resource
+     * 
+     * @param path The application relative resource 
+     * @return String The real path to that resource
+     */
+    public String getRealPath(String path);
+    
+    /**
+     * Get the servlet configuration if this engine is running under a servlet container.
+     * 
+     * @return config The servlet configuration
+     */    
+    public ServletConfig getServletConfig();
+    
+    /**
+     * Returns the the RequestContext associated with the current
+     * thread.  This can be accessed throught <code>org.apache.jetspeed.Jetspeed</code>
+     * environment class.
+     * @return RequestContext associated with the current thread.
+     */
+    public RequestContext getCurrentRequestContext();
+
+    public ComponentManager getComponentManager();
+    
+    
+
+}

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/portalsite/PortalSiteSessionContext.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/portalsite/PortalSiteSessionContext.java?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/portalsite/PortalSiteSessionContext.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/portalsite/PortalSiteSessionContext.java
Wed Jul  4 22:37:00 2007
@@ -74,4 +74,17 @@
      * @return valid context status
      */
     boolean isValid();
+    
+    /**
+     * set which pipeline this context is stored for 
+     * 
+     * @param pipeline
+     */
+    void setPipeline(String pipeline);
+    
+    /**
+     * get which pipeline this context is stored for
+     */
+    String getPipeline();
 }
+

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/pipelines.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/pipelines.xml?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/pipelines.xml (original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/pipelines.xml Wed Jul  4 22:37:00
2007
@@ -323,6 +323,33 @@
     </constructor-arg>
   </bean> 
   
+  <bean id="configure-pipeline"
+        class="org.apache.jetspeed.pipeline.JetspeedPipeline"
+        init-method="initialize"
+  >
+   <constructor-arg>
+       <value>ConfigurePipeline</value>
+   </constructor-arg>
+   <constructor-arg>
+    <list>
+      <ref bean="capabilityValve"/>
+      <ref bean="portalURLValve"/>
+      <ref bean="securityValve"/>
+      <ref bean="localizationValve"/>
+      <ref bean="passwordCredentialValve"/>
+      <ref bean="loginValidationValve"/>
+      <ref bean="profilerValve"/>
+      <ref bean="containerValve"/>
+      <ref bean="actionValve"/>
+      <ref bean="resourceValve"/>
+      <ref bean="DecorationValve" />
+      <ref bean="headerAggregatorValvePortal"/>  
+      <ref bean="aggregatorValve"/>
+      <ref bean="cleanUpValve"/>
+    </list>
+    </constructor-arg>
+   </bean>
+	
   <bean id="login-pipeline"
         class="org.apache.jetspeed.pipeline.JetspeedPipeline"
         init-method="initialize"
@@ -499,6 +526,27 @@
     </list>
     </constructor-arg>
   </bean> 
+
+  <bean id="dtconfigure-pipeline"
+        class="org.apache.jetspeed.pipeline.JetspeedPipeline"
+        init-method="initialize"
+  >
+   <constructor-arg>
+       <value>DesktopConfigurePipeline</value>
+   </constructor-arg>
+   <constructor-arg>
+    <list>
+        <ref bean="capabilityValve"/>
+        <ref bean="portalURLValve"/>                
+        <ref bean="securityValve"/>                
+        <ref bean="localizationValve"/>
+        <ref bean="profilerValve"/>                        
+        <ref bean="headerAggregatorValveDesktop"/>          
+        <ref bean="desktopValve"/>
+    </list>
+    </constructor-arg>
+  </bean> 
+
       
   <bean id='pipeline-map'
         class='java.util.HashMap'>
@@ -536,6 +584,12 @@
             <entry key='/render'>
                 <value>desktop-render-pipeline</value>
             </entry>
+            <entry key='/configure'>
+                <value>configure-pipeline</value>
+            </entry>            
+            <entry key='/dtconfigure'>
+                <value>dtconfigure-pipeline</value>
+            </entry>                        
         </map>        
     </constructor-arg>        
   </bean>

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/web.xml?view=diff&rev=553375&r1=553374&r2=553375
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/web.xml (original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/web.xml Wed Jul  4 22:37:00 2007
@@ -217,6 +217,22 @@
          /render/*
        </url-pattern>
     </servlet-mapping>
+    <servlet-mapping>
+       <servlet-name>
+          jetspeed
+       </servlet-name>
+       <url-pattern>
+         /configure/*
+       </url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+       <servlet-name>
+          jetspeed
+       </servlet-name>
+       <url-pattern>
+         /dtconfigure/*
+       </url-pattern>
+    </servlet-mapping>
     
     <!-- Map *.vm files to Velocity  -->
 	<servlet-mapping>



---------------------------------------------------------------------
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