jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r794269 - in /jackrabbit/sandbox/jackrabbit-journalwalker: pom.xml src/main/java/org/apache/jackrabbit/journalwalker/JournalWalker.java
Date Wed, 15 Jul 2009 13:46:04 GMT
Author: mreutegg
Date: Wed Jul 15 13:46:03 2009
New Revision: 794269

URL: http://svn.apache.org/viewvc?rev=794269&view=rev
Log:
- update to 2.0-SNAPSHOT

Modified:
    jackrabbit/sandbox/jackrabbit-journalwalker/pom.xml
    jackrabbit/sandbox/jackrabbit-journalwalker/src/main/java/org/apache/jackrabbit/journalwalker/JournalWalker.java

Modified: jackrabbit/sandbox/jackrabbit-journalwalker/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-journalwalker/pom.xml?rev=794269&r1=794268&r2=794269&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-journalwalker/pom.xml (original)
+++ jackrabbit/sandbox/jackrabbit-journalwalker/pom.xml Wed Jul 15 13:46:03 2009
@@ -27,10 +27,10 @@
   <parent>
     <groupId>org.apache.jackrabbit</groupId>
     <artifactId>jackrabbit</artifactId>
-    <version>1.5-SNAPSHOT</version>
+    <version>2.0-SNAPSHOT</version>
   </parent>
   <artifactId>jackrabbit-journalwalker</artifactId>
-  <version>1.5-SNAPSHOT</version>
+  <version>2.0-SNAPSHOT</version>
   <packaging>jar</packaging>
   <name>Jackrabbit Journal Walker</name>
   <description>Jackrabbit Journal Walker</description>
@@ -38,11 +38,12 @@
     <dependency>
       <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-core</artifactId>
-      <version>1.5-SNAPSHOT</version>
+      <version>2.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>javax.jcr</groupId>
       <artifactId>jcr</artifactId>
+      <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>junit</groupId>

Modified: jackrabbit/sandbox/jackrabbit-journalwalker/src/main/java/org/apache/jackrabbit/journalwalker/JournalWalker.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-journalwalker/src/main/java/org/apache/jackrabbit/journalwalker/JournalWalker.java?rev=794269&r1=794268&r2=794269&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-journalwalker/src/main/java/org/apache/jackrabbit/journalwalker/JournalWalker.java
(original)
+++ jackrabbit/sandbox/jackrabbit-journalwalker/src/main/java/org/apache/jackrabbit/journalwalker/JournalWalker.java
Wed Jul 15 13:46:03 2009
@@ -27,15 +27,13 @@
 
 import org.apache.commons.collections.BidiMap;
 import org.apache.commons.collections.bidimap.DualHashBidiMap;
-import org.apache.jackrabbit.core.ItemId;
-import org.apache.jackrabbit.core.NodeId;
-import org.apache.jackrabbit.core.PropertyId;
 import org.apache.jackrabbit.core.cluster.ChangeLogRecord;
 import org.apache.jackrabbit.core.cluster.ClusterRecordDeserializer;
 import org.apache.jackrabbit.core.cluster.ClusterRecordProcessor;
 import org.apache.jackrabbit.core.cluster.LockRecord;
 import org.apache.jackrabbit.core.cluster.NamespaceRecord;
 import org.apache.jackrabbit.core.cluster.NodeTypeRecord;
+import org.apache.jackrabbit.core.cluster.WorkspaceRecord;
 import org.apache.jackrabbit.core.journal.FileJournal;
 import org.apache.jackrabbit.core.journal.FileRecordLog;
 import org.apache.jackrabbit.core.journal.JournalException;
@@ -45,6 +43,9 @@
 import org.apache.jackrabbit.core.observation.EventState;
 import org.apache.jackrabbit.core.state.ChangeLog;
 import org.apache.jackrabbit.core.state.ItemState;
+import org.apache.jackrabbit.core.id.ItemId;
+import org.apache.jackrabbit.core.id.NodeId;
+import org.apache.jackrabbit.core.id.PropertyId;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.Path;
 import org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver;
@@ -162,7 +163,9 @@
             buf.append('@');
         }
         buf.append(workspace != null ? workspace : "version");
-        buf.append(':');
+        buf.append(":(");
+        buf.append(id);
+        buf.append(")");
         buf.append(lookupPath(id));
         log(buf.toString());
     }
@@ -231,19 +234,13 @@
         }
 
         ChangeLog changes = record.getChanges();
-        iter = changes.deletedStates();
-        while (iter.hasNext()) {
-            ItemState state = (ItemState) iter.next();
+        for (ItemState state : changes.deletedStates()) {
             log('D', userId, record.getWorkspace(), state.getId());
         }
-        iter = changes.modifiedStates();
-        while (iter.hasNext()) {
-            ItemState state = (ItemState) iter.next();
+        for (ItemState state : changes.modifiedStates()) {
             log('U', userId, record.getWorkspace(), state.getId());
         }
-        iter = changes.addedStates();
-        while (iter.hasNext()) {
-            ItemState state = (ItemState) iter.next();
+        for (ItemState state : changes.addedStates()) {
             log('A', userId, record.getWorkspace(), state.getId());
         }
     }
@@ -310,6 +307,9 @@
         }
     }
 
+    public void process(WorkspaceRecord record) {
+    }
+
     //-------------------------------------------------------- NamespaceResolver
 
     /**
@@ -482,7 +482,7 @@
             if (f.isDirectory()) {
                 FileJournal journal = new FileJournal();
                 journal.setRevision("revision.log");
-                journal.setDirectory(args[0]);
+                journal.setDirectory(args[argc - 1]);
 
                 JournalWalker walker = new JournalWalker(DEFAULT_PRODUCER, revision);
                 journal.init("", walker);



Mime
View raw message