abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r567324 - /incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/sharing/SharingHelper.java
Date Sat, 18 Aug 2007 20:08:48 GMT
Author: jmsnell
Date: Sat Aug 18 13:08:44 2007
New Revision: 567324

URL: http://svn.apache.org/viewvc?view=rev&rev=567324
Log:
method to determine if the entry has conflicts

Modified:
    incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/sharing/SharingHelper.java

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/sharing/SharingHelper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/sharing/SharingHelper.java?view=diff&rev=567324&r1=567323&r2=567324
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/sharing/SharingHelper.java
(original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/sharing/SharingHelper.java
Sat Aug 18 13:08:44 2007
@@ -287,9 +287,7 @@
               break;
             }
           }
-          if (ok) {
-            sync.addHistory(h1);
-          }
+          if (ok) sync.addHistory(h1);
         }
       }
     }
@@ -369,5 +367,18 @@
       if (updated.before(d)) d = updated;
     }
     return d;
+  }
+  
+  public boolean hasConflicts(Entry entry) {
+    Sync sync = getSync(entry);
+    if (sync != null) {
+      Conflicts conflicts = sync.getConflicts();
+      if (conflicts != null) {
+        if (conflicts.getEntries().size() > 0) {
+          return true;
+        }
+      }
+    }
+    return false;
   }
 }



Mime
View raw message