incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r996562 - in /sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl: EntityResourceList.java tasks/BundleRemoveTask.java tasks/BundleTaskCreator.java
Date Mon, 13 Sep 2010 14:48:28 GMT
Author: cziegeler
Date: Mon Sep 13 14:48:27 2010
New Revision: 996562

URL: http://svn.apache.org/viewvc?rev=996562&view=rev
Log:
SLING-1737 : Add state management for resources

Modified:
    sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/EntityResourceList.java
    sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java
    sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleTaskCreator.java

Modified: sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/EntityResourceList.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/EntityResourceList.java?rev=996562&r1=996561&r2=996562&view=diff
==============================================================================
--- sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/EntityResourceList.java
(original)
+++ sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/EntityResourceList.java
Mon Sep 13 14:48:27 2010
@@ -64,7 +64,7 @@ public class EntityResourceList implemen
      * If this resource has been uninstalled, check the next in the list if it needs to
      * be reactivated.
      */
-    public void setFinishState(final RegisteredResource.State state) {
+    public void setFinishState(RegisteredResource.State state) {
         final RegisteredResource toActivate = getActiveResource();
         if ( toActivate != null
              && toActivate.getState() == RegisteredResource.State.UNINSTALL
@@ -85,6 +85,8 @@ public class EntityResourceList implemen
                 if ( second.getState() == RegisteredResource.State.INSTALL ) {
                     second.setState(RegisteredResource.State.IGNORED);
                 }
+                // and now set resource to uninstalled
+                state = RegisteredResource.State.UNINSTALLED;
             }
         }
         toActivate.setState(state);

Modified: sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java?rev=996562&r1=996561&r2=996562&view=diff
==============================================================================
--- sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java
(original)
+++ sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java
Mon Sep 13 14:48:27 2010
@@ -50,7 +50,7 @@ public class BundleRemoveTask extends Os
         final Bundle b = this.creator.getMatchingBundle(symbolicName);
         if (b == null) {
             // nothing to do, so just stop
-            this.setFinishedState(RegisteredResource.State.UNINSTALLED);
+            this.setFinishedState(RegisteredResource.State.IGNORED);
             return;
         }
         final int state = b.getState();

Modified: sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleTaskCreator.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleTaskCreator.java?rev=996562&r1=996561&r2=996562&view=diff
==============================================================================
--- sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleTaskCreator.java
(original)
+++ sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleTaskCreator.java
Mon Sep 13 14:48:27 2010
@@ -131,7 +131,7 @@ public class BundleTaskCreator {
 		        result = new BundleRemoveTask(resourceList, this);
 		    } else {
 	            logger.info("Bundle {} was not installed by this module, not removed", symbolicName);
-	            result = new ChangeStateTask(resourceList, RegisteredResource.State.UNINSTALLED);
+	            result = new ChangeStateTask(resourceList, RegisteredResource.State.IGNORED);
 	        }
 
 		// Install



Mime
View raw message