jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1164026 [4/11] - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi: ./ config/ hierarchy/ lock/ nodetype/ observation/ operation/ query/ security/ state/ util/ version/ xml/
Date Thu, 01 Sep 2011 11:52:13 GMT
Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java?rev=1164026&r1=1164025&r2=1164026&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java Thu Sep  1 11:52:08 2011
@@ -16,6 +16,16 @@
  */
 package org.apache.jackrabbit.jcr2spi.hierarchy;
 
+import org.apache.commons.collections.list.AbstractLinkedList;
+import org.apache.jackrabbit.jcr2spi.state.Status;
+import org.apache.jackrabbit.spi.ChildInfo;
+import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.NodeId;
+import org.apache.jackrabbit.spi.Path;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.jcr.RepositoryException;
 import java.lang.ref.Reference;
 import java.lang.ref.SoftReference;
 import java.util.ArrayList;
@@ -27,27 +37,14 @@ import java.util.List;
 import java.util.Map;
 import java.util.NoSuchElementException;
 
-import javax.jcr.ItemNotFoundException;
-import javax.jcr.RepositoryException;
-
-import org.apache.commons.collections.list.AbstractLinkedList;
-import org.apache.jackrabbit.jcr2spi.state.Status;
-import org.apache.jackrabbit.spi.ChildInfo;
-import org.apache.jackrabbit.spi.Name;
-import org.apache.jackrabbit.spi.NodeId;
-import org.apache.jackrabbit.spi.Path;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 /**
  * <code>ChildNodeEntriesImpl</code> implements a memory sensitive implementation
  * of the <code>ChildNodeEntries</code> interface.
  */
 final class ChildNodeEntriesImpl implements ChildNodeEntries {
+    private static final Logger log = LoggerFactory.getLogger(ChildNodeEntriesImpl.class);
 
-    private static Logger log = LoggerFactory.getLogger(ChildNodeEntriesImpl.class);
-
-    private boolean complete = false;
+    private boolean complete;
 
     /**
      * Linked list of {@link NodeEntry} instances.
@@ -99,35 +96,31 @@ final class ChildNodeEntriesImpl impleme
      */
     NodeEntry getNext(NodeEntry childEntry) {
         LinkedEntries.LinkNode ln = entries.getLinkNode(childEntry);
-        LinkedEntries.LinkNode nextLn = (ln == null) ? null : ln.getNextLinkNode();
-        return (nextLn == null) ? null : nextLn.getNodeEntry();
+        LinkedEntries.LinkNode nextLn = ln == null ? null : ln.getNextLinkNode();
+        return nextLn == null ? null : nextLn.getNodeEntry();
     }
 
     /**
      * @param childEntry
-     * @return The node entry that directly preceeds the given <code>childEntry</code>
+     * @return The node entry that directly precedes the given <code>childEntry</code>
      * or <code>null</code> if the given <code>childEntry</code> is the first
      * or was not found in this <code>ChildNodeEntries</code>.
      */
     NodeEntry getPrevious(NodeEntry childEntry) {
         LinkedEntries.LinkNode ln = entries.getLinkNode(childEntry);
-        LinkedEntries.LinkNode prevLn = (ln == null) ? null : ln.getPreviousLinkNode();
-        return (prevLn == null) ? null : prevLn.getNodeEntry();
+        LinkedEntries.LinkNode prevLn = ln == null ? null : ln.getPreviousLinkNode();
+        return prevLn == null ? null : prevLn.getNodeEntry();
     }
 
-    /**
-     * @see ChildNodeEntries#isComplete()
-     */
+    @Override
     public boolean isComplete() {
-        return (parent.getStatus() != Status.INVALIDATED && complete) ||
+        return parent.getStatus() != Status.INVALIDATED && complete ||
                 parent.getStatus() == Status.NEW ||
                 Status.isTerminal(parent.getStatus());
     }
 
-    /**
-     * @see ChildNodeEntries#reload()
-     */
-    public synchronized void reload() throws ItemNotFoundException, RepositoryException {
+    @Override
+    public synchronized void reload() throws RepositoryException {
         if (isComplete()) {
             // nothing to do
             return;
@@ -167,13 +160,13 @@ final class ChildNodeEntriesImpl impleme
                 ln = internalAddAfter(entry, ci.getIndex(), prevLN);
             } else if (prevLN != null) {
                 // assert correct order of existing
-                if (prevLN != ln) {
-                    reorderAfter(ln, prevLN);
-                } else {
+                if (prevLN == ln) {
                     // there was an existing entry but it's the same as the one
                     // created/retrieved before. getting here indicates that
                     // the SPI implementation provided invalid childNodeInfos.
                     log.error("ChildInfo iterator contains multiple entries with the same name|index or uniqueID -> ignore ChildNodeInfo.");
+                } else {
+                    reorderAfter(ln, prevLN);
                 }
             }
             prevLN = ln;
@@ -182,9 +175,7 @@ final class ChildNodeEntriesImpl impleme
         complete = true;
     }
 
-    /**
-     * @see ChildNodeEntries#iterator()
-     */
+    @Override
     public Iterator<NodeEntry> iterator() {
         List<NodeEntry> l = new ArrayList<NodeEntry>(entries.size());
         for (Iterator<LinkedEntries.LinkNode> it = entries.linkNodeIterator(); it.hasNext();) {
@@ -193,16 +184,12 @@ final class ChildNodeEntriesImpl impleme
         return Collections.unmodifiableList(l).iterator();
     }
 
-    /**
-     * @see ChildNodeEntries#get(Name)
-     */
+    @Override
     public List<NodeEntry> get(Name nodeName) {
         return entriesByName.getList(nodeName);
     }
 
-    /**
-     * @see ChildNodeEntries#get(Name, int)
-     */
+    @Override
     public NodeEntry get(Name nodeName, int index) {
         if (index < Path.INDEX_DEFAULT) {
             throw new IllegalArgumentException("index is 1-based");
@@ -210,9 +197,7 @@ final class ChildNodeEntriesImpl impleme
         return entriesByName.getNodeEntry(nodeName, index);
     }
 
-    /**
-     * @see ChildNodeEntries#get(Name, String)
-     */
+    @Override
     public NodeEntry get(Name nodeName, String uniqueID) {
         if (uniqueID == null || nodeName == null) {
             throw new IllegalArgumentException();
@@ -230,15 +215,13 @@ final class ChildNodeEntriesImpl impleme
      * {@link #add(NodeEntry, int)}, where the index is {@link Path#INDEX_UNDEFINED}.
      *
      * @param cne the <code>NodeEntry</code> to add.
-     * @see ChildNodeEntries#add(NodeEntry)
      */
+     @Override
      public synchronized void add(NodeEntry cne) {
         internalAdd(cne, Path.INDEX_UNDEFINED);
-    }
+     }
 
-    /**
-     * @see ChildNodeEntries#add(NodeEntry, int)
-     */
+    @Override
     public synchronized void add(NodeEntry cne, int index) {
         if (index < Path.INDEX_UNDEFINED) {
             throw new IllegalArgumentException("Invalid index" + index);
@@ -246,9 +229,7 @@ final class ChildNodeEntriesImpl impleme
         internalAdd(cne, index);
     }
 
-    /**
-     * @see ChildNodeEntries#add(NodeEntry, int, NodeEntry)
-     */
+    @Override
     public synchronized void add(NodeEntry entry, int index, NodeEntry beforeEntry) {
         if (beforeEntry != null) {
             // the link node where the new entry is ordered before
@@ -281,7 +262,7 @@ final class ChildNodeEntriesImpl impleme
         }
 
         // in case index greater than default -> create intermediate entries.
-        // TODO: TOBEFIXED in case of orderable node the order in the 'linked-entries' must be respected.
+        // TODO: in case of orderable node the order in the 'linked-entries' must be respected.
         for (int i = Path.INDEX_DEFAULT; i < index; i++) {
             LinkedEntries.LinkNode previous = entriesByName.getLinkNode(nodeName, i);
             if (previous == null) {
@@ -310,20 +291,19 @@ final class ChildNodeEntriesImpl impleme
      * @param insertAfter
      * @return the <code>LinkNode</code> associated with the <code>newEntry</code>.
      */
-    private LinkedEntries.LinkNode internalAddAfter(NodeEntry newEntry, int index,
-                                                    LinkedEntries.LinkNode insertAfter) {
+    private LinkedEntries.LinkNode internalAddAfter(NodeEntry newEntry, int index, LinkedEntries.LinkNode insertAfter) {
         LinkedEntries.LinkNode ln = entries.addAfter(newEntry, index, insertAfter);
         entriesByName.put(newEntry.getName(), index, ln);
         return ln;
     }
 
     /**
-     * Removes the child node entry refering to the node state.
+     * Removes the child node entry referring to the node state.
      *
      * @param childEntry the entry to be removed.
      * @return the removed entry or <code>null</code> if there is no such entry.
-     * @see ChildNodeEntries#remove(NodeEntry)
      */
+    @Override
     public synchronized NodeEntry remove(NodeEntry childEntry) {
         LinkedEntries.LinkNode ln = entries.removeNodeEntry(childEntry);
         if (ln != null) {
@@ -347,8 +327,8 @@ final class ChildNodeEntriesImpl impleme
      * @throws NoSuchElementException if <code>insertNode</code> or
      * <code>beforeNode</code> does not have a <code>NodeEntry</code>
      * in this <code>ChildNodeEntries</code>.
-     * @see ChildNodeEntries#reorder(NodeEntry, NodeEntry)
      */
+    @Override
     public synchronized NodeEntry reorder(NodeEntry insertEntry, NodeEntry beforeEntry) {
         // the link node to move
         LinkedEntries.LinkNode insertLN = entries.getLinkNode(insertEntry);
@@ -356,7 +336,7 @@ final class ChildNodeEntriesImpl impleme
             throw new NoSuchElementException();
         }
         // the link node where insertLN is ordered before
-        LinkedEntries.LinkNode beforeLN = (beforeEntry != null) ? entries.getLinkNode(beforeEntry) : null;
+        LinkedEntries.LinkNode beforeLN = beforeEntry != null ? entries.getLinkNode(beforeEntry) : null;
         if (beforeEntry != null && beforeLN == null) {
             throw new NoSuchElementException();
         }
@@ -368,9 +348,7 @@ final class ChildNodeEntriesImpl impleme
         return previousBefore;
     }
 
-    /**
-     * @see ChildNodeEntries#reorderAfter(NodeEntry, NodeEntry)
-     */
+    @Override
     public void reorderAfter(NodeEntry insertEntry, NodeEntry afterEntry) {
         // the link node to move
         LinkedEntries.LinkNode insertLN = entries.getLinkNode(insertEntry);
@@ -378,7 +356,7 @@ final class ChildNodeEntriesImpl impleme
             throw new NoSuchElementException();
         }
         // the link node where insertLN is ordered before
-        LinkedEntries.LinkNode afterLN = (afterEntry != null) ? entries.getLinkNode(afterEntry) : null;
+        LinkedEntries.LinkNode afterLN = afterEntry != null ? entries.getLinkNode(afterEntry) : null;
         if (afterEntry != null && afterLN == null) {
             throw new NoSuchElementException();
         }
@@ -395,8 +373,7 @@ final class ChildNodeEntriesImpl impleme
      * @param insertLN
      * @param beforeLN
      */
-    private void reorder(Name insertName, LinkedEntries.LinkNode insertLN,
-                         LinkedEntries.LinkNode beforeLN) {
+    private void reorder(Name insertName, LinkedEntries.LinkNode insertLN, LinkedEntries.LinkNode beforeLN) {
         // reorder named map
         if (entriesByName.containsSiblings(insertName)) {
             int position;
@@ -443,12 +420,11 @@ final class ChildNodeEntriesImpl impleme
         if (currentAfter == insertLN) {
             log.debug("Already ordered behind 'afterEntry'.");
             // nothing to do
-            return;
         } else {
             // reorder named map
             Name insertName = insertLN.qName;
             if (entriesByName.containsSiblings(insertName)) {
-                int position = -1; // default: reorder to the end.
+                int position; 
                 if (afterLN == entries.getHeader()) {
                     // move to the beginning
                     position = 0;
@@ -459,7 +435,7 @@ final class ChildNodeEntriesImpl impleme
                     position = 0;
                     for (Iterator<LinkedEntries.LinkNode> it = entries.linkNodeIterator(); it.hasNext(); ) {
                         LinkedEntries.LinkNode ln = it.next();
-                        if (insertName.equals(ln.qName) && (ln != insertLN)) {
+                        if (insertName.equals(ln.qName) && ln != insertLN) {
                             position++;
                         }
                         if (ln == afterLN) {
@@ -475,6 +451,7 @@ final class ChildNodeEntriesImpl impleme
     }
 
     //-------------------------------------------------< AbstractLinkedList >---
+    
     /**
      * An implementation of a linked list which provides access to the internal
      * LinkNode which links the entries of the list.
@@ -482,7 +459,6 @@ final class ChildNodeEntriesImpl impleme
     private final class LinkedEntries extends AbstractLinkedList {
 
         LinkedEntries() {
-            super();
             init();
         }
 
@@ -586,17 +562,12 @@ final class ChildNodeEntriesImpl impleme
          *
          * @param value a child node entry.
          * @return a wrapping {@link LinkedEntries.LinkNode}.
-         * @see AbstractLinkedList#createNode(Object)
          */
         @Override
         protected Node createNode(Object value) {
             return new LinkedEntries.LinkNode(value, Path.INDEX_DEFAULT);
         }
 
-        /**
-         * @return a new <code>LinkNode</code>.
-         * @see AbstractLinkedList#createHeaderNode()
-         */
         @Override
         protected Node createHeaderNode() {
             return new LinkedEntries.LinkNode();
@@ -618,7 +589,6 @@ final class ChildNodeEntriesImpl impleme
             private final Name qName;
 
             protected LinkNode() {
-                super();
                 qName = null;
             }
 
@@ -672,14 +642,14 @@ final class ChildNodeEntriesImpl impleme
              * @return the next LinkNode.
              */
             public LinkedEntries.LinkNode getNextLinkNode() {
-                return (LinkedEntries.LinkNode) super.getNextNode();
+                return (LinkedEntries.LinkNode) getNextNode();
             }
 
             /**
              * @return the next LinkNode.
              */
             public LinkedEntries.LinkNode getPreviousLinkNode() {
-                return (LinkedEntries.LinkNode) super.getPreviousNode();
+                return (LinkedEntries.LinkNode) getPreviousNode();
             }
         }
 
@@ -689,11 +659,13 @@ final class ChildNodeEntriesImpl impleme
             private LinkedEntries.LinkNode next = ((LinkedEntries.LinkNode) header).getNextLinkNode();
             private final int expectedModCount = modCount;
 
+            @Override
             public boolean hasNext() {
                 checkModCount();
                 return next != header;
             }
 
+            @Override
             public LinkedEntries.LinkNode next() {
                 checkModCount();
                 if (!hasNext()) {
@@ -704,6 +676,7 @@ final class ChildNodeEntriesImpl impleme
                 return n;
             }
 
+            @Override
             public void remove() {
                 throw new UnsupportedOperationException("remove");
             }
@@ -719,6 +692,7 @@ final class ChildNodeEntriesImpl impleme
 
 
     //--------------------------------------------------------------------------
+    
     /**
      * Mapping of Name to LinkNode OR List of LinkNode(s) in case of SNSiblings.
      */
@@ -728,10 +702,10 @@ final class ChildNodeEntriesImpl impleme
         private final Map<Name, LinkedEntries.LinkNode> nameMap = new HashMap<Name, LinkedEntries.LinkNode>();
 
         /**
-         * Return true if more than one NodeEnty with the given name exists.
+         * Return true if more than one NodeEntry with the given name exists.
          *
          * @param qName
-         * @return true if more than one NodeEnty with the given name exists.
+         * @return true if more than one NodeEntry with the given name exists.
          */
         public boolean containsSiblings(Name qName) {
             return snsMap.containsKey(qName);
@@ -753,8 +727,7 @@ final class ChildNodeEntriesImpl impleme
                 List<LinkedEntries.LinkNode> l = snsMap.get(qName);
                 if (l != null) {
                     List<NodeEntry> nodeEntries = new ArrayList<NodeEntry>(l.size());
-                    for (Iterator<LinkedEntries.LinkNode> it = l.iterator(); it.hasNext();) {
-                        LinkedEntries.LinkNode ln = it.next();
+                    for (LinkedEntries.LinkNode ln : l) {
                         nodeEntries.add(ln.getNodeEntry());
                     }
                     return nodeEntries;
@@ -810,12 +783,12 @@ final class ChildNodeEntriesImpl impleme
 
             LinkedEntries.LinkNode val = nameMap.get(name);
             if (val != null) {
-                return (index == Path.INDEX_DEFAULT) ? val : null;
+                return index == Path.INDEX_DEFAULT ? val : null;
             } else {
                 // look in snsMap
                 List<LinkedEntries.LinkNode> l = snsMap.get(name);
                 int pos = index - 1; // Index of NodeEntry is 1-based
-                return (l != null && pos < l.size()) ? l.get(pos) : null;
+                return l != null && pos < l.size() ? l.get(pos) : null;
             }
         }
 
@@ -833,8 +806,7 @@ final class ChildNodeEntriesImpl impleme
                     // look in snsMap
                     List<LinkedEntries.LinkNode> l = snsMap.get(name);
                     if (l != null) {
-                        for (Iterator<LinkedEntries.LinkNode> it = l.iterator(); it.hasNext();) {
-                            LinkedEntries.LinkNode ln = it.next();
+                        for (LinkedEntries.LinkNode ln : l) {
                             if (uniqueID.equals(ln.getNodeEntry().getUniqueID())) {
                                 return ln;
                             }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildPropertyEntries.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildPropertyEntries.java?rev=1164026&r1=1164025&r2=1164026&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildPropertyEntries.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildPropertyEntries.java Thu Sep  1 11:52:08 2011
@@ -31,7 +31,7 @@ public interface ChildPropertyEntries {
      * @param propertyName
      * @return true if a property entry with the given name exists.
      */
-    public boolean contains(Name propertyName);
+    boolean contains(Name propertyName);
 
     /**
      * Return the PropertyEntry with the given <code>Name</code> or
@@ -40,7 +40,7 @@ public interface ChildPropertyEntries {
      * @param propertyName
      * @return
      */
-    public PropertyEntry get(Name propertyName);
+    PropertyEntry get(Name propertyName);
 
     /**
      * Returns an unmodifiable collection containing all <code>PropertyEntry</code>
@@ -48,21 +48,21 @@ public interface ChildPropertyEntries {
      *
      * @return Collection of all <code>PropertyEntry</code> objects present.
      */
-    public Collection<PropertyEntry> getPropertyEntries();
+    Collection<PropertyEntry> getPropertyEntries();
 
     /**
      * Returns an unmodifiable collection containing all existing property names.
      *
      * @return Collection of <code>Name</code>
      */
-    public Collection<Name> getPropertyNames();
+    Collection<Name> getPropertyNames();
 
     /**
      * Adds the new <code>PropertyEntry</code> to this <code>ChildPropertyEntries</code>.
      *
      * @param propertyEntry
      */
-    public void add(PropertyEntry propertyEntry);
+    void add(PropertyEntry propertyEntry);
 
     /**
      * Adds all <code>PropertyEntry</code>s from the given collection to this
@@ -70,7 +70,7 @@ public interface ChildPropertyEntries {
      *
      * @param propertyEntries
      */
-    public void addAll(Collection<PropertyEntry> propertyEntries);
+    void addAll(Collection<PropertyEntry> propertyEntries);
 
     /**
      * Remove the collection entry with the given <code>Name</code>.
@@ -79,5 +79,5 @@ public interface ChildPropertyEntries {
      * @return true If this <code>ChildPropertyEntries</code> contained the
      * given entry. False otherwise.
      */
-    public boolean remove(PropertyEntry propertyEntry);
+    boolean remove(PropertyEntry propertyEntry);
 }
\ No newline at end of file

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildPropertyEntriesImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildPropertyEntriesImpl.java?rev=1164026&r1=1164025&r2=1164026&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildPropertyEntriesImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildPropertyEntriesImpl.java Thu Sep  1 11:52:08 2011
@@ -33,29 +33,22 @@ import java.lang.ref.SoftReference;
  * <code>ChildPropertyEntriesImpl</code>...
  */
 public class ChildPropertyEntriesImpl implements ChildPropertyEntries {
-
-    private static Logger log = LoggerFactory.getLogger(ChildPropertyEntriesImpl.class);
-
     private final Map<Name, Reference<PropertyEntry>> properties;
     private final NodeEntry parent;
     private final EntryFactory factory;
 
     ChildPropertyEntriesImpl(NodeEntry parent, EntryFactory factory) {
-        this.properties = new HashMap<Name, Reference<PropertyEntry>>();
+        properties = new HashMap<Name, Reference<PropertyEntry>>();
         this.parent = parent;
         this.factory = factory;
     }
 
-    /**
-     * @see ChildPropertyEntries#contains(Name)
-     */
+    @Override
     public boolean contains(Name propertyName) {
         return properties.containsKey(propertyName);
     }
 
-    /**
-     * @see ChildPropertyEntries#get(Name)
-     */
+    @Override
     public PropertyEntry get(Name propertyName) {
         Reference<PropertyEntry> ref = properties.get(propertyName);
         if (ref == null) {
@@ -72,9 +65,7 @@ public class ChildPropertyEntriesImpl im
         return entry;
     }
 
-    /**
-     * @see ChildPropertyEntries#getPropertyEntries()
-     */
+    @Override
     public Collection<PropertyEntry> getPropertyEntries() {
         synchronized (properties) {
             Set<PropertyEntry> entries = new HashSet<PropertyEntry>(properties.size());
@@ -85,16 +76,12 @@ public class ChildPropertyEntriesImpl im
         }
     }
 
-    /**
-     * @see ChildPropertyEntries#getPropertyNames()
-     */
+    @Override
     public Collection<Name> getPropertyNames() {
         return Collections.unmodifiableCollection(properties.keySet());
     }
 
-    /**
-     * @see ChildPropertyEntries#add(PropertyEntry)
-     */
+    @Override
     public void add(PropertyEntry propertyEntry) {
         synchronized (properties) {
             Reference<PropertyEntry> ref = new SoftReference<PropertyEntry>(propertyEntry);
@@ -102,18 +89,14 @@ public class ChildPropertyEntriesImpl im
         }
     }
 
-    /**
-     * @see ChildPropertyEntries#addAll(Collection)
-     */
+    @Override
     public void addAll(Collection<PropertyEntry> propertyEntries) {
         for (PropertyEntry pe : propertyEntries) {
             add(pe);
         }
     }
 
-    /**
-     * @see ChildPropertyEntries#remove(PropertyEntry)
-     */
+    @Override
     public boolean remove(PropertyEntry propertyEntry) {
         synchronized (properties) {
             Name pName = propertyEntry.getName();

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryFactory.java?rev=1164026&r1=1164025&r2=1164026&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryFactory.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryFactory.java Thu Sep  1 11:52:08 2011
@@ -66,8 +66,9 @@ public class EntryFactory {
      * @param listener
      * @param pathFactory
      */
-    public EntryFactory(TransientItemStateFactory isf, IdFactory idFactory,
-                        NodeEntryListener listener, PathFactory pathFactory) {
+    public EntryFactory(TransientItemStateFactory isf, IdFactory idFactory, NodeEntryListener listener,
+        PathFactory pathFactory) {
+        
         this.idFactory = idFactory;
         this.pathFactory = pathFactory;
         this.isf = isf;
@@ -75,8 +76,8 @@ public class EntryFactory {
 
         // todo: make this configurable if necessary
         // this.invalidationStrategy = new NodeEntryImpl.EagerInvalidation();
-        this.invalidationStrategy = new NodeEntryImpl.LazyInvalidation();
-        this.rootEntry = NodeEntryImpl.createRootEntry(this);
+        invalidationStrategy = new NodeEntryImpl.LazyInvalidation();
+        rootEntry = NodeEntryImpl.createRootEntry(this);
     }
 
     /**
@@ -128,6 +129,7 @@ public class EntryFactory {
     }
 
     //--------------------------------------------------------------------------
+
     /**
      * @param resolver
      */
@@ -148,14 +150,14 @@ public class EntryFactory {
     }
 
     //--------------------------------------------------< NodeEntryListener >---
-    public interface NodeEntryListener {
 
-        public void entryCreated(NodeEntry entry);
-
-        public void uniqueIdChanged (NodeEntry entry, String previousUniqueID);
+    public interface NodeEntryListener {
+        void entryCreated(NodeEntry entry);
+        void uniqueIdChanged(NodeEntry entry, String previousUniqueID);
     }
 
     // ----------------------------------------------< InvalidationStrategy >---
+    
     /**
      * Strategy for invalidating item states
      */
@@ -171,7 +173,7 @@ public class EntryFactory {
          * @param entry The <code>HierarchyEntry</code> to invalidate.
          * @param recursive Invalidate state of child entries if <code>true</code>.
          */
-        public void invalidate(HierarchyEntry entry, boolean recursive);
+        void invalidate(HierarchyEntry entry, boolean recursive);
 
         /**
          * Apply any pending {@link org.apache.jackrabbit.jcr2spi.state.ItemState#invalidate()
@@ -180,6 +182,6 @@ public class EntryFactory {
          *
          * @param entry The affected <code>NodeEntry</code>.
          */
-        public void applyPending(HierarchyEntry entry);
+        void applyPending(HierarchyEntry entry);
     }
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryValidation.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryValidation.java?rev=1164026&r1=1164025&r2=1164026&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryValidation.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryValidation.java Thu Sep  1 11:52:08 2011
@@ -28,8 +28,7 @@ import java.util.Iterator;
  * <code>EntryValidation</code>...
  */
 final class EntryValidation {
-
-    private static Logger log = LoggerFactory.getLogger(EntryValidation.class);
+    private EntryValidation() { }
 
     /**
      * Returns <code>true</code> if the collection of child node
@@ -52,7 +51,7 @@ final class EntryValidation {
      * Returns <code>true</code> if the given childnode entry is not
      * <code>null</code> and resolves to a NodeState, that is valid or if the
      * childnode entry has not been resolved up to now (assuming the corresponding
-     * nodestate is still valid).
+     * node state is still valid).
      *
      * @param cne NodeEntry to check.
      * @return <code>true</code> if the given entry is valid.
@@ -99,9 +98,9 @@ final class EntryValidation {
     }
 
     /**
-     * Returns <code>true</code> if the given childproperty entry is not
+     * Returns <code>true</code> if the given child property entry is not
      * <code>null</code> and resolves to a PropertyState, that is valid or if the
-     * childproperty entry has not been resolved up to now (assuming the corresponding
+     * child property entry has not been resolved up to now (assuming the corresponding
      * PropertyState is still valid).
      *
      * @param cpe PropertyEntry to check.

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntry.java?rev=1164026&r1=1164025&r2=1164026&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntry.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntry.java Thu Sep  1 11:52:08 2011
@@ -16,10 +16,6 @@
  */
 package org.apache.jackrabbit.jcr2spi.hierarchy;
 
-import javax.jcr.InvalidItemStateException;
-import javax.jcr.ItemNotFoundException;
-import javax.jcr.RepositoryException;
-
 import org.apache.jackrabbit.jcr2spi.operation.Operation;
 import org.apache.jackrabbit.jcr2spi.state.ItemState;
 import org.apache.jackrabbit.jcr2spi.state.Status;
@@ -27,6 +23,10 @@ import org.apache.jackrabbit.spi.ItemInf
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.Path;
 
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.ItemNotFoundException;
+import javax.jcr.RepositoryException;
+
 /**
  * <code>HierarchyEntry</code>...
  */
@@ -37,24 +37,24 @@ public interface HierarchyEntry {
      *
      * @return
      */
-    public boolean denotesNode();
+    boolean denotesNode();
 
     /**
      * @return the name of this hierarchy entry.
      */
-    public Name getName();
+    Name getName();
 
     /**
      * @return the path of this hierarchy entry.
      */
-    public Path getPath() throws RepositoryException;
+    Path getPath() throws RepositoryException;
 
     /**
      * @return If this entry has not been modified this method returns the same
      * as {@link #getPath()}. In case of moved items this method return the
      * original path as it is present on the persistent layer.
      */
-    public Path getWorkspacePath() throws RepositoryException;
+    Path getWorkspacePath() throws RepositoryException;
 
     /**
      * Returns the <code>NodeEntry</code> being parent to this
@@ -62,7 +62,7 @@ public interface HierarchyEntry {
      *
      * @return the parent <code>HierarchyEntry</code>
      */
-    public NodeEntry getParent();
+    NodeEntry getParent();
 
     /**
      * If this <code>HierarchyEntry</code> provides an underlying
@@ -73,7 +73,7 @@ public interface HierarchyEntry {
      * entry has not been resolved yet.
      * @see ItemState#getStatus()
      */
-    public int getStatus();
+    int getStatus();
 
     /**
      * Returns <code>true</code> if the referenced <code>ItemState</code> is
@@ -85,7 +85,7 @@ public interface HierarchyEntry {
      * otherwise <code>false</code>.
      * @see #getItemState()
      */
-    public boolean isAvailable();
+    boolean isAvailable();
 
     /**
      * If this <code>HierarchyEntry</code> has already been resolved before
@@ -101,14 +101,14 @@ public interface HierarchyEntry {
      * @throws RepositoryException If an error occurs while retrieving the
      * <code>ItemState</code>.
      */
-    public ItemState getItemState() throws ItemNotFoundException, RepositoryException;
+    ItemState getItemState() throws ItemNotFoundException, RepositoryException;
 
     /**
      * Set the ItemState this hierarchyEntry will be resolved to.
      *
      * @param state
      */
-    public void setItemState(ItemState state);
+    void setItemState(ItemState state);
 
     /**
      * Invalidates the underlying <code>ItemState</code> if available and if it
@@ -119,13 +119,13 @@ public interface HierarchyEntry {
      * Status#INVALIDATED} and does not actually update it with the persistent
      * state in the repository.
      */
-    public void invalidate(boolean recursive);
+    void invalidate(boolean recursive);
 
     /**
      * Calculates the status of the underlying <code>ItemState</code>: any pending
      * changes to the underlying <code>ItemState</code> are applied.
      */
-    public void calculateStatus();
+    void calculateStatus();
 
     /**
      * Traverses the hierarchy and reverts all transient modifications such as
@@ -134,7 +134,7 @@ public interface HierarchyEntry {
      *
      * @throws RepositoryException if an error occurs.
      */
-    public void revert() throws RepositoryException;
+    void revert() throws RepositoryException;
 
     /**
      * Reloads this hierarchy entry and the corresponding ItemState, if this
@@ -143,7 +143,7 @@ public interface HierarchyEntry {
      *
      * @param recursive
      */
-    public void reload(boolean recursive);
+    void reload(boolean recursive);
 
     /**
      * Traverses the hierarchy and marks all available item states as transiently
@@ -157,7 +157,7 @@ public interface HierarchyEntry {
      * @throws RepositoryException if an error occurs while removing any of the item
      * states e.g. an item state is not valid anymore.
      */
-    public void transientRemove() throws InvalidItemStateException, RepositoryException;
+    void transientRemove() throws InvalidItemStateException, RepositoryException;
 
     /**
      * Removes this <code>HierarchyEntry</code> from its parent and sets the
@@ -165,14 +165,14 @@ public interface HierarchyEntry {
      * {@link Status#STALE_DESTROYED}, respectively. If this entry is a
      * NodeEntry all descending ItemStates must get their status changed as well.
      */
-    public void remove();
+    void remove();
 
     /**
      * Clean up this entry upon {@link Operation#undo()} or {@link Operation#persisted()}.
      *
      * @param transientOperation
      */
-    public void complete(Operation transientOperation) throws RepositoryException;
+    void complete(Operation transientOperation) throws RepositoryException;
 
     /**
      * The required generation of this <code>HierarchyEntry</code> . This is used by the
@@ -180,5 +180,5 @@ public interface HierarchyEntry {
      * That is whether the generation of the item info in the cache is the same or more recent
      * as the required generation of this entry.
      */
-    public long getGeneration();
+    long getGeneration();
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntryImpl.java?rev=1164026&r1=1164025&r2=1164026&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntryImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntryImpl.java Thu Sep  1 11:52:08 2011
@@ -16,18 +16,12 @@
  */
 package org.apache.jackrabbit.jcr2spi.hierarchy;
 
-import java.lang.ref.Reference;
-import java.lang.ref.SoftReference;
-
-import javax.jcr.InvalidItemStateException;
-import javax.jcr.ItemNotFoundException;
-import javax.jcr.RepositoryException;
-
+import com.sun.xml.internal.bind.util.Which;
 import org.apache.jackrabbit.jcr2spi.state.ItemState;
+import org.apache.jackrabbit.jcr2spi.state.ItemState.MergeResult;
 import org.apache.jackrabbit.jcr2spi.state.ItemStateFactory;
 import org.apache.jackrabbit.jcr2spi.state.Status;
 import org.apache.jackrabbit.jcr2spi.state.TransientItemStateFactory;
-import org.apache.jackrabbit.jcr2spi.state.ItemState.MergeResult;
 import org.apache.jackrabbit.spi.IdFactory;
 import org.apache.jackrabbit.spi.ItemInfoCache;
 import org.apache.jackrabbit.spi.Name;
@@ -36,13 +30,18 @@ import org.apache.jackrabbit.spi.PathFac
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.ItemNotFoundException;
+import javax.jcr.RepositoryException;
+import java.lang.ref.Reference;
+import java.lang.ref.SoftReference;
+
 /**
  * <code>HierarchyEntryImpl</code> implements base functionality for child node
  * and property references.
  */
 abstract class HierarchyEntryImpl implements HierarchyEntry {
-
-    private static Logger log = LoggerFactory.getLogger(HierarchyEntryImpl.class);
+    private static final Logger log = LoggerFactory.getLogger(HierarchyEntryImpl.class);
 
     /**
      * The required generation of this entry. This is used by the
@@ -125,7 +124,7 @@ abstract class HierarchyEntryImpl implem
      * does not exist.
      * @throws RepositoryException if an error occurs.
      */
-    ItemState resolve() throws ItemNotFoundException, RepositoryException {
+    ItemState resolve() throws RepositoryException {
         // check if already resolved
         ItemState state = internalGetItemState();
         // not yet resolved. retrieve and keep soft reference to state
@@ -157,7 +156,7 @@ abstract class HierarchyEntryImpl implem
      * does not exist.
      * @throws RepositoryException if another error occurs.
      */
-    abstract ItemState doResolve() throws ItemNotFoundException, RepositoryException;
+    abstract ItemState doResolve() throws RepositoryException;
 
     /**
      * Build the Path of this entry
@@ -198,37 +197,28 @@ abstract class HierarchyEntryImpl implem
     }
 
     //-----------------------------------------------------< HierarchyEntry >---
-    /**
-     * @see HierarchyEntry#getName()
-     */
+
+    @Override
     public Name getName() {
         return name;
     }
 
-    /**
-     * @see HierarchyEntry#getPath()
-     */
+    @Override
     public Path getPath() throws RepositoryException {
         return buildPath(false);
     }
 
-    /**
-     * @see HierarchyEntry#getWorkspacePath()
-     */
+    @Override
     public Path getWorkspacePath() throws RepositoryException {
         return buildPath(true);
     }
 
-    /**
-     * @see HierarchyEntry#getParent()
-     */
+    @Override
     public NodeEntry getParent() {
         return parent;
     }
 
-    /**
-     * @see HierarchyEntry#getStatus()
-     */
+    @Override
     public int getStatus() {
         ItemState state = internalGetItemState();
         if (state == null) {
@@ -238,26 +228,23 @@ abstract class HierarchyEntryImpl implem
         }
     }
 
-    /**
-     * @see HierarchyEntry#isAvailable()
-     */
+    @Override
     public boolean isAvailable() {
         return internalGetItemState() != null;
     }
 
     /**
      * {@inheritDoc}<br>
-     * @see HierarchyEntry#getItemState()
      */
-    public ItemState getItemState() throws ItemNotFoundException, RepositoryException {
-        ItemState state = resolve();
-        return state;
+    @Override
+    public ItemState getItemState() throws RepositoryException {
+        return resolve();
     }
 
     /**
      * {@inheritDoc}<br>
-     * @see HierarchyEntry#setItemState(ItemState)
      */
+    @Override
     public synchronized void setItemState(ItemState state) {
         ItemState currentState = internalGetItemState();
         if (state == null || state == currentState || denotesNode() != state.isNode()) {
@@ -284,20 +271,18 @@ abstract class HierarchyEntryImpl implem
 
     /**
      * {@inheritDoc}<br>
-     * @see HierarchyEntry#invalidate(boolean)
      */
+    @Override
     public void invalidate(boolean recursive) {
         getInvalidationStrategy().invalidate(this, recursive);
     }
 
+    @Override
     public void calculateStatus() {
         getInvalidationStrategy().applyPending(this);
     }
 
-    /**
-     * {@inheritDoc}
-     * @see HierarchyEntry#revert()
-     */
+    @Override
     public void revert() throws RepositoryException {
         ItemState state = internalGetItemState();
         if (state == null) {
@@ -340,10 +325,7 @@ abstract class HierarchyEntryImpl implem
         }
     }
 
-    /**
-     * {@inheritDoc}
-     * @see HierarchyEntry#reload(boolean)
-     */
+    @Override
     public void reload(boolean recursive) {
         int status = getStatus();
         if (status == Status._UNDEFINED_) {
@@ -353,13 +335,12 @@ abstract class HierarchyEntryImpl implem
         if (Status.isTransient(status) || Status.isStale(status) || Status.isTerminal(status)) {
             // transient || stale: avoid reloading
             // new || terminal: cannot be reloaded from persistent layer anyway.
-            log.debug("Skip reload for item with status " + Status.getName(status) + ".");
+            log.debug("Skip reload for item with status " + Status.getName(status) + '.');
             return;
         }
-        /**
-         * Retrieved a fresh ItemState from the persistent layer. Which will
-         * then be merged into the current state.
-         */
+
+        // Retrieved a fresh ItemState from the persistent layer. Which will
+        // then be merged into the current state.
         try {
             ItemStateFactory isf = getItemStateFactory();
             if (denotesNode()) {
@@ -379,16 +360,14 @@ abstract class HierarchyEntryImpl implem
         }
     }
 
-    /**
-     * {@inheritDoc}
-     * @see HierarchyEntry#transientRemove()
-     */
-    public void transientRemove() throws InvalidItemStateException, RepositoryException {
+    @Override
+    public void transientRemove() throws RepositoryException {
         ItemState state = internalGetItemState();
         if (state == null) {
             // nothing to do -> correct status must be set upon resolution.
             return;
         }
+
         // if during recursive removal an invalidated entry is found, reload
         // it in order to determine the current status.
         if (state.getStatus() == Status.INVALIDATED) {
@@ -415,13 +394,12 @@ abstract class HierarchyEntryImpl implem
         }
     }
 
-    /**
-     * @see HierarchyEntry#remove()
-     */
+    @Override
     public void remove() {
         internalRemove(false);
     }
 
+    @Override
     public long getGeneration() {
         calculateStatus();
         return generation;
@@ -455,6 +433,7 @@ abstract class HierarchyEntryImpl implem
     }
 
     // ----------------------------------------------< InvalidationStrategy >---
+    
     /**
      * An implementation of <code>InvalidationStrategy</code> which lazily invalidates
      * the underlying {@link ItemState}s.
@@ -464,7 +443,7 @@ abstract class HierarchyEntryImpl implem
         /**
          * Marker for entries with a pending recursive invalidation.
          */
-        private static long INVALIDATION_PENDING = -1;
+        private static final long INVALIDATION_PENDING = -1;
 
         /**
          * Number of the current generation
@@ -488,6 +467,7 @@ abstract class HierarchyEntryImpl implem
          * invalidates the entry right away.
          * {@inheritDoc}
          */
+        @Override
         public void invalidate(HierarchyEntry entry, boolean recursive) {
             HierarchyEntryImpl he = (HierarchyEntryImpl) entry;
             if (recursive) {
@@ -513,6 +493,7 @@ abstract class HierarchyEntryImpl implem
          * Otherwise this method does nothing.
          * {@inheritDoc}
          */
+        @Override
         public void applyPending(HierarchyEntry entry) {
             if (!invalidating) {
                 invalidating = true;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEventListener.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEventListener.java?rev=1164026&r1=1164025&r2=1164026&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEventListener.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEventListener.java Thu Sep  1 11:52:08 2011
@@ -16,16 +16,7 @@
  */
 package org.apache.jackrabbit.jcr2spi.hierarchy;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.jcr.RepositoryException;
-
+import com.sun.tools.javac.resources.version;
 import org.apache.jackrabbit.jcr2spi.WorkspaceManager;
 import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.jcr2spi.observation.InternalEventListener;
@@ -38,19 +29,27 @@ import org.apache.jackrabbit.spi.Path;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.jcr.RepositoryException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
 /**
  * <code>HierarchyEventListener</code>...
  */
 public class HierarchyEventListener implements InternalEventListener {
-
-    private static Logger log = LoggerFactory.getLogger(HierarchyEventListener.class);
+    private static final Logger log = LoggerFactory.getLogger(HierarchyEventListener.class);
 
     private final HierarchyManager hierarchyMgr;
     private final Collection<EventFilter> eventFilter;
 
-    public HierarchyEventListener(WorkspaceManager wspManager,
-                                  HierarchyManager hierarchyMgr,
-                                  CacheBehaviour cacheBehaviour) {
+    public HierarchyEventListener(WorkspaceManager wspManager, HierarchyManager hierarchyMgr,
+            CacheBehaviour cacheBehaviour) {
+        
         this.hierarchyMgr = hierarchyMgr;
         if (cacheBehaviour == CacheBehaviour.OBSERVATION) {
             EventFilter filter = null;
@@ -60,22 +59,21 @@ public class HierarchyEventListener impl
                 filter = wspManager.createEventFilter(Event.ALL_TYPES, root, true, null, null, true);
             } catch (RepositoryException e) {
                 // SPI does not support observation, or another error occurred.
-                log.debug("Creating event filter for cache behavoir observation failed", e);
+                log.debug("Creating event filter for cache behavior observation failed", e);
             }
             if (filter == null) {
-                this.eventFilter = Collections.emptyList();
+                eventFilter = Collections.emptyList();
             } else {
-                this.eventFilter = Collections.singletonList(filter);
+                eventFilter = Collections.singletonList(filter);
             }
         } else {
-            this.eventFilter = Collections.emptyList();
+            eventFilter = Collections.emptyList();
         }
     }
 
     //----------------------------------------------< InternalEventListener >---
-    /**
-     * @see InternalEventListener#getEventFilters()
-     */
+    
+    @Override
     public Collection<EventFilter> getEventFilters() {
         return eventFilter;
     }
@@ -86,8 +84,8 @@ public class HierarchyEventListener impl
      * since workspace operations are reported as local and have been applied already.
      *
      * @param eventBundle the events.
-     * @see InternalEventListener#onEvent(EventBundle)
      */
+    @Override
     public void onEvent(EventBundle eventBundle) {
         if (eventBundle.isLocal()) {
             log.debug("Local event bundle -> not processed by HierarchyEventListener.");
@@ -127,20 +125,16 @@ public class HierarchyEventListener impl
             }
         }
 
-        /* Process ADD-events.
-           In case of persisting transients modifications, the event-set may
-           still contain events that are not covered by the changeLog such as
-           new version-history or other autocreated properties and nodes.
-
-           Add events need to be processed hierarchically, since its not possible
-           to add a new child reference to a state that is not yet present in
-           the state manager.
-           The 'progress' flag is used to make sure, that during each loop at
-           least one event has been processed and removed from the iterator.
-           If this is not the case, there are not parent states present in the
-           state manager that need to be updated and the remaining events may
-           be ignored.
-         */
+        // Process ADD-events.
+        // In case of persisting transients modifications, the event-set may still contain events
+        // that are not covered by the changeLog such as new version -history or other autocreated
+        // properties and nodes.
+        //
+        // Add events need to be processed hierarchically, since its not possible to add a new child
+        // reference to a state that is not yet present in the state manager. The 'progress' flag is
+        // used to make sure, that during each loop at least one event has been processed and removed
+        // from the iterator. If this is not the case, there are not parent states present in the
+        // state manager that need to be updated and the remaining events may be ignored.
         boolean progress = true;
         while (!addEvents.isEmpty() && progress) {
             progress = false;
@@ -170,12 +164,12 @@ public class HierarchyEventListener impl
             }
         }
 
-        /* process all other events (removal, property changed) */
+        // process all other events (removal, property changed) 
         for (Event event : events) {
             int type = event.getType();
 
             NodeId parentId = event.getParentId();
-            NodeEntry parent = (parentId != null) ? (NodeEntry) hierarchyMgr.lookup(parentId) : null;
+            NodeEntry parent = parentId != null ? (NodeEntry) hierarchyMgr.lookup(parentId) : null;
             switch (type) {
                 case Event.NODE_REMOVED:
                 case Event.PROPERTY_REMOVED:
@@ -189,7 +183,7 @@ public class HierarchyEventListener impl
                     }
                     break;
                 case Event.PROPERTY_CHANGED:
-                    // notify parent in case jcr:mixintypes or jcr:uuid was changed.
+                    // notify parent in case jcr:mixinTypes or jcr:uuid was changed.
                     // if parent is 'null' (i.e. not yet loaded) the prop-entry does
                     // not exist either -> no need to inform propEntry
                     if (parent != null) {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyManager.java?rev=1164026&r1=1164025&r2=1164026&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyManager.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyManager.java Thu Sep  1 11:52:08 2011
@@ -35,12 +35,12 @@ public interface HierarchyManager {
     /**
      * Dispose this <code>HierarchyManager</code>
      */
-    public void dispose();
+    void dispose();
 
     /**
      * @return the root entry.
      */
-    public NodeEntry getRootEntry();
+    NodeEntry getRootEntry();
 
     /**
      * Lookup of <code>HierarchyEntry</code> by its workspace Id that may be different
@@ -55,7 +55,7 @@ public interface HierarchyManager {
      * @param workspaceItemId
      * @return the HierarchyEntry with the given <code>workspaceItemId</code>.
      */
-    public HierarchyEntry lookup(ItemId workspaceItemId);
+    HierarchyEntry lookup(ItemId workspaceItemId);
 
     /**
      * Lookup of <code>HierarchyEntry</code> by its workspace path that may be different
@@ -69,7 +69,7 @@ public interface HierarchyManager {
      * @param workspacePath
      * @return the HierarchyEntry with the given <code>workspacePath</code>.
      */
-    public HierarchyEntry lookup(Path workspacePath);
+    HierarchyEntry lookup(Path workspacePath);
 
     /**
      * Resolves a itemId into a <code>HierarchyEntry</code>.
@@ -79,7 +79,7 @@ public interface HierarchyManager {
      * @throws PathNotFoundException
      * @throws RepositoryException
      */
-    public NodeEntry getNodeEntry(NodeId nodeId) throws ItemNotFoundException, RepositoryException;
+    NodeEntry getNodeEntry(NodeId nodeId) throws ItemNotFoundException, RepositoryException;
 
     /**
      * Resolves a path into a <code>NodeEntry</code>.
@@ -89,7 +89,7 @@ public interface HierarchyManager {
      * @throws PathNotFoundException
      * @throws RepositoryException
      */
-    public NodeEntry getNodeEntry(Path qPath) throws PathNotFoundException, RepositoryException;
+    NodeEntry getNodeEntry(Path qPath) throws PathNotFoundException, RepositoryException;
 
     /**
      * Resolves a propertyId into a <code>PropertyEntry</code>.
@@ -99,7 +99,7 @@ public interface HierarchyManager {
      * @throws PathNotFoundException
      * @throws RepositoryException
      */
-    public PropertyEntry getPropertyEntry(PropertyId propertyId) throws ItemNotFoundException, RepositoryException;
+    PropertyEntry getPropertyEntry(PropertyId propertyId) throws ItemNotFoundException, RepositoryException;
 
     /**
      * Resolves a path into a <code>PropertyEntry</code>.
@@ -109,7 +109,7 @@ public interface HierarchyManager {
      * @throws PathNotFoundException
      * @throws RepositoryException
      */
-    public PropertyEntry getPropertyEntry(Path qPath) throws PathNotFoundException, RepositoryException;
+    PropertyEntry getPropertyEntry(Path qPath) throws PathNotFoundException, RepositoryException;
 
      /**
      * Retrieves the <code>NodeEntry</code> corresponding to the given
@@ -120,7 +120,7 @@ public interface HierarchyManager {
      * @throws PathNotFoundException
      * @throws RepositoryException
      */
-    public NodeState getNodeState(Path qPath) throws PathNotFoundException, RepositoryException;
+     NodeState getNodeState(Path qPath) throws PathNotFoundException, RepositoryException;
 
      /**
      * Retrieves the <code>PropertyEntry</code> corresponding to the given
@@ -131,7 +131,7 @@ public interface HierarchyManager {
      * @throws PathNotFoundException
      * @throws RepositoryException
      */
-    public PropertyState getPropertyState(Path qPath) throws PathNotFoundException, RepositoryException;
+     PropertyState getPropertyState(Path qPath) throws PathNotFoundException, RepositoryException;
 
     /**
      * Returns the depth of the specified item. The depth reflects the
@@ -141,7 +141,7 @@ public interface HierarchyManager {
      * @return the depth of the specified item
      * @throws RepositoryException if another error occurs
      */
-    public int getDepth(HierarchyEntry hierarchyEntry) throws ItemNotFoundException, RepositoryException;
+    int getDepth(HierarchyEntry hierarchyEntry) throws ItemNotFoundException, RepositoryException;
 
     /**
      * Returns the depth of the specified descendant relative to the given
@@ -158,5 +158,5 @@ public interface HierarchyManager {
      * denote an existing item.
      * @throws RepositoryException If another error occurs.
      */
-    public int getRelativeDepth(NodeEntry ancestor, HierarchyEntry descendant) throws ItemNotFoundException, RepositoryException;
+    int getRelativeDepth(NodeEntry ancestor, HierarchyEntry descendant) throws ItemNotFoundException, RepositoryException;
 }
\ No newline at end of file

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyManagerImpl.java?rev=1164026&r1=1164025&r2=1164026&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyManagerImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyManagerImpl.java Thu Sep  1 11:52:08 2011
@@ -39,16 +39,14 @@ import javax.jcr.RepositoryException;
  * interface.
  */
 public class HierarchyManagerImpl implements HierarchyManager {
-
-    private static Logger log = LoggerFactory.getLogger(HierarchyManagerImpl.class);
+    private static final Logger log = LoggerFactory.getLogger(HierarchyManagerImpl.class);
 
     private final NodeEntry rootEntry;
     private final UniqueIdResolver uniqueIdResolver;
     private final IdFactory idFactory;
     private NamePathResolver resolver;
 
-    public HierarchyManagerImpl(TransientItemStateFactory isf, IdFactory idFactory,
-                                PathFactory pathFactory) {
+    public HierarchyManagerImpl(TransientItemStateFactory isf, IdFactory idFactory, PathFactory pathFactory) {
         uniqueIdResolver = new UniqueIdResolver(isf);
         rootEntry = new EntryFactory(isf, idFactory, uniqueIdResolver, pathFactory).createRootEntry();
         this.idFactory = idFactory;
@@ -62,23 +60,18 @@ public class HierarchyManagerImpl implem
     }
 
     //---------------------------------------------------< HierarchyManager >---
-    /**
-     * @see HierarchyManager#dispose()
-     */
+    
+    @Override
     public void dispose() {
         uniqueIdResolver.dispose();
     }
 
-    /**
-     * @see HierarchyManager#getRootEntry()
-     */
+    @Override
     public NodeEntry getRootEntry() {
         return rootEntry;
     }
 
-    /**
-     * @see HierarchyManager#lookup(ItemId)
-     */
+    @Override
     public HierarchyEntry lookup(ItemId workspaceItemId) {
         String uniqueID = workspaceItemId.getUniqueID();
         if (uniqueID == null) {
@@ -94,25 +87,19 @@ public class HierarchyManagerImpl implem
         }
     }
 
-    /**
-     * @see HierarchyManager#lookup(Path)
-     */
+    @Override
     public HierarchyEntry lookup(Path workspacePath) {
         return rootEntry.lookupDeepEntry(workspacePath);
     }
 
-    /**
-     * @see HierarchyManager#getNodeEntry(NodeId)
-     */
-    public NodeEntry getNodeEntry(NodeId nodeId)
-            throws ItemNotFoundException, RepositoryException {
+    @Override
+    public NodeEntry getNodeEntry(NodeId nodeId) throws RepositoryException {
         String uniqueID = nodeId.getUniqueID();
         if (uniqueID == null) {
             return getNodeEntry(nodeId.getPath());
         } else {
             if (nodeId.getPath() == null) {
-                NodeEntry nEntry = uniqueIdResolver.resolve(nodeId, rootEntry);
-                return nEntry;
+                return uniqueIdResolver.resolve(nodeId, rootEntry);
             } else {
                 NodeEntry nEntry = uniqueIdResolver.resolve(idFactory.createNodeId(uniqueID), rootEntry);
                 return nEntry.getDeepNodeEntry(nodeId.getPath());
@@ -120,10 +107,8 @@ public class HierarchyManagerImpl implem
         }
     }
 
-    /**
-     * @see HierarchyManager#getNodeEntry(Path)
-     */
-    public NodeEntry getNodeEntry(Path qPath) throws PathNotFoundException, RepositoryException {
+    @Override
+    public NodeEntry getNodeEntry(Path qPath) throws RepositoryException {
         NodeEntry rootEntry = getRootEntry();
         // shortcut
         if (qPath.denotesRoot()) {
@@ -137,11 +122,8 @@ public class HierarchyManagerImpl implem
         return rootEntry.getDeepNodeEntry(qPath);
     }
 
-    /**
-     * @see HierarchyManager#getPropertyEntry(PropertyId)
-     */
-    public PropertyEntry getPropertyEntry(PropertyId propertyId)
-            throws ItemNotFoundException, RepositoryException {
+    @Override
+    public PropertyEntry getPropertyEntry(PropertyId propertyId) throws RepositoryException {
         String uniqueID = propertyId.getUniqueID();
         if (uniqueID == null) {
             return getPropertyEntry(propertyId.getPath());
@@ -156,11 +138,8 @@ public class HierarchyManagerImpl implem
         }
     }
 
-    /**
-     * @see HierarchyManager#getPropertyEntry(Path)
-     */
-    public PropertyEntry getPropertyEntry(Path qPath)
-            throws PathNotFoundException, RepositoryException {
+    @Override
+    public PropertyEntry getPropertyEntry(Path qPath) throws RepositoryException {
         // shortcut
         if (qPath.denotesRoot()) {
             throw new PathNotFoundException("The root path never points to a Property.");
@@ -173,10 +152,8 @@ public class HierarchyManagerImpl implem
         return getRootEntry().getDeepPropertyEntry(qPath);
     }
 
-    /**
-     * @see HierarchyManager#getNodeState(Path)
-     */
-    public NodeState getNodeState(Path qPath) throws PathNotFoundException, RepositoryException {
+    @Override
+    public NodeState getNodeState(Path qPath) throws RepositoryException {
         NodeEntry entry = getNodeEntry(qPath);
         try {
             NodeState state = entry.getNodeState();
@@ -190,10 +167,8 @@ public class HierarchyManagerImpl implem
         }
     }
 
-    /**
-     * @see HierarchyManager#getPropertyState(Path)
-     */
-    public PropertyState getPropertyState(Path qPath) throws PathNotFoundException, RepositoryException {
+    @Override
+    public PropertyState getPropertyState(Path qPath) throws RepositoryException {
         PropertyEntry entry = getPropertyEntry(qPath);
         try {
             PropertyState state = entry.getPropertyState();
@@ -207,10 +182,8 @@ public class HierarchyManagerImpl implem
         }
     }
 
-    /**
-     * @see HierarchyManager#getDepth(HierarchyEntry)
-     */
-    public int getDepth(HierarchyEntry hierarchyEntry) throws ItemNotFoundException, RepositoryException {
+    @Override
+    public int getDepth(HierarchyEntry hierarchyEntry) throws RepositoryException {
         int depth = Path.ROOT_DEPTH;
         NodeEntry parentEntry = hierarchyEntry.getParent();
         while (parentEntry != null) {
@@ -221,11 +194,8 @@ public class HierarchyManagerImpl implem
         return depth;
     }
 
-    /**
-     * @see HierarchyManager#getRelativeDepth(NodeEntry, HierarchyEntry)
-     */
-    public int getRelativeDepth(NodeEntry ancestor, HierarchyEntry descendant)
-            throws ItemNotFoundException, RepositoryException {
+    @Override
+    public int getRelativeDepth(NodeEntry ancestor, HierarchyEntry descendant) throws RepositoryException {
         if (ancestor.equals(descendant)) {
             return 0;
         }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java?rev=1164026&r1=1164025&r2=1164026&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java Thu Sep  1 11:52:08 2011
@@ -43,7 +43,7 @@ public interface NodeEntry extends Hiera
     /**
      * @return the <code>NodeId</code> of this child node entry.
      */
-    public NodeId getId() throws InvalidItemStateException, RepositoryException;
+    NodeId getId() throws InvalidItemStateException, RepositoryException;
 
     /**
      * Returns the ID that must be used for resolving this entry OR loading its
@@ -54,20 +54,20 @@ public interface NodeEntry extends Hiera
      * @return
      * @see #getId()
      */
-    public NodeId getWorkspaceId() throws InvalidItemStateException, RepositoryException;
+    NodeId getWorkspaceId() throws InvalidItemStateException, RepositoryException;
 
     /**
      * @return the unique ID of the node state which is referenced by this
      * child node entry or <code>null</code> if the node state cannot be
      * identified with a unique ID.
      */
-    public String getUniqueID();
+    String getUniqueID();
 
     /**
      *
      * @param uniqueID
      */
-    public void setUniqueID(String uniqueID);
+    void setUniqueID(String uniqueID);
 
     /**
      * @return the index of this child node entry to suppport same-name siblings.
@@ -76,7 +76,7 @@ public interface NodeEntry extends Hiera
      * @throws InvalidItemStateException
      * @throws RepositoryException
      */
-    public int getIndex() throws InvalidItemStateException, RepositoryException;
+    int getIndex() throws InvalidItemStateException, RepositoryException;
 
     /**
      * @return the referenced <code>NodeState</code>.
@@ -85,7 +85,7 @@ public interface NodeEntry extends Hiera
      * @throws RepositoryException If an error occurs while retrieving the
      * <code>NodeState</code>.
      */
-    public NodeState getNodeState() throws ItemNotFoundException, RepositoryException;
+    NodeState getNodeState() throws ItemNotFoundException, RepositoryException;
 
     /**
      * Traverse the tree below this entry and return the child entry matching
@@ -98,7 +98,7 @@ public interface NodeEntry extends Hiera
      * @throws PathNotFoundException
      * @throws RepositoryException
      */
-    public NodeEntry getDeepNodeEntry(Path path) throws PathNotFoundException, RepositoryException;
+    NodeEntry getDeepNodeEntry(Path path) throws PathNotFoundException, RepositoryException;
 
     /**
      * Traverse the tree below this entry and return the child entry matching
@@ -112,7 +112,7 @@ public interface NodeEntry extends Hiera
      * @throws PathNotFoundException
      * @throws RepositoryException
      */
-    public PropertyEntry getDeepPropertyEntry(Path path) throws PathNotFoundException, RepositoryException;
+    PropertyEntry getDeepPropertyEntry(Path path) throws PathNotFoundException, RepositoryException;
 
     /**
      * Traverse the tree below this entry and return the child entry matching
@@ -123,7 +123,7 @@ public interface NodeEntry extends Hiera
      * @param workspacePath
      * @return matching entry or <code>null</code>.
      */
-    public HierarchyEntry lookupDeepEntry(Path workspacePath);
+    HierarchyEntry lookupDeepEntry(Path workspacePath);
 
     /**
      * Determines if there is a valid <code>NodeEntry</code> with the
@@ -133,7 +133,7 @@ public interface NodeEntry extends Hiera
      * @return <code>true</code> if there is a <code>NodeEntry</code> with
      * the specified <code>nodeName</code>.
      */
-    public boolean hasNodeEntry(Name nodeName);
+    boolean hasNodeEntry(Name nodeName);
 
     /**
      * Determines if there is a valid <code>NodeEntry</code> with the
@@ -144,7 +144,7 @@ public interface NodeEntry extends Hiera
      * @return <code>true</code> if there is a <code>NodeEntry</code> with
      * the specified <code>name</code> and <code>index</code>.
      */
-    public boolean hasNodeEntry(Name nodeName, int index);
+    boolean hasNodeEntry(Name nodeName, int index);
 
     /**
      * Returns the valid <code>NodeEntry</code> with the specified name
@@ -156,7 +156,7 @@ public interface NodeEntry extends Hiera
      * or <code>null</code> if there's no matching entry.
      * @throws RepositoryException If an unexpected error occurs.
      */
-    public NodeEntry getNodeEntry(Name nodeName, int index) throws RepositoryException;
+    NodeEntry getNodeEntry(Name nodeName, int index) throws RepositoryException;
 
     /**
      * Returns the valid <code>NodeEntry</code> with the specified name
@@ -172,7 +172,7 @@ public interface NodeEntry extends Hiera
      * or <code>null</code> if there's no matching entry.
      * @throws RepositoryException If an unexpected error occurs.
      */
-    public NodeEntry getNodeEntry(Name nodeName, int index, boolean loadIfNotFound) throws RepositoryException;
+    NodeEntry getNodeEntry(Name nodeName, int index, boolean loadIfNotFound) throws RepositoryException;
 
     /**
      * Returns a unmodifiable iterator of <code>NodeEntry</code> objects
@@ -181,7 +181,7 @@ public interface NodeEntry extends Hiera
      * @return iterator of <code>NodeEntry</code> objects
      * @throws RepositoryException If an unexpected error occurs.
      */
-    public Iterator<NodeEntry> getNodeEntries() throws RepositoryException;
+    Iterator<NodeEntry> getNodeEntries() throws RepositoryException;
 
     /**
      * Returns a unmodifiable List of <code>NodeEntry</code>s with the
@@ -191,7 +191,7 @@ public interface NodeEntry extends Hiera
      * @return list of <code>NodeEntry</code> objects
      * @throws RepositoryException If an unexpected error occurs.
      */
-    public List<NodeEntry> getNodeEntries(Name nodeName) throws RepositoryException;
+    List<NodeEntry> getNodeEntries(Name nodeName) throws RepositoryException;
 
     /**
      * Creates or updates the <code>ChildNodeEntries</code> of this node.
@@ -199,7 +199,7 @@ public interface NodeEntry extends Hiera
      * @param childInfos
      * @throws RepositoryException
      */
-    public void setNodeEntries(Iterator<ChildInfo> childInfos) throws RepositoryException;
+    void setNodeEntries(Iterator<ChildInfo> childInfos) throws RepositoryException;
 
     /**
      * Adds a child NodeEntry to this entry if it not yet present with this
@@ -211,7 +211,7 @@ public interface NodeEntry extends Hiera
      * @return the <code>NodeEntry</code>.
      * @throws RepositoryException If an unexpected error occurs.
      */
-    public NodeEntry getOrAddNodeEntry(Name nodeName, int index, String uniqueID) throws RepositoryException;
+    NodeEntry getOrAddNodeEntry(Name nodeName, int index, String uniqueID) throws RepositoryException;
 
     /**
      * Adds a new, transient child <code>NodeEntry</code>
@@ -223,7 +223,7 @@ public interface NodeEntry extends Hiera
      * @return
      * @throws RepositoryException If an error occurs.
      */
-    public NodeEntry addNewNodeEntry(Name nodeName, String uniqueID, Name primaryNodeType, QNodeDefinition definition) throws RepositoryException;
+    NodeEntry addNewNodeEntry(Name nodeName, String uniqueID, Name primaryNodeType, QNodeDefinition definition) throws RepositoryException;
 
     /**
      * Determines if there is a property entry with the specified <code>Name</code>.
@@ -232,7 +232,7 @@ public interface NodeEntry extends Hiera
      * @return <code>true</code> if there is a property entry with the specified
      * <code>Name</code>.
      */
-    public boolean hasPropertyEntry(Name propName);
+    boolean hasPropertyEntry(Name propName);
 
     /**
      * Returns the valid <code>PropertyEntry</code> with the specified name
@@ -243,7 +243,7 @@ public interface NodeEntry extends Hiera
      * <code>null</code> if no matching entry exists.
      * @throws RepositoryException If an unexpected error occurs.
      */
-    public PropertyEntry getPropertyEntry(Name propName) throws RepositoryException;
+    PropertyEntry getPropertyEntry(Name propName) throws RepositoryException;
 
     /**
      * Returns the valid <code>PropertyEntry</code> with the specified name
@@ -258,7 +258,7 @@ public interface NodeEntry extends Hiera
      * <code>null</code> if no matching entry exists.
      * @throws RepositoryException If an unexpected error occurs.
      */
-    public PropertyEntry getPropertyEntry(Name propName,  boolean loadIfNotFound) throws RepositoryException;
+    PropertyEntry getPropertyEntry(Name propName, boolean loadIfNotFound) throws RepositoryException;
 
     /**
      * Returns an unmodifiable Iterator over those children that represent valid
@@ -267,7 +267,7 @@ public interface NodeEntry extends Hiera
      * @return an unmodifiable Iterator over those children that represent valid
      * PropertyEntries.
      */
-    public Iterator<PropertyEntry> getPropertyEntries();
+    Iterator<PropertyEntry> getPropertyEntries();
 
     /**
      * Add an existing <code>PropertyEntry</code> with the given name if it is
@@ -280,7 +280,7 @@ public interface NodeEntry extends Hiera
      * @throws ItemExistsException if a child item exists with the given name
      * @throws RepositoryException if an unexpected error occurs.
      */
-    public PropertyEntry getOrAddPropertyEntry(Name propName) throws ItemExistsException, RepositoryException;
+    PropertyEntry getOrAddPropertyEntry(Name propName) throws ItemExistsException, RepositoryException;
 
     /**
      * Adds property entries for the given <code>Name</code>s. It depends on
@@ -292,7 +292,7 @@ public interface NodeEntry extends Hiera
      * @throws ItemExistsException
      * @throws RepositoryException if an unexpected error occurs.
      */
-    public void setPropertyEntries(Collection<Name> propNames) throws ItemExistsException, RepositoryException;
+    void setPropertyEntries(Collection<Name> propNames) throws ItemExistsException, RepositoryException;
 
     /**
      * Add a new, transient <code>PropertyEntry</code> to this <code>NodeEntry</code>
@@ -306,7 +306,8 @@ public interface NodeEntry extends Hiera
      * @throws ItemExistsException
      * @throws RepositoryException
      */
-    public PropertyEntry addNewPropertyEntry(Name propName, QPropertyDefinition definition, QValue[] values, int propertyType) throws ItemExistsException, RepositoryException;
+    PropertyEntry addNewPropertyEntry(Name propName, QPropertyDefinition definition, QValue[] values, int propertyType)
+            throws ItemExistsException, RepositoryException;
 
     /**
      * Reorders this NodeEntry before the sibling entry specified by the given
@@ -316,7 +317,7 @@ public interface NodeEntry extends Hiera
      * <code>null</code> this entry is moved to the end of its parents child node entries.
      * @throws RepositoryException If an unexpected error occurs.
      */
-    public void orderBefore(NodeEntry beforeEntry) throws RepositoryException;
+    void orderBefore(NodeEntry beforeEntry) throws RepositoryException;
 
     /**
      * Moves this <code>NodeEntry</code> as new child entry of the
@@ -332,12 +333,12 @@ public interface NodeEntry extends Hiera
      * @throws RepositoryException If the entry to be moved is not a child of this
      * NodeEntry or if an unexpected error occurs.
      */
-    public NodeEntry move(Name newName, NodeEntry newParent, boolean transientMove) throws RepositoryException;
+    NodeEntry move(Name newName, NodeEntry newParent, boolean transientMove) throws RepositoryException;
 
     /**
      * @return true if this <code>NodeEntry</code> is transiently moved.
      */
-    public boolean isTransientlyMoved();
+    boolean isTransientlyMoved();
 
     /**
      * The parent entry of a external event gets informed about the modification.
@@ -346,5 +347,5 @@ public interface NodeEntry extends Hiera
      *
      * @param childEvent
      */
-    public void refresh(Event childEvent) ;
+    void refresh(Event childEvent) ;
 }



Mime
View raw message