jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1469892 - /jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Date Fri, 19 Apr 2013 15:21:41 GMT
Author: reschke
Date: Fri Apr 19 15:21:41 2013
New Revision: 1469892

URL: http://svn.apache.org/r1469892
Log:
JCR-3576: handle absolute paths in observation response bodies 

Modified:
    jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java

Modified: jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java?rev=1469892&r1=1469891&r2=1469892&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Fri Apr 19 15:21:41 2013
@@ -2101,7 +2101,7 @@ public class RepositoryServiceImpl imple
                 Element contentElem = DomUtil.getChildElement(entryElem, AtomFeedConstants.N_CONTENT);
                 if (contentElem != null
                         && "application/vnd.apache.jackrabbit.event+xml".equals(contentElem.getAttribute("type")))
{
-                    List<Event> el = buildEventList(contentElem, (SessionInfoImpl)
sessionInfo);
+                    List<Event> el = buildEventList(contentElem, (SessionInfoImpl)
sessionInfo, rootUri);
                     for (Event e : el) {
                         if (e.getDate() > after && (filter == null || filter.accept(e,
false))) {
                             events.add(e);
@@ -2272,7 +2272,7 @@ public class RepositoryServiceImpl imple
                         isLocal = Boolean.parseBoolean(value);
                     }
                     bundles.add(new EventBundleImpl(
-                            buildEventList(bundleElement, sessionInfo),
+                            buildEventList(bundleElement, sessionInfo, uri),
                             isLocal));
                 }
                 events = bundles.toArray(new EventBundle[bundles.size()]);
@@ -2291,7 +2291,8 @@ public class RepositoryServiceImpl imple
         }
     }
 
-    private List<Event> buildEventList(Element bundleElement, SessionInfoImpl sessionInfo)
throws IllegalNameException, NamespaceException {
+    private List<Event> buildEventList(Element bundleElement, SessionInfoImpl sessionInfo,
String baseUri)
+            throws IllegalNameException, NamespaceException, RepositoryException {
         List<Event> events = new ArrayList<Event>();
         ElementIterator eventElementIterator = DomUtil.getChildren(bundleElement, ObservationConstants.N_EVENT);
 
@@ -2324,6 +2325,7 @@ public class RepositoryServiceImpl imple
             NodeId parentId = null;
 
             if (href != null) {
+                href = resolve(baseUri, href);
                 try {
                     eventPath = uriResolver.getQPath(href, sessionInfo);
                 } catch (RepositoryException e) {
@@ -2334,7 +2336,7 @@ public class RepositoryServiceImpl imple
 
                 boolean isForNode = (type == Event.NODE_ADDED
                         || type == Event.NODE_REMOVED || type == Event.NODE_MOVED);
-                
+
                 try {
                     if (isForNode) {
                         eventId = uriResolver.getNodeIdAfterEvent(href,



Mime
View raw message