jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1382937 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/constraint/Constraints.java
Date Mon, 10 Sep 2012 15:19:11 GMT
Author: mduerig
Date: Mon Sep 10 15:19:11 2012
New Revision: 1382937

URL: http://svn.apache.org/viewvc?rev=1382937&view=rev
Log:
OAK-66: JCR Node Type Management
value constraints for Reference: use TODO class for dummy implementation

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/constraint/Constraints.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/constraint/Constraints.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/constraint/Constraints.java?rev=1382937&r1=1382936&r2=1382937&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/constraint/Constraints.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/constraint/Constraints.java
Mon Sep 10 15:19:11 2012
@@ -17,10 +17,12 @@
 package org.apache.jackrabbit.oak.plugins.type.constraint;
 
 import javax.jcr.PropertyType;
+import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.Value;
 
 import com.google.common.base.Predicate;
 import com.google.common.base.Predicates;
+import org.apache.jackrabbit.oak.util.TODO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -96,11 +98,25 @@ public class Constraints {
     }
 
     private static Predicate<Value> referenceConstraint(String constraint) {
-        return Predicates.alwaysTrue(); // todo implement referenceConstraint
+        try {
+            // todo implement referenceConstraint
+            Predicate<Value> truePredicate = Predicates.alwaysTrue();
+            return TODO.dummyImplementation().returnValue(truePredicate);
+        }
+        catch (UnsupportedRepositoryOperationException e) {
+            throw new UnsupportedOperationException(e);
+        }
     }
 
     private static Predicate<Value> weakRefConstraint(String constraint) {
-        return Predicates.alwaysTrue(); // todo implement weakRefConstraint
+        try {
+            // todo implement referenceConstraint
+            Predicate<Value> truePredicate = Predicates.alwaysTrue();
+            return TODO.dummyImplementation().returnValue(truePredicate);
+        }
+        catch (UnsupportedRepositoryOperationException e) {
+            throw new UnsupportedOperationException(e);
+        }
     }
 
     private static Predicate<Value> uriConstraint(String constraint) {



Mime
View raw message