portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r828270 [1/4] - in /portals/jetspeed-2/portal/branches/JETSPEED-2.1.4: ./ components/file-cache/src/java/org/apache/jetspeed/cache/file/ components/page-manager/ components/page-manager/src/java/JETSPEED-INF/ojb/ components/page-manager/src...
Date Thu, 22 Oct 2009 01:23:07 GMT
Author: rwatler
Date: Thu Oct 22 01:23:05 2009
New Revision: 828270

URL: http://svn.apache.org/viewvc?rev=828270&view=rev
Log:
sync page-manager, portal-site, and profiler component implementations between 2.1.4 and 2.2.1

Added:
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/NodeOrderComparator.java   (contents, props changed)
      - copied, changed from r826945, portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/NodeOrderCompartaor.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/test/castor.properties
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/portal-site/src/test/castor.properties
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/portal/src/test/castor.properties
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/PrincipalCriterionResolver.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/registry/src/java/org/apache/jetspeed/util/ojb/CollectionUtils.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/etc/castor/
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/etc/castor/castor.properties
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/installer/etc/database/import/castor.properties
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/jetspeed-api/src/java/org/apache/jetspeed/profiler/rules/FallbackCriterionResolver.java
Removed:
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/NodeOrderCompartaor.java
Modified:
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/file-cache/src/java/org/apache/jetspeed/cache/file/FileCache.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/pom.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/JETSPEED-INF/ojb/page-manager-repository.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuElementImpl.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuExcludeDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuIncludeDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuOptionsDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuSeparatorDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentFragmentImpl.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/FragmentPropertyMap.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/PageManagerUtils.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/impl/NodeImpl.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/DocumentHandlerFactoryImpl.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/FileSystemFolderHandler.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManagerUtils.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/psml/CastorXmlPageManager.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/portal-site/src/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/portal-site/src/java/org/apache/jetspeed/om/page/proxy/LinkProxy.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/portal-site/src/java/org/apache/jetspeed/om/page/proxy/PageProxy.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/portal-site/src/java/org/apache/jetspeed/page/document/proxy/NodeProxy.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/profiler/src/java/JETSPEED-INF/ojb/profiler_repository.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/GroupCriterionResolver.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/RoleComboCriterionResolver.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/RoleCriterionResolver.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/RoleFallbackProfilingRule.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/RuleCriterionImpl.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/StandardResolver.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/security/src/java/org/apache/jetspeed/security/SecurityHelper.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/core-build.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/etc/import/build.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/installer/etc/database/build.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/jetspeed-api/src/java/org/apache/jetspeed/page/document/DocumentHandler.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/jetspeed-api/src/java/org/apache/jetspeed/page/document/DocumentHandlerFactory.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/jetspeed-api/src/java/org/apache/jetspeed/page/document/FolderHandler.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/maven-archetypes/portal/build.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/maven-archetypes/portal/src/archetype/archetype-resources/etc/dbpsml/build.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/maven-plugin/maven.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/maven-plugin/plugin.jelly
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/maven.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/pom.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/portal/build.xml

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/file-cache/src/java/org/apache/jetspeed/cache/file/FileCache.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/file-cache/src/java/org/apache/jetspeed/cache/file/FileCache.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/file-cache/src/java/org/apache/jetspeed/cache/file/FileCache.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/file-cache/src/java/org/apache/jetspeed/cache/file/FileCache.java Thu Oct 22 01:23:05 2009
@@ -227,6 +227,17 @@
     }
 
     /**
+     * Remove a File Cache Event Listener 
+     *
+     * @param listener the event listener
+     */
+    public void removeListener(final FileCacheEventListener listener)
+    {
+        listeners.remove(listener);
+    }
+
+
+    /**
      * Start the file Scanner running at the current scan rate.
      *
      */

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/pom.xml?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/pom.xml (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/pom.xml Thu Oct 22 01:23:05 2009
@@ -74,6 +74,10 @@
             <groupId>commons-logging</groupId>
             <artifactId>commons-logging</artifactId>
         </dependency>
+        <dependency>
+            <groupId>dom4j</groupId>
+            <artifactId>dom4j</artifactId>
+        </dependency>
 
         <!-- Test Dependencies -->
         <dependency>

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/JETSPEED-INF/ojb/page-manager-repository.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/JETSPEED-INF/ojb/page-manager-repository.xml?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/JETSPEED-INF/ojb/page-manager-repository.xml (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/JETSPEED-INF/ojb/page-manager-repository.xml Thu Oct 22 01:23:05 2009
@@ -57,6 +57,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
       >
          <inverse-foreignkey field-ref="folderId"/>
       </collection-descriptor>
@@ -176,6 +177,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="applyOrder" sort="ASC"/>
          <inverse-foreignkey field-ref="folderId"/>
@@ -187,6 +189,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="applyOrder" sort="ASC"/>
          <inverse-foreignkey field-ref="folderId"/>
@@ -198,6 +201,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="sortOrder" sort="ASC"/>
          <inverse-foreignkey field-ref="folderId"/>
@@ -209,6 +213,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="name" sort="ASC"/>
          <inverse-foreignkey field-ref="folderId"/>
@@ -487,6 +492,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
       >
          <inverse-foreignkey field-ref="menuId"/>
       </collection-descriptor>
@@ -497,6 +503,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="elementOrder" sort="ASC"/>
          <inverse-foreignkey field-ref="parentId"/>
@@ -717,6 +724,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
       >
          <inverse-foreignkey field-ref="menuId"/>
       </collection-descriptor>
@@ -801,6 +809,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <inverse-foreignkey field-ref="pageId"/>
       </collection-descriptor>
@@ -811,6 +820,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
       >
          <inverse-foreignkey field-ref="pageId"/>
       </collection-descriptor>
@@ -930,6 +940,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="applyOrder" sort="ASC"/>
          <inverse-foreignkey field-ref="pageId"/>
@@ -941,6 +952,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="applyOrder" sort="ASC"/>
          <inverse-foreignkey field-ref="pageId"/>
@@ -952,6 +964,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="name" sort="ASC"/>
          <inverse-foreignkey field-ref="pageId"/>
@@ -1199,6 +1212,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
       >
          <inverse-foreignkey field-ref="menuId"/>
       </collection-descriptor>
@@ -1209,6 +1223,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="elementOrder" sort="ASC"/>
          <inverse-foreignkey field-ref="parentId"/>
@@ -1429,6 +1444,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
       >
          <inverse-foreignkey field-ref="menuId"/>
       </collection-descriptor>
@@ -1501,6 +1517,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="id" sort="ASC"/>
          <inverse-foreignkey field-ref="parentId"/>
@@ -1645,6 +1662,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="applyOrder" sort="ASC"/>
          <inverse-foreignkey field-ref="fragmentId"/>
@@ -1656,6 +1674,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="applyOrder" sort="ASC"/>
          <inverse-foreignkey field-ref="fragmentId"/>
@@ -1667,6 +1686,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="name" sort="ASC"/>
          <inverse-foreignkey field-ref="fragmentId"/>
@@ -1797,6 +1817,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <inverse-foreignkey field-ref="prefId"/>
       </collection-descriptor>
@@ -1873,6 +1894,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
       >
          <inverse-foreignkey field-ref="pageId"/>
       </collection-descriptor>
@@ -1992,6 +2014,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="applyOrder" sort="ASC"/>
          <inverse-foreignkey field-ref="pageId"/>
@@ -2003,6 +2026,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="applyOrder" sort="ASC"/>
          <inverse-foreignkey field-ref="pageId"/>
@@ -2241,6 +2265,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="name" sort="ASC"/>
          <inverse-foreignkey field-ref="pageSecurityId"/>
@@ -2252,6 +2277,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="applyOrder" sort="ASC"/>
          <inverse-foreignkey field-ref="pageSecurityId"/>
@@ -2289,6 +2315,7 @@
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
          <orderby name="applyOrder" sort="ASC"/>
          <inverse-foreignkey field-ref="constraintsDefId"/>

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java Thu Oct 22 01:23:05 2009
@@ -49,7 +49,7 @@
 import org.apache.jetspeed.page.document.NodeSet;
 import org.apache.jetspeed.page.document.UnsupportedDocumentTypeException;
 import org.apache.jetspeed.page.document.psml.AbstractNode;
-import org.apache.jetspeed.page.document.psml.NodeOrderCompartaor;
+import org.apache.jetspeed.page.document.psml.NodeOrderComparator;
 import org.apache.jetspeed.page.document.psml.NodeSetImpl;
 import org.apache.jetspeed.security.FolderPermission;
 
@@ -515,11 +515,11 @@
             {
                 if (getPath().endsWith(PATH_SEPARATOR))
                 {
-                    allNodes = new NodeSetImpl(getPath(), new NodeOrderCompartaor(metadata.getDocumentOrder(), getPath()));
+                    allNodes = new NodeSetImpl(getPath(), new NodeOrderComparator(metadata.getDocumentOrder(), getPath()));
                 }
                 else
                 {
-                    allNodes = new NodeSetImpl(getPath(), new NodeOrderCompartaor(metadata.getDocumentOrder(), getPath() + PATH_SEPARATOR));
+                    allNodes = new NodeSetImpl(getPath(), new NodeOrderComparator(metadata.getDocumentOrder(), getPath() + PATH_SEPARATOR));
                 }
             }
             else

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuDefinitionImpl.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuDefinitionImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuDefinitionImpl.java Thu Oct 22 01:23:05 2009
@@ -20,6 +20,7 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.jetspeed.om.folder.MenuDefinition;
 
 /**
@@ -407,4 +408,35 @@
             menuElementImpls = null;            
         }
     }
+
+    /*
+     * (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    public boolean equals(Object obj)
+    {
+        if (!(obj instanceof MenuDefinition))
+        {
+            return false;
+        }
+        else
+        {
+            
+            MenuDefinition definition = (MenuDefinition) obj;
+            if (!StringUtils.equals(definition.getName(),name) || !StringUtils.equals(definition.getOptions(),options) || definition.getDepth() != depth ||
+                definition.isPaths() != paths || definition.isRegexp() != regexp || !StringUtils.equals(definition.getProfile(),profile) ||
+                !StringUtils.equals(definition.getOrder(),order) || !StringUtils.equals(definition.getSkin(),skin) || !StringUtils.equals(definition.getTitle(),title))
+            {
+                return false;
+            }
+            if (definition.getMenuElements() != null && menuElements != null)
+            {
+                if (definition.getMenuElements().size() != menuElements.size())
+                {
+                    return false;
+                }
+            }
+            return true;
+        }
+    }
 }

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuElementImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuElementImpl.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuElementImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuElementImpl.java Thu Oct 22 01:23:05 2009
@@ -16,6 +16,8 @@
  */
 package org.apache.jetspeed.om.folder.psml;
 
+import java.io.Serializable;
+
 /**
  * This class implements a wrapper used to implement
  * the ordered polymorphic menu elements collection.
@@ -23,7 +25,7 @@
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-public class MenuElementImpl
+public class MenuElementImpl implements Serializable
 {
     /**
      * element - wrapped menu element

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuExcludeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuExcludeDefinitionImpl.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuExcludeDefinitionImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuExcludeDefinitionImpl.java Thu Oct 22 01:23:05 2009
@@ -16,6 +16,7 @@
  */
 package org.apache.jetspeed.om.folder.psml;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.jetspeed.om.folder.MenuExcludeDefinition;
 
 /**
@@ -59,4 +60,21 @@
     {
         this.name = name;
     }
+
+    public boolean equals(Object obj)
+    {
+        if (!(obj instanceof MenuExcludeDefinition))
+        {
+            return false;
+        }
+        else
+        {
+            MenuExcludeDefinition definition = (MenuExcludeDefinition) obj;
+            if (!StringUtils.equals(definition.getName(), name))
+            {
+                return false;
+            }
+            return true;
+        }
+    }
 }

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuIncludeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuIncludeDefinitionImpl.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuIncludeDefinitionImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuIncludeDefinitionImpl.java Thu Oct 22 01:23:05 2009
@@ -16,6 +16,7 @@
  */
 package org.apache.jetspeed.om.folder.psml;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.jetspeed.om.folder.MenuIncludeDefinition;
 
 /**
@@ -84,4 +85,21 @@
     {
         this.nest = nest;
     }
+
+    public boolean equals(Object obj)
+    {
+        if (!(obj instanceof MenuIncludeDefinition))
+        {
+            return false;
+        }
+        else
+        {
+            MenuIncludeDefinition definition = (MenuIncludeDefinition) obj;
+            if (!StringUtils.equals(definition.getName(), name)|| definition.isNest()!=nest)
+            {
+                return false;
+            }
+            return true;
+        }
+    }
 }

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuOptionsDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuOptionsDefinitionImpl.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuOptionsDefinitionImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuOptionsDefinitionImpl.java Thu Oct 22 01:23:05 2009
@@ -16,7 +16,9 @@
  */
 package org.apache.jetspeed.om.folder.psml;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.jetspeed.om.folder.MenuOptionsDefinition;
+import org.apache.jetspeed.om.folder.MenuSeparatorDefinition;
 
 /**
  * This class implements the MenuOptionsDefinition
@@ -209,4 +211,23 @@
     {
         skin = name;
     }
+
+    public boolean equals(Object obj)
+    {
+        if (!(obj instanceof MenuOptionsDefinition))
+        {
+            return false;
+        }
+        else
+        {
+            MenuOptionsDefinition definition = (MenuOptionsDefinition) obj;
+            if (!StringUtils.equals(definition.getOptions(), options) || !StringUtils.equals(definition.getProfile(), profile) ||
+                !StringUtils.equals(definition.getOrder(), order) || !StringUtils.equals(definition.getSkin(), skin) || definition.getDepth() != depth ||
+                definition.isPaths() != paths || definition.isRegexp() != regexp)
+            {
+                return false;
+            }
+            return true;
+        }
+    }
 }

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuSeparatorDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuSeparatorDefinitionImpl.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuSeparatorDefinitionImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuSeparatorDefinitionImpl.java Thu Oct 22 01:23:05 2009
@@ -16,6 +16,7 @@
  */
 package org.apache.jetspeed.om.folder.psml;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.jetspeed.om.folder.MenuSeparatorDefinition;
 
 /**
@@ -174,4 +175,21 @@
             }
         }
     }
+
+    public boolean equals(Object obj)
+    {
+        if (!(obj instanceof MenuSeparatorDefinition))
+        {
+            return false;
+        }
+        else
+        {
+            MenuSeparatorDefinition definition = (MenuSeparatorDefinition) obj;
+            if (!StringUtils.equals(definition.getTitle(), title)|| !StringUtils.equals(definition.getText(),text))
+            {
+                return false;
+            }
+            return true;
+        }
+    }    
 }

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentFragmentImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentFragmentImpl.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentFragmentImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentFragmentImpl.java Thu Oct 22 01:23:05 2009
@@ -45,15 +45,15 @@
     private boolean instantlyRendered;
     
 
-    public ContentFragmentImpl(Fragment fragment, Map cachedFagments)
+    public ContentFragmentImpl(Fragment fragment, Map cachedFragments)
     {
-        this(fragment, cachedFagments, false);
+        this(fragment, cachedFragments, false);
     }
 
-    public ContentFragmentImpl(Fragment fragment, Map cachedFagments, boolean instantlyRendered)
+    public ContentFragmentImpl(Fragment fragment, Map cachedFragments, boolean instantlyRendered)
     {
         this.fragment = fragment;
-        this.cachedFragments = cachedFagments;
+        this.cachedFragments = cachedFragments;
         this.instantlyRendered = instantlyRendered;
     }
 

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/FragmentPropertyMap.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/FragmentPropertyMap.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/FragmentPropertyMap.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/FragmentPropertyMap.java Thu Oct 22 01:23:05 2009
@@ -18,13 +18,12 @@
 
 import java.util.AbstractMap;
 import java.util.AbstractSet;
+import java.util.HashSet;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.jetspeed.page.impl.DatabasePageManagerUtils;
-
 /**
  * FragmentPropertyMap
  *
@@ -85,7 +84,7 @@
 
     private class FragmentPropertiesEntrySet extends AbstractSet
     {
-        private Collection entries = DatabasePageManagerUtils.createCollection();
+        private Set entries = new HashSet();
 
         /* (non-Javadoc)
          * @see java.util.Set#add(java.lang.Object)

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java Thu Oct 22 01:23:05 2009
@@ -723,6 +723,14 @@
     }
 
     /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.PageManager#shutdown()
+     */
+    public void shutdown()
+    {
+        // nothing to shutdown by default
+    }
+
+    /* (non-Javadoc)
      * @see org.apache.jetspeed.page.PageManager#isDistributed()
      */
     public boolean isDistributed()
@@ -1273,6 +1281,18 @@
         PageManagerUtils.deepCopyFolder(this, srcFolder, destinationPath, owner);
     }
             
+    /**
+     * Deep merge a folder
+     *  
+     * @param source source folder
+     * @param dest destination folder
+     */
+    public void deepMergeFolder(Folder srcFolder, String destinationPath, String owner)
+    throws NodeException
+    {
+        PageManagerUtils.deepMergeFolder(this, srcFolder, destinationPath, owner);
+    }
+    
     public Page getUserPage(String userName, String pageName)
     throws PageNotFoundException, NodeException
     {

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/PageManagerUtils.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/PageManagerUtils.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/PageManagerUtils.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/PageManagerUtils.java Thu Oct 22 01:23:05 2009
@@ -272,5 +272,72 @@
             deepCopyFolder(pageManager, folder, newPath, null);
         }        
     }
+
+    /**
+     * Deep merge a folder
+     *  
+     * @param source source folder
+     * @param dest destination folder
+     */
+    public static void deepMergeFolder(PageManager pageManager, Folder srcFolder, String destinationPath, String owner)
+    throws NodeException
+    {
+        boolean found = true;
+        Folder dstFolder = null;
+        try
+        {
+            dstFolder = pageManager.getFolder(destinationPath);
+        }
+        catch (FolderNotFoundException e)
+        {
+            found = false;
+        }
+        if (!found)
+        {
+            dstFolder = pageManager.copyFolder(srcFolder, destinationPath);
+            if (owner != null)
+            {
+                SecurityConstraints constraints = dstFolder.getSecurityConstraints();
+                if (constraints == null)
+                {
+                    constraints = pageManager.newSecurityConstraints();
+                    dstFolder.setSecurityConstraints(constraints);
+                }
+                dstFolder.getSecurityConstraints().setOwner(owner);
+            }
+            pageManager.updateFolder(dstFolder);
+        }
+        Iterator pages = srcFolder.getPages().iterator();
+        while (pages.hasNext())
+        {
+            Page srcPage = (Page)pages.next();
+            String path = PageManagerUtils.concatenatePaths(destinationPath, srcPage.getName());
+            if (!pageManager.pageExists(path))
+            {
+                Page dstPage = pageManager.copyPage(srcPage, path);
+                pageManager.updatePage(dstPage);
+            }
+        }
+     
+        Iterator links = srcFolder.getLinks().iterator();
+        while (links.hasNext())
+        {
+            Link srcLink = (Link)links.next();
+            String path = PageManagerUtils.concatenatePaths(destinationPath, srcLink.getName());
+            if (!pageManager.linkExists(path))
+            {            
+                Link dstLink = pageManager.copyLink(srcLink, path);
+                pageManager.updateLink(dstLink);
+            }
+        }
+     
+        Iterator folders = srcFolder.getFolders().iterator();
+        while (folders.hasNext())
+        {
+            Folder folder = (Folder)folders.next();
+            String newPath = concatenatePaths(destinationPath, folder.getName()); 
+            deepMergeFolder(pageManager, folder, newPath, null);
+        }        
+    }
     
 }

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/impl/NodeImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/impl/NodeImpl.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/impl/NodeImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/impl/NodeImpl.java Thu Oct 22 01:23:05 2009
@@ -113,7 +113,7 @@
         {
             if (metadataFields == null)
             {
-                metadataFields = DatabasePageManagerUtils.createList();
+                metadataFields = DatabasePageManagerUtils.createCollection();
             }
             pageMetadata = newPageMetadata(metadataFields);
         }

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java Thu Oct 22 01:23:05 2009
@@ -36,7 +36,6 @@
 import org.apache.jetspeed.cache.file.FileCache;
 import org.apache.jetspeed.cache.file.FileCacheEntry;
 import org.apache.jetspeed.cache.file.FileCacheEventListener;
-import org.apache.jetspeed.om.common.SecurityConstraints;
 import org.apache.jetspeed.om.folder.psml.FolderImpl;
 import org.apache.jetspeed.om.page.Document;
 import org.apache.jetspeed.om.page.psml.AbstractBaseElement;
@@ -48,11 +47,10 @@
 import org.apache.jetspeed.page.document.FailedToUpdateDocumentException;
 import org.apache.jetspeed.page.document.Node;
 import org.apache.jetspeed.page.document.NodeException;
-import org.apache.xml.serialize.OutputFormat;
-import org.apache.xml.serialize.Serializer;
-import org.apache.xml.serialize.XMLSerializer;
 import org.castor.mapping.BindingType;
 import org.castor.mapping.MappingUnmarshaller;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.XMLWriter;
 import org.exolab.castor.mapping.Mapping;
 import org.exolab.castor.mapping.MappingException;
 import org.exolab.castor.mapping.MappingLoader;
@@ -120,10 +118,9 @@
         verifyPath(documentRootDir);
         this.fileCache = fileCache;
         this.fileCache.addListener(this);
-        this.format = new OutputFormat();
-        format.setIndenting(true);
-        format.setIndent(4);
-        format.setEncoding(PSML_DOCUMENT_ENCODING);
+        this.format = new OutputFormat("    ", true, PSML_DOCUMENT_ENCODING);
+        this.format.setXHTML(true);
+        this.format.setExpandEmptyElements(false);
         
         SAXParserFactory factory = SAXParserFactory.newInstance();
         SAXParser parser = factory.newSAXParser();
@@ -222,7 +219,6 @@
                 documentImpl.setConstraintsEnabled(false);            
             }
             documentImpl.marshalling();
-            
             // marshal page to disk
             String fileName = path;        
             if (!fileName.endsWith(this.documentType))
@@ -236,8 +232,8 @@
             // polymorphic collection to strip artifical <menu-element>
             // tags enabling Castor XML binding; see JETSPEED-INF/castor/page-mapping.xml
             writer = new OutputStreamWriter(new FileOutputStream(f), PSML_DOCUMENT_ENCODING);
-            Serializer serializer = new XMLSerializer(writer, this.format);
-            final ContentHandler handler = serializer.asContentHandler();
+            XMLWriter xmlWriter = new XMLWriter(writer, this.format);
+            final ContentHandler handler = xmlWriter;
             
             Marshaller marshaller = new Marshaller(new ContentHandler()
                 {
@@ -711,20 +707,16 @@
         if (entry.getDocument() instanceof Document && ((Document) entry.getDocument()).getPath().endsWith(documentType))
         {
             Document document = (Document) entry.getDocument();
-            Document freshDoc = getDocument(document.getPath(), false);
             Node parent = ((AbstractNode)document).getParent(false);
- 
-            freshDoc.setParent(parent);
-            if(parent instanceof FolderImpl)
+            if (parent instanceof FolderImpl)
             {
-                FolderImpl folder = (FolderImpl) parent;
-                folder.getAllNodes().add(freshDoc);
+                Document freshDoc = getDocument(document.getPath(), false);
+                freshDoc.setParent(parent);
+                ((FolderImpl)parent).getAllNodes().add(freshDoc);
+                freshDoc.setPath(document.getPath());
+                entry.setDocument(freshDoc);
             }
-            
-            freshDoc.setPath(document.getPath());
-            entry.setDocument(freshDoc);            
         }
-
     }
 
     /**
@@ -781,4 +773,12 @@
         this.handlerFactory = factory;
     }
 
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.DocumentHandler#shutdown()
+     */
+    public void shutdown()
+    {
+        // disconnect cache listener
+        fileCache.removeListener(this);
+    }    
 }

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/DocumentHandlerFactoryImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/DocumentHandlerFactoryImpl.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/DocumentHandlerFactoryImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/DocumentHandlerFactoryImpl.java Thu Oct 22 01:23:05 2009
@@ -202,4 +202,17 @@
     {
         constraintsEnabled = enabled;
     }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.DocumentHandlerFactory#shutdown()
+     */
+    public void shutdown()
+    {
+        // propagate to handlers        
+        Iterator handlersIter = handlers.values().iterator();
+        while (handlersIter.hasNext())
+        {
+            ((DocumentHandler)handlersIter.next()).shutdown();
+        }
+    }    
 }

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/FileSystemFolderHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/FileSystemFolderHandler.java?rev=828270&r1=828269&r2=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/FileSystemFolderHandler.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/FileSystemFolderHandler.java Thu Oct 22 01:23:05 2009
@@ -665,6 +665,14 @@
         }
     }
 
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.FolderHandler#shutdown()
+     */
+    public void shutdown()
+    {
+        // disconnect cache listener
+        fileCache.removeListener(this);
+    }    
 
     /**
      * <p>
@@ -711,9 +719,10 @@
         {
             Folder folder = (Folder) entry.getDocument();            
             entry.setDocument(getFolder(folder.getPath(), false));
-            if (((AbstractNode)folder).getParent(false) != null)
+            Node parentNode = ((AbstractNode)folder).getParent(false);
+            if (parentNode != null)
             {
-                FileCacheEntry parentEntry = fileCache.get(((AbstractNode)folder).getParent(false).getPath());
+                FileCacheEntry parentEntry = fileCache.get(parentNode.getPath());
                 refresh(parentEntry);                
             }
         }
@@ -722,8 +731,12 @@
             Document doc = (Document) entry.getDocument();
             if (doc.getType().equals(FolderMetaDataImpl.DOCUMENT_TYPE))
             {
-                FileCacheEntry folderEntry = fileCache.get(((AbstractNode)doc).getParent().getPath());
-                refresh(folderEntry);
+                Node folderNode = ((AbstractNode)doc).getParent(false);
+                if (folderNode != null)
+                {                
+                    FileCacheEntry folderEntry = fileCache.get(folderNode.getPath());
+                    refresh(folderEntry);
+                }
             }
         }
         
@@ -731,7 +744,6 @@
         {
             ((Reset)entry.getDocument()).reset();
         }
-
     }
 
     /**

Copied: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/NodeOrderComparator.java (from r826945, portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/NodeOrderCompartaor.java)
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/NodeOrderComparator.java?p2=portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/NodeOrderComparator.java&p1=portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/NodeOrderCompartaor.java&r1=826945&r2=828270&rev=828270&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/NodeOrderCompartaor.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/NodeOrderComparator.java Thu Oct 22 01:23:05 2009
@@ -37,7 +37,7 @@
  * @version $Id$
  *  
  */
-public class NodeOrderCompartaor implements Comparator
+public class NodeOrderComparator implements Comparator
 {
     private List nodeIndex;
     private String relativePath="";
@@ -45,7 +45,7 @@
     /**
      *  
      */
-    public NodeOrderCompartaor( List nodeIndex, String relativePath )
+    public NodeOrderComparator( List nodeIndex, String relativePath )
     {
         super();
         this.nodeIndex = nodeIndex;        

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/NodeOrderComparator.java
------------------------------------------------------------------------------
    cvs2svn:cvs-rev = 1.1

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/NodeOrderComparator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/NodeOrderComparator.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.4/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/NodeOrderComparator.java
------------------------------------------------------------------------------
    svn:mergeinfo = 



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