You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:33:32 UTC

[sling-org-apache-sling-event-dea] annotated tag org.apache.sling.event.dea-1.0.2 created (now 3f99dd8)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to annotated tag org.apache.sling.event.dea-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git.


      at 3f99dd8  (tag)
 tagging 7835bf24db902be6896a67dc6cb08e9f72f05f8b (commit)
      by Carsten Ziegeler
      on Wed Jul 15 12:04:26 2015 +0000

- Log -----------------------------------------------------------------
org.apache.sling.event.dea-1.0.2
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new d715c2e  SLING-3882 : Move the distributed event admin into a separate project
     new 82bf84c  Update svn properties
     new c447797  Update to latest API version
     new e74ac43  Use released SLING API
     new ca962c6  [maven-release-plugin] prepare release org.apache.sling.event.dea-1.0.0
     new 3a9b2a7  [maven-release-plugin] prepare for next development iteration
     new bb155eb  Use latest parent pom
     new 61186e0  SLING-4698 - Set parent.relativePath to empty for all modules
     new 49f716a  SLING-4758 : Make the DEA bundle usable on older Sling installations
     new d137c00  Update to Sling Parent 23
     new b7468c1  Remove superflous sling.java.version=6 as it's the default now
     new 438dd1c  set parent version to 24 and add empty relativePath where missing
     new a0e7910  [maven-release-plugin] prepare release org.apache.sling.event.dea-1.0.2
     new 7835bf2  [maven-release-plugin] copy for tag org.apache.sling.event.dea-1.0.2

The 14 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].

[sling-org-apache-sling-event-dea] 07/09: set parent version to 24 and add empty relativePath where missing

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.event.dea-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 438dd1ce2e280adb442918a66d2fe7c050f90c7c
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jul 7 08:09:17 2015 +0000

    set parent version to 24 and add empty relativePath where missing
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea@1689593 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index fa1a215..51dee7e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>23</version>
+        <version>24</version>
         <relativePath/>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 01/09: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.event.dea-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 3a9b2a773966fbc97496b0f620917a569f4c8d7d
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Oct 21 07:18:51 2014 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea@1633292 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 7830ea4..0dd5a31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>org.apache.sling.event.dea</artifactId>
     <packaging>bundle</packaging>
-    <version>1.0.0</version>
+    <version>1.0.1-SNAPSHOT</version>
 
     <name>Apache Sling Distributed Event Admin</name>
     <description>
@@ -37,9 +37,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.0</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.0</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.event.dea-1.0.0</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/dea</url>
     </scm>
 
     <properties>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 05/09: Update to Sling Parent 23

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.event.dea-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit d137c0066a4f7a42baac7f1083af1ce0afff1b0b
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jun 25 13:08:16 2015 +0000

    Update to Sling Parent 23
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea@1687500 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 11606d1..c7a60d9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>22</version>
+        <version>23</version>
         <relativePath/>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 03/09: SLING-4698 - Set parent.relativePath to empty for all modules

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.event.dea-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 61186e061750ecf98d80d11b2aefe092e67cfdb8
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu May 7 10:14:40 2015 +0000

    SLING-4698 - Set parent.relativePath to empty for all modules
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea@1678154 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 9e084e2..a1bae10 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
         <version>22</version>
-        <relativePath>../../../parent/pom.xml</relativePath>
+        <relativePath/>
     </parent>
 
     <artifactId>org.apache.sling.event.dea</artifactId>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 02/09: Use latest parent pom

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.event.dea-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit bb155eb5547e520b117ea70ae0ef360fb08df35c
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Apr 15 08:04:18 2015 +0000

    Use latest parent pom
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea@1673674 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 0dd5a31..9e084e2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>19</version>
+        <version>22</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 09/09: [maven-release-plugin] copy for tag org.apache.sling.event.dea-1.0.2

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.event.dea-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 7835bf24db902be6896a67dc6cb08e9f72f05f8b
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Jul 15 12:04:26 2015 +0000

    [maven-release-plugin] copy for tag org.apache.sling.event.dea-1.0.2
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.2@1691186 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 08/09: [maven-release-plugin] prepare release org.apache.sling.event.dea-1.0.2

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.event.dea-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit a0e7910dedd0526f550b39fd72744ee02cd45fc6
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Jul 15 12:04:13 2015 +0000

    [maven-release-plugin] prepare release org.apache.sling.event.dea-1.0.2
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea@1691185 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index 51dee7e..3f90dc4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,12 +24,12 @@
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
         <version>24</version>
-        <relativePath/>
+        <relativePath />
     </parent>
 
     <artifactId>org.apache.sling.event.dea</artifactId>
     <packaging>bundle</packaging>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.2</version>
 
     <name>Apache Sling Distributed Event Admin</name>
     <description>
@@ -37,9 +37,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/dea</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.2</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.2</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.event.dea-1.0.2</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 06/09: Remove superflous sling.java.version=6 as it's the default now

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.event.dea-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit b7468c112ed055ebea20c9bce9c3b47dfce14357
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jun 25 13:14:53 2015 +0000

    Remove superflous sling.java.version=6 as it's the default now
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea@1687505 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index c7a60d9..fa1a215 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,11 +42,6 @@
         <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/dea</url>
     </scm>
 
-    <properties>
-        <sling.java.version>6</sling.java.version>
-    </properties>
-
-
     <build>
         <plugins>
             <plugin>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 04/09: SLING-4758 : Make the DEA bundle usable on older Sling installations

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.event.dea-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 49f716a2f9da0f6d46374b7c596d92a1d827abea
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu May 28 08:54:14 2015 +0000

    SLING-4758 : Make the DEA bundle usable on older Sling installations
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea@1682177 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            |  6 +--
 .../event/dea/impl/DistributedEventReceiver.java   |  8 ++--
 .../event/dea/impl/DistributedEventSender.java     |  4 +-
 .../sling/event/dea/impl/ResourceHelper.java       | 52 +++++++++++++++++++++-
 4 files changed, 60 insertions(+), 10 deletions(-)

diff --git a/pom.xml b/pom.xml
index a1bae10..11606d1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -91,12 +91,12 @@
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
-            <version>5.0.0</version>
+            <version>4.2.0</version>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.compendium</artifactId>
-            <version>5.0.0</version>
+            <version>4.2.0</version>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
@@ -113,7 +113,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
-            <version>2.8.0</version>
+            <version>2.4.0</version>
             <scope>provided</scope>
         </dependency>
       <!-- Testing -->
diff --git a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
index 5f6d2f9..995a0a9 100644
--- a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
@@ -97,7 +97,7 @@ public class DistributedEventReceiver
     private volatile Set<String> instances;
 
     /** The service registration. */
-    private volatile ServiceRegistration<?> serviceRegistration;
+    private volatile ServiceRegistration serviceRegistration;
 
     public DistributedEventReceiver(final BundleContext bundleContext,
             final String rootPath,
@@ -127,7 +127,7 @@ public class DistributedEventReceiver
                 props.put("scheduler.period", 1800L);
                 props.put("scheduler.concurrent", Boolean.FALSE);
 
-                final ServiceRegistration<?> reg =
+                final ServiceRegistration reg =
                         bundleContext.registerService(new String[] {EventHandler.class.getName(),
                                                                    Runnable.class.getName(),
                                                                    TopologyEventListener.class.getName()},
@@ -301,7 +301,7 @@ public class DistributedEventReceiver
                 final Resource baseResource = resolver.getResource(this.rootPath);
                 // sanity check - should never be null
                 if ( baseResource != null ) {
-                    final ResourceUtil.BatchResourceRemover brr = ResourceUtil.getBatchResourceRemover(50);
+                    final ResourceHelper.BatchResourceRemover brr = ResourceHelper.getBatchResourceRemover(50);
                     final Iterator<Resource> iter = baseResource.listChildren();
                     while ( iter.hasNext() ) {
                         final Resource rootResource = iter.next();
@@ -333,7 +333,7 @@ public class DistributedEventReceiver
             ResourceResolver resolver = null;
             try {
                 resolver = this.resourceResolverFactory.getAdministrativeResourceResolver(null);
-                final ResourceUtil.BatchResourceRemover brr = ResourceUtil.getBatchResourceRemover(50);
+                final ResourceHelper.BatchResourceRemover brr = ResourceHelper.getBatchResourceRemover(50);
 
                 final Resource baseResource = resolver.getResource(this.ownRootPath);
                 // sanity check - should never be null
diff --git a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
index 95aa021..8bc982f 100644
--- a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
@@ -69,7 +69,7 @@ public class DistributedEventSender
 
     private final String ownRootPathWithSlash;
 
-    private volatile ServiceRegistration<?> serviceRegistration;
+    private volatile ServiceRegistration serviceRegistration;
 
     public DistributedEventSender(final BundleContext bundleContext,
             final String rootPath,
@@ -92,7 +92,7 @@ public class DistributedEventSender
                 props.put(EventConstants.EVENT_TOPIC, SlingConstants.TOPIC_RESOURCE_ADDED);
                 props.put(EventConstants.EVENT_FILTER, "(path=" + rootPath + "/*)");
 
-                final ServiceRegistration<?> reg =
+                final ServiceRegistration reg =
                         bundleContext.registerService(new String[] {EventHandler.class.getName()},
                         DistributedEventSender.this, props);
 
diff --git a/src/main/java/org/apache/sling/event/dea/impl/ResourceHelper.java b/src/main/java/org/apache/sling/event/dea/impl/ResourceHelper.java
index 0694b74..4020704 100644
--- a/src/main/java/org/apache/sling/event/dea/impl/ResourceHelper.java
+++ b/src/main/java/org/apache/sling/event/dea/impl/ResourceHelper.java
@@ -27,7 +27,10 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.sling.api.resource.PersistenceException;
 import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.api.resource.ResourceUtil;
 import org.apache.sling.api.resource.ValueMap;
 
 public abstract class ResourceHelper {
@@ -83,7 +86,7 @@ public abstract class ResourceHelper {
     }
 
     public static ValueMap getValueMap(final Resource resource) throws InstantiationException {
-        final ValueMap vm = resource.getValueMap();
+        final ValueMap vm = ResourceUtil.getValueMap(resource);
         // trigger full loading
         try {
             vm.size();
@@ -93,4 +96,51 @@ public abstract class ResourceHelper {
         }
         return vm;
     }
+
+    /**
+     * A batch resource remover deletes resources in batches. Once the batch
+     * size (threshold) is reached, an intermediate commit is performed. Resource
+     * trees are deleted resource by resource starting with the deepest children first.
+     * Once all resources have been passed to the batch resource remover, a final
+     * commit needs to be called on the resource resolver.
+     */
+    public static class BatchResourceRemover {
+
+        private final int max;
+
+        private int count;
+
+        public BatchResourceRemover(final int batchSize) {
+            this.max = (batchSize < 1 ? 50 : batchSize);
+        }
+
+        public void delete(final Resource rsrc)
+        throws PersistenceException {
+            final ResourceResolver resolver = rsrc.getResourceResolver();
+            for(final Resource child : rsrc.getChildren()) {
+                delete(child);
+            }
+            resolver.delete(rsrc);
+            count++;
+            if ( count >= max ) {
+                resolver.commit();
+                count = 0;
+            }
+        }
+    }
+
+    /**
+     * Create a batch resource remover.
+     * A batch resource remove can be used to delete resources in batches.
+     * Once the passed in threshold of deleted resources is reached, an intermediate
+     * commit is called on the resource resolver. In addition the batch remover
+     * deletes a resource recursively.
+     * Once all resources to delete are passed to the remover, a final commit needs
+     * to be call on the resource resolver.
+     * @param threshold The threshold for the intermediate saves.
+     * @return A new batch resource remover.
+     */
+    public static BatchResourceRemover getBatchResourceRemover(final int threshold) {
+        return new BatchResourceRemover(threshold);
+    }
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.