jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1329646 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: kernel/ plugins/name/ plugins/type/
Date Tue, 24 Apr 2012 11:35:56 GMT
Author: jukka
Date: Tue Apr 24 11:35:55 2012
New Revision: 1329646

URL: http://svn.apache.org/viewvc?rev=1329646&view=rev
Log:
OAK-68: Extension point for commit validation

Rename NodeValidator to just Validator

Added:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/Validator.java
      - copied, changed from r1329628, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/NodeValidator.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/ValidatorProvider.java
      - copied, changed from r1329628, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/NodeValidatorProvider.java
Removed:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/NodeValidator.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/NodeValidatorProvider.java
Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NameValidator.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NameValidatorProvider.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidator.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidatorProvider.java

Copied: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/Validator.java
(from r1329628, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/NodeValidator.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/Validator.java?p2=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/Validator.java&p1=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/NodeValidator.java&r1=1329628&r2=1329646&rev=1329646&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/NodeValidator.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/Validator.java
Tue Apr 24 11:35:55 2012
@@ -24,7 +24,7 @@ import org.apache.jackrabbit.oak.kernel.
  * Content change validator. An instance of this interface is used to
  * validate changes against a specific {@link NodeState}.
  */
-public interface NodeValidator {
+public interface Validator {
 
     void propertyAdded(PropertyState after)
             throws CommitFailedException;
@@ -35,14 +35,14 @@ public interface NodeValidator {
     void propertyDeleted(PropertyState before)
             throws CommitFailedException;
 
-    NodeValidator childNodeAdded(String name, NodeState after)
+    Validator childNodeAdded(String name, NodeState after)
             throws CommitFailedException;
 
-    NodeValidator childNodeChanged(
+    Validator childNodeChanged(
             String name, NodeState before, NodeState after)
             throws CommitFailedException;
 
-    NodeValidator childNodeDeleted(String name, NodeState before)
+    Validator childNodeDeleted(String name, NodeState before)
             throws CommitFailedException;
 
 }

Copied: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/ValidatorProvider.java
(from r1329628, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/NodeValidatorProvider.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/ValidatorProvider.java?p2=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/ValidatorProvider.java&p1=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/NodeValidatorProvider.java&r1=1329628&r2=1329646&rev=1329646&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/NodeValidatorProvider.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/ValidatorProvider.java
Tue Apr 24 11:35:55 2012
@@ -22,7 +22,7 @@ import org.apache.jackrabbit.oak.kernel.
  * Extension point for plugging in different kinds of validation rules
  * for content changes.
  */
-public interface NodeValidatorProvider {
+public interface ValidatorProvider {
 
     /**
      * Returns a validator for checking the changes between the given
@@ -32,6 +32,6 @@ public interface NodeValidatorProvider {
      * @param after  modified root state
      * @return validator for checking the modifications
      */
-    NodeValidator getRootValidator(NodeState before, NodeState after);
+    Validator getRootValidator(NodeState before, NodeState after);
 
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NameValidator.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NameValidator.java?rev=1329646&r1=1329645&r2=1329646&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NameValidator.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NameValidator.java
Tue Apr 24 11:35:55 2012
@@ -21,9 +21,9 @@ import java.util.Set;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.kernel.NodeState;
-import org.apache.jackrabbit.oak.kernel.NodeValidator;
+import org.apache.jackrabbit.oak.kernel.Validator;
 
-class NameValidator implements NodeValidator {
+class NameValidator implements Validator {
 
     private final Set<String> prefixes;
 
@@ -82,21 +82,21 @@ class NameValidator implements NodeValid
     }
 
     @Override
-    public NodeValidator childNodeAdded(String name, NodeState after)
+    public Validator childNodeAdded(String name, NodeState after)
             throws CommitFailedException {
         checkValidName(name);
         return this;
     }
 
     @Override
-    public NodeValidator childNodeChanged(
+    public Validator childNodeChanged(
             String name, NodeState before, NodeState after)
             throws CommitFailedException {
         return this;
     }
 
     @Override
-    public NodeValidator childNodeDeleted(String name, NodeState before) {
+    public Validator childNodeDeleted(String name, NodeState before) {
         // do nothing
         return null;
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NameValidatorProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NameValidatorProvider.java?rev=1329646&r1=1329645&r2=1329646&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NameValidatorProvider.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NameValidatorProvider.java
Tue Apr 24 11:35:55 2012
@@ -21,13 +21,13 @@ import java.util.Set;
 
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.kernel.NodeState;
-import org.apache.jackrabbit.oak.kernel.NodeValidator;
-import org.apache.jackrabbit.oak.kernel.NodeValidatorProvider;
+import org.apache.jackrabbit.oak.kernel.Validator;
+import org.apache.jackrabbit.oak.kernel.ValidatorProvider;
 
-public class NameValidatorProvider implements NodeValidatorProvider {
+public class NameValidatorProvider implements ValidatorProvider {
 
     @Override
-    public NodeValidator getRootValidator(NodeState before, NodeState after) {
+    public Validator getRootValidator(NodeState before, NodeState after) {
         Set<String> prefixes = new HashSet<String>();
 
         // Default JCR prefixes are always available

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidator.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidator.java?rev=1329646&r1=1329645&r2=1329646&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidator.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidator.java
Tue Apr 24 11:35:55 2012
@@ -23,9 +23,9 @@ import org.apache.jackrabbit.oak.api.Com
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Scalar;
 import org.apache.jackrabbit.oak.kernel.NodeState;
-import org.apache.jackrabbit.oak.kernel.NodeValidator;
+import org.apache.jackrabbit.oak.kernel.Validator;
 
-class TypeValidator implements NodeValidator {
+class TypeValidator implements Validator {
 
     private final Set<String> types;
 
@@ -72,7 +72,7 @@ class TypeValidator implements NodeValid
     }
 
     @Override
-    public NodeValidator childNodeAdded(String name, NodeState after)
+    public Validator childNodeAdded(String name, NodeState after)
             throws CommitFailedException {
         // TODO: validate added child node
         // TODO: get the type for validating the child contents
@@ -80,7 +80,7 @@ class TypeValidator implements NodeValid
     }
 
     @Override
-    public NodeValidator childNodeChanged(
+    public Validator childNodeChanged(
             String name, NodeState before, NodeState after)
             throws CommitFailedException {
         // TODO: validate changed child node
@@ -89,7 +89,7 @@ class TypeValidator implements NodeValid
     }
 
     @Override
-    public NodeValidator childNodeDeleted(String name, NodeState before) {
+    public Validator childNodeDeleted(String name, NodeState before) {
         // TODO: validate removed child node
         return null;
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidatorProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidatorProvider.java?rev=1329646&r1=1329645&r2=1329646&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidatorProvider.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidatorProvider.java
Tue Apr 24 11:35:55 2012
@@ -21,13 +21,13 @@ import java.util.Set;
 
 import org.apache.jackrabbit.oak.kernel.ChildNodeEntry;
 import org.apache.jackrabbit.oak.kernel.NodeState;
-import org.apache.jackrabbit.oak.kernel.NodeValidator;
-import org.apache.jackrabbit.oak.kernel.NodeValidatorProvider;
+import org.apache.jackrabbit.oak.kernel.Validator;
+import org.apache.jackrabbit.oak.kernel.ValidatorProvider;
 
-public class TypeValidatorProvider implements NodeValidatorProvider {
+public class TypeValidatorProvider implements ValidatorProvider {
 
     @Override
-    public NodeValidator getRootValidator(NodeState before, NodeState after) {
+    public Validator getRootValidator(NodeState before, NodeState after) {
         Set<String> types = new HashSet<String>();
 
         // Default JCR types are always available



Mime
View raw message