sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-org-apache-sling-testing-jcr-mock] 04/07: SLING-6814 jcr-mock: Implement JackrabbitObservationManager
Date Tue, 07 Nov 2017 10:19:01 GMT
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.jcr-mock-1.3.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git

commit ea171b250b323e738a883c3e16ba954552d4f644
Author: Stefan Seifert <sseifert@apache.org>
AuthorDate: Sat Apr 29 07:53:37 2017 +0000

    SLING-6814 jcr-mock: Implement JackrabbitObservationManager
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock@1793174
13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                                        |  6 ++++++
 .../apache/sling/testing/mock/jcr/MockObservationManager.java  | 10 +++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 27c3d11..3d4c887 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,6 +54,12 @@
             <version>2.8.0</version>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.jackrabbit</groupId>
+            <artifactId>jackrabbit-api</artifactId>
+            <version>2.8.0</version>
+            <scope>compile</scope>
+        </dependency>
     
         <dependency>
             <groupId>com.google.guava</groupId>
diff --git a/src/main/java/org/apache/sling/testing/mock/jcr/MockObservationManager.java b/src/main/java/org/apache/sling/testing/mock/jcr/MockObservationManager.java
index f2cbe5f..af522b4 100644
--- a/src/main/java/org/apache/sling/testing/mock/jcr/MockObservationManager.java
+++ b/src/main/java/org/apache/sling/testing/mock/jcr/MockObservationManager.java
@@ -26,10 +26,13 @@ import javax.jcr.observation.EventListener;
 import javax.jcr.observation.EventListenerIterator;
 import javax.jcr.observation.ObservationManager;
 
+import org.apache.jackrabbit.api.observation.JackrabbitEventFilter;
+import org.apache.jackrabbit.api.observation.JackrabbitObservationManager;
+
 /**
  * Mock {@link ObservationManager} implementation.
  */
-class MockObservationManager implements ObservationManager {
+class MockObservationManager implements ObservationManager, JackrabbitObservationManager
{
 
     @Override
     public void addEventListener(final EventListener listener, final int eventTypes, final
String absPath,
@@ -39,6 +42,11 @@ class MockObservationManager implements ObservationManager {
     }
 
     @Override
+    public void addEventListener(EventListener listener, JackrabbitEventFilter filter) throws
RepositoryException {
+        // do nothing
+    }
+
+    @Override
     public void removeEventListener(final EventListener listener) throws RepositoryException
{
         // do nothing
     }

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

Mime
View raw message