jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r809618 - in /jackrabbit/trunk/jackrabbit-core/src: main/java/org/apache/jackrabbit/core/ main/java/org/apache/jackrabbit/core/xml/ test/java/org/apache/jackrabbit/core/xml/
Date Mon, 31 Aug 2009 14:57:19 GMT
Author: stefan
Date: Mon Aug 31 14:57:19 2009
New Revision: 809618

URL: http://svn.apache.org/viewvc?rev=809618&view=rev
Log:
javadoc and minor refactoring

Added:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/ProtectedItemHandlers.java
      - copied, changed from r809613, jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/ProtectedItemHandling.java
Removed:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/ProtectedItemHandling.java
Modified:
    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/SessionImporter.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/xml/AccessControlImporterTest.java

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=809618&r1=809617&r2=809618&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
Mon Aug 31 14:57:19 2009
@@ -51,7 +51,7 @@
 import org.apache.jackrabbit.core.version.InternalVersionManagerImpl;
 import org.apache.jackrabbit.core.xml.ImportHandler;
 import org.apache.jackrabbit.core.xml.SessionImporter;
-import org.apache.jackrabbit.core.xml.ProtectedItemHandling;
+import org.apache.jackrabbit.core.xml.ProtectedItemHandlers;
 import org.apache.jackrabbit.core.xml.AccessControlImporter;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.Path;
@@ -1174,9 +1174,9 @@
                 ItemValidator.CHECK_CONSTRAINTS | ItemValidator.CHECK_HOLD | ItemValidator.CHECK_RETENTION;
         getValidator().checkModify(parent, options, Permission.NONE);
 
-        ProtectedItemHandling pi = new ProtectedItemHandling();
-        pi.register(new AccessControlImporter(this, this, false, ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW));
-        SessionImporter importer = new SessionImporter(parent, this, uuidBehavior, pi);
+        ProtectedItemHandlers pih = new ProtectedItemHandlers();
+        pih.register(new AccessControlImporter(this, this, false, ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW));
+        SessionImporter importer = new SessionImporter(parent, this, uuidBehavior, pih);
         return new ImportHandler(importer, this);
     }
 

Copied: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/ProtectedItemHandlers.java
(from r809613, jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/ProtectedItemHandling.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/ProtectedItemHandlers.java?p2=jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/ProtectedItemHandlers.java&p1=jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/ProtectedItemHandling.java&r1=809613&r2=809618&rev=809618&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/ProtectedItemHandling.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/ProtectedItemHandlers.java
Mon Aug 31 14:57:19 2009
@@ -29,7 +29,7 @@
  * Provides a registry like helper class for the {@link ProtectedPropertyImporter}
  * and {@link ProtectedNodeImporter} classes.
  */
-public class ProtectedItemHandling implements ProtectedPropertyImporter {
+public class ProtectedItemHandlers implements ProtectedPropertyImporter {
 
     private final List<ProtectedNodeImporter> nodeImporters = new ArrayList<ProtectedNodeImporter>();
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SessionImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SessionImporter.java?rev=809618&r1=809617&r2=809618&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SessionImporter.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SessionImporter.java
Mon Aug 31 14:57:19 2009
@@ -63,14 +63,14 @@
     private final ReferenceChangeTracker refTracker;
 
     /**
-     * Importer for protected nodes.
+     * Current importer for protected nodes.
      */
     private ProtectedNodeImporter currentNodeImporter;
 
     /**
-     * Importer for protected items.
+     * Handlers for protected items.
      */
-    private final ProtectedItemHandling protectedItemHandling;
+    private final ProtectedItemHandlers protectedItemHandlers;
 
     /**
      * Creates a new <code>SessionImporter</code> instance.
@@ -92,18 +92,18 @@
      * @param importTargetNode the target node
      * @param session session
      * @param uuidBehavior the uuid behaviro
-     * @param protectedItemHandling protected item handling
+     * @param protectedItemHandlers protected item handling
      */
     public SessionImporter(NodeImpl importTargetNode, SessionImpl session,
                            int uuidBehavior,
-                           ProtectedItemHandling protectedItemHandling) {
+                           ProtectedItemHandlers protectedItemHandlers) {
         this.importTargetNode = importTargetNode;
         this.session = session;
         this.uuidBehavior = uuidBehavior;
 
-        this.protectedItemHandling = protectedItemHandling == null
-                ? new ProtectedItemHandling()
-                : protectedItemHandling;
+        this.protectedItemHandlers = protectedItemHandlers == null
+                ? new ProtectedItemHandlers()
+                : protectedItemHandlers;
         refTracker = new ReferenceChangeTracker();
 
         parents = new Stack<NodeImpl>();
@@ -281,7 +281,7 @@
             // Notify the ProtectedNodeImporter about the start of a item
             // tree that is protected by this parent. If it potentially is
             // able to deal with it, notify it about the child node.
-            currentNodeImporter = protectedItemHandling.accept(parent);
+            currentNodeImporter = protectedItemHandlers.accept(parent);
             if (currentNodeImporter != null) {
                 log.debug("Protected node -> delegated to ProtectedPropertyImporter");
                 currentNodeImporter.startChildInfo(nodeInfo, propInfos);
@@ -373,7 +373,7 @@
                 log.debug("Skipping protected property " + pi.getName());
 
                 // notify the ProtectedPropertyImporter.
-                if (protectedItemHandling.handlePropInfo(node, pi, def)) {
+                if (protectedItemHandlers.handlePropInfo(node, pi, def)) {
                     // TODO: deal with reference props within the imported tree?        
           
                     log.debug("Protected property -> delegated to ProtectedPropertyImporter");
                 } // else: p-i-Importer isn't able to deal with this property

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/xml/AccessControlImporterTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/xml/AccessControlImporterTest.java?rev=809618&r1=809617&r2=809618&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/xml/AccessControlImporterTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/xml/AccessControlImporterTest.java
Mon Aug 31 14:57:19 2009
@@ -165,7 +165,7 @@
         try {
 
             InputStream in = new ByteArrayInputStream(XML_POLICY_TREE.getBytes("UTF-8"));
-            ProtectedItemHandling pi = new ProtectedItemHandling();
+            ProtectedItemHandlers pi = new ProtectedItemHandlers();
             pi.register(piImporter);
             SessionImporter importer = new SessionImporter(target, sImpl, ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW,
pi);
             ImportHandler ih = new ImportHandler(importer, sImpl);
@@ -219,7 +219,7 @@
         try {
 
             InputStream in = new ByteArrayInputStream(XML_POLICY_TREE_2.getBytes("UTF-8"));
-            ProtectedItemHandling pi = new ProtectedItemHandling();
+            ProtectedItemHandlers pi = new ProtectedItemHandlers();
             pi.register(piImporter);
             SessionImporter importer = new SessionImporter(target, sImpl, ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW,
pi);
             ImportHandler ih = new ImportHandler(importer, sImpl);
@@ -271,7 +271,7 @@
 
             InputStream in = new ByteArrayInputStream(XML_POLICY_ONLY.getBytes("UTF-8"));
 
-            ProtectedItemHandling pi = new ProtectedItemHandling();
+            ProtectedItemHandlers pi = new ProtectedItemHandlers();
             pi.register(piImporter);
             SessionImporter importer = new SessionImporter(target, sImpl, ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW,
pi);
             ImportHandler ih = new ImportHandler(importer, sImpl);
@@ -311,7 +311,7 @@
 
             InputStream in = new ByteArrayInputStream(XML_AC_TREE.getBytes("UTF-8"));
 
-            ProtectedItemHandling pi = new ProtectedItemHandling();
+            ProtectedItemHandlers pi = new ProtectedItemHandlers();
             pi.register(piImporter);
             SessionImporter importer = new SessionImporter(target, sImpl, ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW,
pi);
             ImportHandler ih = new ImportHandler(importer, sImpl);



Mime
View raw message