incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r713442 - in /incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall: jcr/impl/WatchedFolder.java osgi/impl/OsgiControllerImpl.java
Date Wed, 12 Nov 2008 18:04:56 GMT
Author: bdelacretaz
Date: Wed Nov 12 10:04:55 2008
New Revision: 713442

URL: http://svn.apache.org/viewvc?rev=713442&view=rev
Log:
SLING-728 - jcrinstall resources in /apps override the same resources found in /libs

Modified:
    incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/jcr/impl/WatchedFolder.java
    incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/osgi/impl/OsgiControllerImpl.java

Modified: incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/jcr/impl/WatchedFolder.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/jcr/impl/WatchedFolder.java?rev=713442&r1=713441&r2=713442&view=diff
==============================================================================
--- incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/jcr/impl/WatchedFolder.java
(original)
+++ incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/jcr/impl/WatchedFolder.java
Wed Nov 12 10:04:55 2008
@@ -207,10 +207,10 @@
         // be re-installed
         if(count > 0 && roRules!=null) {
             for(String str : roRules.getLowerPriorityResources(path)) {
-                rescanFoldersForPath(path, "Scheduling scan of lower priority {} folder after
deletes in {} folder");
+                rescanFoldersForPath(str, "Scheduling scan of lower priority {} folder after
deletes in {} folder");
             }
             for(String str : roRules.getHigherPriorityResources(path)) {
-                rescanFoldersForPath(path, "Scheduling scan of higher priority {} folder
after deletes in {} folder");
+                rescanFoldersForPath(str, "Scheduling scan of higher priority {} folder after
deletes in {} folder");
             }
         }
     }
@@ -218,7 +218,7 @@
     private void rescanFoldersForPath(String pathToScan, String logFormat) {
         for(WatchedFolder wf : allFolders) {
             if(pathToScan.equals(wf.path)) {
-                log.info(logFormat, wf.path, path);
+                log.info(logFormat, wf.path, pathToScan);
                 wf.scheduleScan();
             }
         }

Modified: incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/osgi/impl/OsgiControllerImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/osgi/impl/OsgiControllerImpl.java?rev=713442&r1=713441&r2=713442&view=diff
==============================================================================
--- incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/osgi/impl/OsgiControllerImpl.java
(original)
+++ incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/osgi/impl/OsgiControllerImpl.java
Wed Nov 12 10:04:55 2008
@@ -155,6 +155,17 @@
     }
 
     public void uninstall(String uri) throws JcrInstallException {
+        // If a corresponding higher priority resource is installed, ignore this request
+        if(roRules != null) {
+            for(String r : roRules.getHigherPriorityResources(uri)) {
+                if(storage.contains(r)) {
+                    log.info("Resource {} won't be uninstalled, overridden by {} which has
higher priority",
+                            uri, r);
+                    return;
+                }
+            }
+        }
+        
         try {
 	        // let each processor try to uninstall, one of them
         	// should know how that handle uri



Mime
View raw message