jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r796584 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core: BatchedItemOperations.java ItemImpl.java ItemValidator.java NodeImpl.java PropertyImpl.java SessionImpl.java xml/WorkspaceImporter.java
Date Tue, 21 Jul 2009 23:39:48 GMT
Author: tripod
Date: Tue Jul 21 23:39:47 2009
New Revision: 796584

URL: http://svn.apache.org/viewvc?rev=796584&view=rev
Log:
Rename CHECK_VERSIONING to more meaningful CHECK_CHECKED_OUT

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/BatchedItemOperations.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemValidator.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/BatchedItemOperations.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/BatchedItemOperations.java?rev=796584&r1=796583&r2=796584&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/BatchedItemOperations.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/BatchedItemOperations.java
Tue Jul 21 23:39:47 2009
@@ -269,7 +269,7 @@
         // 2. check access rights, lock status, node type constraints, etc.
         checkAddNode(destParentState, destName,
                 srcState.getNodeTypeName(), CHECK_ACCESS | CHECK_LOCK
-                | CHECK_VERSIONING | CHECK_CONSTRAINTS | CHECK_HOLD | CHECK_RETENTION);
+                | CHECK_CHECKED_OUT | CHECK_CONSTRAINTS | CHECK_HOLD | CHECK_RETENTION);
 
         // 3. verify that source has mixin mix:shareable
         if (!isShareable(srcState)) {
@@ -403,7 +403,7 @@
 
         checkAddNode(destParentState, destName.getName(),
                 srcState.getNodeTypeName(), CHECK_ACCESS | CHECK_LOCK
-                | CHECK_VERSIONING | CHECK_CONSTRAINTS | CHECK_HOLD | CHECK_RETENTION);
+                | CHECK_CHECKED_OUT | CHECK_CONSTRAINTS | CHECK_HOLD | CHECK_RETENTION);
         // check read access right on source node using source access manager
         try {
             if (!srcAccessMgr.isGranted(srcPath, Permission.READ)) {
@@ -547,11 +547,11 @@
         // 2. check if target state can be removed from old/added to new parent
 
         checkRemoveNode(target, srcParent.getNodeId(),
-                CHECK_ACCESS | CHECK_LOCK | CHECK_VERSIONING | CHECK_CONSTRAINTS
+                CHECK_ACCESS | CHECK_LOCK | CHECK_CHECKED_OUT | CHECK_CONSTRAINTS
                 | CHECK_HOLD | CHECK_RETENTION);
         checkAddNode(destParent, destName.getName(),
                 target.getNodeTypeName(), CHECK_ACCESS | CHECK_LOCK
-                | CHECK_VERSIONING | CHECK_CONSTRAINTS | CHECK_HOLD | CHECK_RETENTION);
+                | CHECK_CHECKED_OUT | CHECK_CONSTRAINTS | CHECK_HOLD | CHECK_RETENTION);
 
         // 3. do move operation (modify and store affected states)
         boolean renameOnly = srcParent.getNodeId().equals(destParent.getNodeId());
@@ -637,7 +637,7 @@
 
         // 2. check if target state can be removed from parent
         checkRemoveNode(target, parentId,
-                CHECK_ACCESS | CHECK_LOCK | CHECK_VERSIONING
+                CHECK_ACCESS | CHECK_LOCK | CHECK_CHECKED_OUT
                 | CHECK_CONSTRAINTS | CHECK_REFERENCES | CHECK_HOLD | CHECK_RETENTION);
 
         // 3. do remove operation
@@ -661,7 +661,7 @@
      *                     parent node</li>
      *                     <li><code>{@link #CHECK_LOCK}</code>: make sure
      *                     there's no foreign lock on parent node</li>
-     *                     <li><code>{@link #CHECK_VERSIONING}</code>:
make sure
+     *                     <li><code>{@link #CHECK_CHECKED_OUT}</code>:
make sure
      *                     parent node is checked-out</li>
      *                     <li><code>{@link #CHECK_CONSTRAINTS}</code>:
      *                     make sure no node type constraints would be violated</li>
@@ -693,7 +693,7 @@
 
         // 2. versioning status
 
-        if ((options & CHECK_VERSIONING) == CHECK_VERSIONING) {
+        if ((options & CHECK_CHECKED_OUT) == CHECK_CHECKED_OUT) {
             // make sure parent node is checked-out
             verifyCheckedOut(parentPath);
         }
@@ -789,7 +789,7 @@
      *                    and remove privilege on target node</li>
      *                    <li><code>{@link #CHECK_LOCK}</code>: make sure
      *                    there's no foreign lock on parent node</li>
-     *                    <li><code>{@link #CHECK_VERSIONING}</code>: make
sure
+     *                    <li><code>{@link #CHECK_CHECKED_OUT}</code>:
make sure
      *                    parent node is checked-out</li>
      *                    <li><code>{@link #CHECK_CONSTRAINTS}</code>:
      *                    make sure no node type constraints would be violated</li>
@@ -827,7 +827,7 @@
      *                    and remove privilege on target node</li>
      *                    <li><code>{@link #CHECK_LOCK}</code>: make sure
      *                    there's no foreign lock on parent node</li>
-     *                    <li><code>{@link #CHECK_VERSIONING}</code>: make
sure
+     *                    <li><code>{@link #CHECK_CHECKED_OUT}</code>:
make sure
      *                    parent node is checked-out</li>
      *                    <li><code>{@link #CHECK_CONSTRAINTS}</code>:
      *                    make sure no node type constraints would be violated</li>
@@ -867,7 +867,7 @@
 
         // 2. versioning status
 
-        if ((options & CHECK_VERSIONING) == CHECK_VERSIONING) {
+        if ((options & CHECK_CHECKED_OUT) == CHECK_CHECKED_OUT) {
             // make sure parent node is checked-out
             verifyCheckedOut(parentPath);
         }
@@ -1602,7 +1602,7 @@
                     checkRemoveNode(nodeState, targetState.getNodeId(),
                             CHECK_ACCESS
                             | CHECK_LOCK
-                            | CHECK_VERSIONING
+                            | CHECK_CHECKED_OUT
                             | CHECK_HOLD
                             | CHECK_RETENTION
                     );
@@ -1732,7 +1732,7 @@
                         checkRemoveNode(existingState,
                                 CHECK_ACCESS
                                 | CHECK_LOCK
-                                | CHECK_VERSIONING
+                                | CHECK_CHECKED_OUT
                                 | CHECK_CONSTRAINTS
                                 | CHECK_HOLD
                                 | CHECK_RETENTION);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java?rev=796584&r1=796583&r2=796584&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
Tue Jul 21 23:39:47 2009
@@ -841,7 +841,7 @@
             session.getValidator().checkRemove(this, options, Permission.NONE);
 
             // parent node: make sure it is checked-out and not protected nor locked.
-            options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_VERSIONING |
+            options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_CHECKED_OUT |
                     ItemValidator.CHECK_CONSTRAINTS;
             session.getValidator().checkModify(parentNode, options, Permission.NONE);
         }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemValidator.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemValidator.java?rev=796584&r1=796583&r2=796584&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemValidator.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemValidator.java
Tue Jul 21 23:39:47 2009
@@ -62,10 +62,11 @@
      * option to check lock status
      */
     public static final int CHECK_LOCK = 2;
+
     /**
      * option to check checked-out status
      */
-    public static final int CHECK_VERSIONING = 4;
+    public static final int CHECK_CHECKED_OUT = 4;
 
     /**
      * check for referential integrity upon removal
@@ -294,7 +295,7 @@
                 throw new ConstraintViolationException(msg);
             }
         }
-        if ((options & CHECK_VERSIONING) == CHECK_VERSIONING) {
+        if ((options & CHECK_CHECKED_OUT) == CHECK_CHECKED_OUT) {
             NodeImpl node = (item.isNode()) ? (NodeImpl) item : (NodeImpl) item.getParent();
             if (!node.internalIsCheckedOut()) {
                 String msg = "Unable to perform operation. Node is checked-in.";
@@ -342,7 +343,7 @@
                 return false;
             }
         }
-        if ((options & CHECK_VERSIONING) == CHECK_VERSIONING) {
+        if ((options & CHECK_CHECKED_OUT) == CHECK_CHECKED_OUT) {
             NodeImpl node = (item.isNode()) ? (NodeImpl) item : (NodeImpl) item.getParent();
             if (!node.internalIsCheckedOut()) {
                 return false;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java?rev=796584&r1=796583&r2=796584&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
Tue Jul 21 23:39:47 2009
@@ -755,7 +755,7 @@
         }
 
         // make sure that parent node is checked-out and not locked
-        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_VERSIONING;
+        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_CHECKED_OUT;
         session.getValidator().checkModify(parentNode, options, Permission.NONE);
 
         // delegate the creation of the child node to the parent node
@@ -1036,7 +1036,7 @@
         // check state of this instance
         sanityCheck();
 
-        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_VERSIONING
+        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_CHECKED_OUT
                 | ItemValidator.CHECK_CONSTRAINTS | ItemValidator.CHECK_HOLD;
         int permissions = Permission.NODE_TYPE_MNGMT;
         // special handling of mix:(simple)versionable. since adding the mixin alters
@@ -1142,7 +1142,7 @@
         // check state of this instance
         sanityCheck();
 
-        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_VERSIONING
+        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_CHECKED_OUT
                 | ItemValidator.CHECK_CONSTRAINTS | ItemValidator.CHECK_HOLD;
         int permissions = Permission.NODE_TYPE_MNGMT;
         session.getValidator().checkModify(this, options, permissions);
@@ -1377,7 +1377,7 @@
     protected void checkSetProperty()
             throws VersionException, LockException, RepositoryException {
         // make sure this node is checked-out and is not locked
-        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_VERSIONING;
+        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_CHECKED_OUT;
         session.getValidator().checkModify(this, options, Permission.NONE);
     }
 
@@ -1636,7 +1636,7 @@
         sanityCheck();
 
         // make sure this node is checked-out and not locked by another session.
-        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_VERSIONING;
+        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_CHECKED_OUT;
         session.getValidator().checkModify(this, options, Permission.NONE);
 
         NodeTypeImpl nt = null;
@@ -1867,7 +1867,7 @@
         }
 
         // make sure this node is checked-out and neither protected nor locked
-        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_VERSIONING
+        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_CHECKED_OUT
                 | ItemValidator.CHECK_CONSTRAINTS;
         session.getValidator().checkModify(this, options, Permission.NONE);
 
@@ -2036,7 +2036,7 @@
         // (1) make sure that parent node is checked-out
         // (2) check lock status
         // (3) check protected flag of parent (i.e. this) node
-        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_VERSIONING | ItemValidator.CHECK_CONSTRAINTS;
+        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_CHECKED_OUT | ItemValidator.CHECK_CONSTRAINTS;
         session.getValidator().checkModify(this, options, Permission.NONE);
 
         // (4) check for name collisions
@@ -2876,7 +2876,7 @@
             return false;
         }
 
-        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_VERSIONING
+        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_CHECKED_OUT
                 | ItemValidator.CHECK_CONSTRAINTS | ItemValidator.CHECK_HOLD;
         int permissions = Permission.NODE_TYPE_MNGMT;
         // special handling of mix:(simple)versionable. since adding the mixin alters
@@ -3732,7 +3732,7 @@
 
         // make sure this node is checked-out, neither protected nor locked and
         // the editing session has sufficient permission to change the primary type.
-        int options = ItemValidator.CHECK_VERSIONING | ItemValidator.CHECK_LOCK
+        int options = ItemValidator.CHECK_CHECKED_OUT | ItemValidator.CHECK_LOCK
                 | ItemValidator.CHECK_CONSTRAINTS | ItemValidator.CHECK_HOLD;
         session.getValidator().checkModify(this, options, Permission.NODE_TYPE_MNGMT);
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java?rev=796584&r1=796583&r2=796584&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
Tue Jul 21 23:39:47 2009
@@ -240,7 +240,7 @@
         session.getValidator().checkModify(this, options, Permission.NONE);
 
         // make sure the parent is checked-out and neither locked nor under retention
-        options = ItemValidator.CHECK_VERSIONING | ItemValidator.CHECK_LOCK |
+        options = ItemValidator.CHECK_CHECKED_OUT | ItemValidator.CHECK_LOCK |
                 ItemValidator.CHECK_HOLD | ItemValidator.CHECK_RETENTION;
         session.getValidator().checkModify(parent, options, Permission.NONE);
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java?rev=796584&r1=796583&r2=796584&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
Tue Jul 21 23:39:47 2009
@@ -1053,7 +1053,7 @@
         // verify for both source and destination parent nodes that
         // - they are checked-out
         // - are not protected neither by node type constraints nor by retention/hold
-        int options = ItemValidator.CHECK_VERSIONING | ItemValidator.CHECK_LOCK |
+        int options = ItemValidator.CHECK_CHECKED_OUT | ItemValidator.CHECK_LOCK |
                 ItemValidator.CHECK_CONSTRAINTS | ItemValidator.CHECK_HOLD | ItemValidator.CHECK_RETENTION;
         getValidator().checkRemove(srcParentNode, options, Permission.NONE);
         getValidator().checkModify(destParentNode, options, Permission.NONE);
@@ -1150,7 +1150,7 @@
 
         // verify that parent node is checked-out, not locked and not protected
         // by either node type constraints nor by some retention or hold.
-        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_VERSIONING |
+        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_CHECKED_OUT |
                 ItemValidator.CHECK_CONSTRAINTS | ItemValidator.CHECK_HOLD | ItemValidator.CHECK_RETENTION;
         getValidator().checkModify(parent, options, Permission.NONE);
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java?rev=796584&r1=796583&r2=796584&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java
Tue Jul 21 23:39:47 2009
@@ -190,7 +190,7 @@
             itemOps.checkRemoveNode(conflicting,
                     BatchedItemOperations.CHECK_ACCESS
                     | BatchedItemOperations.CHECK_LOCK
-                    | BatchedItemOperations.CHECK_VERSIONING
+                    | BatchedItemOperations.CHECK_CHECKED_OUT
                     | BatchedItemOperations.CHECK_CONSTRAINTS
                     | BatchedItemOperations.CHECK_HOLD
                     | BatchedItemOperations.CHECK_RETENTION);
@@ -231,7 +231,7 @@
             itemOps.checkRemoveNode(conflicting,
                     BatchedItemOperations.CHECK_ACCESS
                     | BatchedItemOperations.CHECK_LOCK
-                    | BatchedItemOperations.CHECK_VERSIONING
+                    | BatchedItemOperations.CHECK_CHECKED_OUT
                     | BatchedItemOperations.CHECK_CONSTRAINTS
                     | BatchedItemOperations.CHECK_HOLD
                     | BatchedItemOperations.CHECK_RETENTION);
@@ -253,7 +253,7 @@
                     nodeInfo.getNodeTypeName(),
                     BatchedItemOperations.CHECK_ACCESS
                     | BatchedItemOperations.CHECK_LOCK
-                    | BatchedItemOperations.CHECK_VERSIONING
+                    | BatchedItemOperations.CHECK_CHECKED_OUT
                     | BatchedItemOperations.CHECK_CONSTRAINTS
                     | BatchedItemOperations.CHECK_HOLD
                     | BatchedItemOperations.CHECK_RETENTION);



Mime
View raw message