sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1767223 - in /sling/trunk/installer/core/src/main/java/org/apache/sling/installer: api/tasks/InstallTaskFactory.java api/tasks/ResourceTransformer.java core/impl/OsgiInstallerImpl.java
Date Mon, 31 Oct 2016 07:47:00 GMT
Author: cziegeler
Date: Mon Oct 31 07:47:00 2016
New Revision: 1767223

URL: http://svn.apache.org/viewvc?rev=1767223&view=rev
Log:
SLING-5779 : Packaged OSGi config intermittently do not get installed before bundle start

Modified:
    sling/trunk/installer/core/src/main/java/org/apache/sling/installer/api/tasks/InstallTaskFactory.java
    sling/trunk/installer/core/src/main/java/org/apache/sling/installer/api/tasks/ResourceTransformer.java
    sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/OsgiInstallerImpl.java

Modified: sling/trunk/installer/core/src/main/java/org/apache/sling/installer/api/tasks/InstallTaskFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/core/src/main/java/org/apache/sling/installer/api/tasks/InstallTaskFactory.java?rev=1767223&r1=1767222&r2=1767223&view=diff
==============================================================================
--- sling/trunk/installer/core/src/main/java/org/apache/sling/installer/api/tasks/InstallTaskFactory.java
(original)
+++ sling/trunk/installer/core/src/main/java/org/apache/sling/installer/api/tasks/InstallTaskFactory.java
Mon Oct 31 07:47:00 2016
@@ -31,6 +31,13 @@ import org.osgi.annotation.versioning.Co
 public interface InstallTaskFactory {
 
     /**
+     * Optional service registration property setting a unique name
+     * for the task factory.
+     * @since 1.4.0
+     */
+    String NAME = "installtaskfactory.name";
+
+    /**
      * Creates an {@link InstallTask} for the resource or
      * <code>null</code> if the factory does not support the resource.
      *

Modified: sling/trunk/installer/core/src/main/java/org/apache/sling/installer/api/tasks/ResourceTransformer.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/core/src/main/java/org/apache/sling/installer/api/tasks/ResourceTransformer.java?rev=1767223&r1=1767222&r2=1767223&view=diff
==============================================================================
--- sling/trunk/installer/core/src/main/java/org/apache/sling/installer/api/tasks/ResourceTransformer.java
(original)
+++ sling/trunk/installer/core/src/main/java/org/apache/sling/installer/api/tasks/ResourceTransformer.java
Mon Oct 31 07:47:00 2016
@@ -31,6 +31,13 @@ import org.osgi.annotation.versioning.Co
 public interface ResourceTransformer {
 
     /**
+     * Optional service registration property setting a unique name
+     * for the transformer.
+     * @since 1.4.0
+     */
+    String NAME = "resourcetransformer.name";
+
+    /**
      * Try to transform the registered resource.
      * If the transformer is not responsible for transforming the
      * resource, it should return <code>null</code>

Modified: sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/OsgiInstallerImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/OsgiInstallerImpl.java?rev=1767223&r1=1767222&r2=1767223&view=diff
==============================================================================
--- sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/OsgiInstallerImpl.java
(original)
+++ sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/OsgiInstallerImpl.java
Mon Oct 31 07:47:00 2016
@@ -83,9 +83,14 @@ public class OsgiInstallerImpl
 implements OsgiInstaller, ResourceChangeListener, RetryHandler, InfoProvider, Runnable {
 
     /**
-     * The name of the bundle context property defining handling of bundle updates
+     * The name of the framework property defining handling of bundle updates
      */
-    private static final String START_LEVEL_HANDLING = "sling.installer.switchstartlevel";
+    private static final String PROP_START_LEVEL_HANDLING = "sling.installer.switchstartlevel";
+
+    /**
+     * The name of the framework property setting required services
+     */
+    private static final String PROP_REQUIRED_SERVICES = "sling.installer.requiredservices";
 
     /** The logger */
     private final Logger logger =  LoggerFactory.getLogger(this.getClass());
@@ -150,7 +155,7 @@ implements OsgiInstaller, ResourceChange
         final File f = FileDataStore.SHARED.getDataFile("RegisteredResourceList.ser");
         this.listener = new InstallListener(ctx, logger);
         this.persistentList = new PersistentResourceList(f, listener);
-        this.switchStartLevel = PropertiesUtil.toBoolean(ctx.getProperty(START_LEVEL_HANDLING),
false);
+        this.switchStartLevel = PropertiesUtil.toBoolean(ctx.getProperty(PROP_START_LEVEL_HANDLING),
false);
     }
 
     /**
@@ -751,6 +756,7 @@ implements OsgiInstaller, ResourceChange
 
             final InstallationContext ctx = new InstallationContext() {
 
+                @SuppressWarnings("deprecation")
                 @Override
                 public void addTaskToNextCycle(final InstallTask t) {
                     logger.warn("Deprecated method addTaskToNextCycle was called. Task will
be executed in this cycle instead: {}", t);
@@ -767,6 +773,7 @@ implements OsgiInstaller, ResourceChange
                     }
                 }
 
+                @SuppressWarnings("deprecation")
                 @Override
                 public void addAsyncTask(final InstallTask t) {
                     if ( t.isAsynchronousTask() ) {



Mime
View raw message