sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1686363 - in /sling/trunk/launchpad: api/ api/src/main/java/org/apache/sling/launchpad/api/ base/ base/src/main/java/org/apache/sling/launchpad/base/impl/ base/src/main/resources/ builder/src/main/provisioning/
Date Fri, 19 Jun 2015 06:35:29 GMT
Author: cziegeler
Date: Fri Jun 19 06:35:29 2015
New Revision: 1686363

URL: http://svn.apache.org/r1686363
Log:
SLING-4823 : Register a service when the system is ready

Added:
    sling/trunk/launchpad/api/src/main/java/org/apache/sling/launchpad/api/StartupService.java
  (with props)
    sling/trunk/launchpad/api/src/main/java/org/apache/sling/launchpad/api/package-info.java
  (with props)
Modified:
    sling/trunk/launchpad/api/pom.xml
    sling/trunk/launchpad/base/pom.xml
    sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/DefaultStartupHandler.java
    sling/trunk/launchpad/base/src/main/resources/sling.properties
    sling/trunk/launchpad/builder/src/main/provisioning/sling.txt

Modified: sling/trunk/launchpad/api/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/api/pom.xml?rev=1686363&r1=1686362&r2=1686363&view=diff
==============================================================================
--- sling/trunk/launchpad/api/pom.xml (original)
+++ sling/trunk/launchpad/api/pom.xml Fri Jun 19 06:35:29 2015
@@ -41,11 +41,6 @@
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
                 <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Export-Package>org.apache.sling.launchpad.api;version=1.1.0</Export-Package>
-                    </instructions>
-                </configuration>
             </plugin>
         </plugins>
     </build>

Added: sling/trunk/launchpad/api/src/main/java/org/apache/sling/launchpad/api/StartupService.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/api/src/main/java/org/apache/sling/launchpad/api/StartupService.java?rev=1686363&view=auto
==============================================================================
--- sling/trunk/launchpad/api/src/main/java/org/apache/sling/launchpad/api/StartupService.java
(added)
+++ sling/trunk/launchpad/api/src/main/java/org/apache/sling/launchpad/api/StartupService.java
Fri Jun 19 06:35:29 2015
@@ -0,0 +1,30 @@
+/*
+ * 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.sling.launchpad.api;
+
+
+/**
+ * The startup service is registered when the startup is finished.
+ *
+ * @since 1.2.0
+ */
+public interface StartupService {
+
+    StartupMode getStartupMode();
+}

Propchange: sling/trunk/launchpad/api/src/main/java/org/apache/sling/launchpad/api/StartupService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/trunk/launchpad/api/src/main/java/org/apache/sling/launchpad/api/StartupService.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: sling/trunk/launchpad/api/src/main/java/org/apache/sling/launchpad/api/package-info.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/api/src/main/java/org/apache/sling/launchpad/api/package-info.java?rev=1686363&view=auto
==============================================================================
--- sling/trunk/launchpad/api/src/main/java/org/apache/sling/launchpad/api/package-info.java
(added)
+++ sling/trunk/launchpad/api/src/main/java/org/apache/sling/launchpad/api/package-info.java
Fri Jun 19 06:35:29 2015
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+@Version("1.2.0")
+package org.apache.sling.launchpad.api;
+
+import aQute.bnd.annotation.Version;
+

Propchange: sling/trunk/launchpad/api/src/main/java/org/apache/sling/launchpad/api/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/trunk/launchpad/api/src/main/java/org/apache/sling/launchpad/api/package-info.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Modified: sling/trunk/launchpad/base/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/base/pom.xml?rev=1686363&r1=1686362&r2=1686363&view=diff
==============================================================================
--- sling/trunk/launchpad/base/pom.xml (original)
+++ sling/trunk/launchpad/base/pom.xml Fri Jun 19 06:35:29 2015
@@ -288,7 +288,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.launchpad.api</artifactId>
-            <version>1.1.0</version>
+            <version>1.1.1-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

Modified: sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/DefaultStartupHandler.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/DefaultStartupHandler.java?rev=1686363&r1=1686362&r2=1686363&view=diff
==============================================================================
--- sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/DefaultStartupHandler.java
(original)
+++ sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/DefaultStartupHandler.java
Fri Jun 19 06:35:29 2015
@@ -31,6 +31,7 @@ import org.apache.felix.framework.Logger
 import org.apache.sling.launchpad.api.StartupHandler;
 import org.apache.sling.launchpad.api.StartupListener;
 import org.apache.sling.launchpad.api.StartupMode;
+import org.apache.sling.launchpad.api.StartupService;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleEvent;
@@ -38,6 +39,7 @@ import org.osgi.framework.BundleListener
 import org.osgi.framework.FrameworkEvent;
 import org.osgi.framework.FrameworkListener;
 import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.startlevel.StartLevel;
 import org.osgi.util.tracker.ServiceTracker;
 import org.osgi.util.tracker.ServiceTrackerCustomizer;
@@ -102,6 +104,9 @@ public class DefaultStartupHandler
 
     private volatile Object[] logService;
 
+    /** Registration of the startup service. */
+    private volatile ServiceRegistration<StartupService> startupServiceReg;
+
     /**
      * Constructor.
      * @param context Bundle context
@@ -375,6 +380,16 @@ public class DefaultStartupHandler
             this.bundleContext.removeBundleListener(this);
         }
         this.bundleContext.removeFrameworkListener(this);
+
+        // register startup service
+        this.startupServiceReg = this.bundleContext.registerService(StartupService.class,
new StartupService() {
+
+            @Override
+            public StartupMode getStartupMode() {
+                return startupMode;
+            }
+
+            }, null);
     }
 
     /**

Modified: sling/trunk/launchpad/base/src/main/resources/sling.properties
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/base/src/main/resources/sling.properties?rev=1686363&r1=1686362&r2=1686363&view=diff
==============================================================================
--- sling/trunk/launchpad/base/src/main/resources/sling.properties (original)
+++ sling/trunk/launchpad/base/src/main/resources/sling.properties Fri Jun 19 06:35:29 2015
@@ -168,7 +168,7 @@ org.osgi.framework.executionenvironment=
 org.osgi.framework.system.packages= \
  ${osgi-core-packages}, \
  ${osgi-compendium-services}, \
- org.apache.sling.launchpad.api;version=1.1.0, \
+ org.apache.sling.launchpad.api;version=1.2.0, \
  ${jre-${java.specification.version}} \
  ${org.apache.sling.launcher.system.packages}
 

Modified: sling/trunk/launchpad/builder/src/main/provisioning/sling.txt
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/builder/src/main/provisioning/sling.txt?rev=1686363&r1=1686362&r2=1686363&view=diff
==============================================================================
--- sling/trunk/launchpad/builder/src/main/provisioning/sling.txt (original)
+++ sling/trunk/launchpad/builder/src/main/provisioning/sling.txt Fri Jun 19 06:35:29 2015
@@ -51,7 +51,7 @@
     org.apache.sling/org.apache.sling.servlets.get/2.1.11-SNAPSHOT
     org.apache.sling/org.apache.sling.servlets.post/2.3.7-SNAPSHOT
     org.apache.sling/org.apache.sling.jcr.contentloader/2.1.11-SNAPSHOT
-    org.apache.sling/org.apache.sling.jcr.resource/2.5.0
+    org.apache.sling/org.apache.sling.jcr.resource/2.5.1-SNAPSHOT
     org.apache.sling/org.apache.sling.bundleresource.impl/2.2.0
     org.apache.sling/org.apache.sling.fsresource/1.1.4
     org.apache.sling/org.apache.sling.launchpad.content/2.0.8



Mime
View raw message