jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r429348 - in /jackrabbit/trunk/contrib/spi: ./ jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/ jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ jcr2spi/src/main/jav...
Date Mon, 07 Aug 2006 14:11:14 GMT
Author: angela
Date: Mon Aug  7 07:11:13 2006
New Revision: 429348

URL: http://svn.apache.org/viewvc?rev=429348&view=rev
Log:
work in progress

- symmetric NodeState.getParent/setParent calls
- retrieve property name from PropertyState

Modified:
    jackrabbit/trunk/contrib/spi/jcr-spi.ipr
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/CachingHierarchyManager.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/HierarchyManagerImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ZombieHierarchyManager.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockManagerImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Remove.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemStateValidator.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManagerImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/ImporterImpl.java

Modified: jackrabbit/trunk/contrib/spi/jcr-spi.ipr
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr-spi.ipr?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr-spi.ipr (original)
+++ jackrabbit/trunk/contrib/spi/jcr-spi.ipr Mon Aug  7 07:11:13 2006
@@ -47,7 +47,6 @@
     <option name="DEPRECATION" value="true" />
     <option name="ADDITIONAL_OPTIONS_STRING" value="" />
     <option name="MAXIMUM_HEAP_SIZE" value="128" />
-    <option name="USE_GENERICS_COMPILER" value="false" />
   </component>
   <component name="JavadocGenerationManager">
     <option name="OUTPUT_DIRECTORY" />
@@ -179,13 +178,19 @@
   </component>
   <component name="ProjectModuleManager">
     <modules>
+      <module fileurl="file://D:/dev/jackrabbit_2006_06_27/jackrabbit/jackrabbit-core.iml"
filepath="D:/dev/jackrabbit_2006_06_27/jackrabbit/jackrabbit-core.iml" />
+      <module fileurl="file://D:/dev/jackrabbit_2006_06_27/jcr-server/client/jackrabbit-jcr-client.iml"
filepath="D:/dev/jackrabbit_2006_06_27/jcr-server/client/jackrabbit-jcr-client.iml" />
+      <module fileurl="file://D:/dev/jackrabbit_2006_06_27/jcr-server/server/jackrabbit-jcr-server.iml"
filepath="D:/dev/jackrabbit_2006_06_27/jcr-server/server/jackrabbit-jcr-server.iml" />
+      <module fileurl="file://D:/dev/jackrabbit_2006_06_27/jcr-server/webdav/jackrabbit-jcr-webdav.iml"
filepath="D:/dev/jackrabbit_2006_06_27/jcr-server/webdav/jackrabbit-jcr-webdav.iml" />
+      <module fileurl="file://D:/dev/jackrabbit_2006_06_27/jcr-server/webapp/jackrabbit-server.iml"
filepath="D:/dev/jackrabbit_2006_06_27/jcr-server/webapp/jackrabbit-server.iml" />
       <module fileurl="file://$PROJECT_DIR$/spi/jackrabbit-spi.iml" filepath="$PROJECT_DIR$/spi/jackrabbit-spi.iml"
/>
       <module fileurl="file://$PROJECT_DIR$/commons/jackrabbit-spi-commons.iml" filepath="$PROJECT_DIR$/commons/jackrabbit-spi-commons.iml"
/>
       <module fileurl="file://$PROJECT_DIR$/jcr2spi/jackrabbit-spi-jcr2spi.iml" filepath="$PROJECT_DIR$/jcr2spi/jackrabbit-spi-jcr2spi.iml"
/>
       <module fileurl="file://$PROJECT_DIR$/spi2dav/jackrabbit-spi-spi2dav.iml" filepath="$PROJECT_DIR$/spi2dav/jackrabbit-spi-spi2dav.iml"
/>
+      <module fileurl="file://$PROJECT_DIR$/test/test.iml" filepath="$PROJECT_DIR$/test/test.iml"
/>
     </modules>
   </component>
-  <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="false"
project-jdk-name="java version &quot;1.4.2&quot;" />
+  <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="false"
project-jdk-name="java version &quot;1.4.2_04&quot;" />
   <component name="RmicSettings">
     <option name="IS_EANABLED" value="false" />
     <option name="DEBUGGING_INFO" value="true" />
@@ -199,5 +204,6 @@
     <option name="INSTRUMENT_CLASSES" value="true" />
     <option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="true" />
   </component>
+  <UsedPathMacros />
 </project>
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/CachingHierarchyManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/CachingHierarchyManager.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/CachingHierarchyManager.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/CachingHierarchyManager.java
Mon Aug  7 07:11:13 2006
@@ -166,8 +166,9 @@
         if (state.isNode()) {
             try {
                 cache((NodeState) state, builder.getPath());
-            } catch (org.apache.jackrabbit.name.MalformedPathException e) {
-                e.printStackTrace();
+            } catch (MalformedPathException e) {
+                // should not occur
+                throw new RepositoryException(e);
             }
         }
     }

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/HierarchyManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/HierarchyManagerImpl.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/HierarchyManagerImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/HierarchyManagerImpl.java
Mon Aug  7 07:11:13 2006
@@ -112,7 +112,7 @@
      * @see ZombieHierarchyManager#getParentId(ItemState)
      */
     protected NodeId getParentId(ItemState state) {
-        return state.getParentState().getNodeId();
+        return state.getParent().getNodeId();
     }
 
     /**
@@ -244,7 +244,7 @@
             return;
         }
 
-        NodeState parentState = state.getParentState();
+        NodeState parentState = state.getParent();
         if (parentState == null) {
             String msg = "failed to build path of " + state.getId()
                     + ": orphaned item";
@@ -274,7 +274,7 @@
             }
         } else {
             PropertyState propState = (PropertyState) state;
-            QName name = propState.getName();
+            QName name = propState.getQName();
             // add to path
             builder.addLast(name);
         }

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
Mon Aug  7 07:11:13 2006
@@ -158,11 +158,11 @@
      */
     public int getDepth() throws RepositoryException {
         checkStatus();
-        if (state.getParentState() == null) {
+        if (state.getParent() == null) {
             // shortcut
             return Path.ROOT_DEPTH;
         }
-        return session.getHierarchyManager().getDepth(state.getParentState().getId());
+        return session.getHierarchyManager().getDepth(state.getParent().getId());
     }
 
     /**

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java
Mon Aug  7 07:11:13 2006
@@ -102,7 +102,7 @@
 
     private NodeDefinition getDefinition(NodeState state)
             throws RepositoryException {
-        NodeState parentState = state.getParentState();
+        NodeState parentState = state.getParent();
         NodeDefinition def = session.getItemDefinitionManager().getNodeDefinition(state,
parentState);
         return def;
     }
@@ -110,7 +110,7 @@
     private PropertyDefinition getDefinition(PropertyState state)
         throws RepositoryException {
         // fallback: try finding applicable definition
-        NodeState parentState = state.getParentState();
+        NodeState parentState = state.getParent();
         PropertyDefinition def = session.getItemDefinitionManager().getPropertyDefinition(state,
parentState);
         return def;
     }
@@ -355,16 +355,14 @@
         // check sanity of session
         session.checkIsAlive();
 
-        // check privileges
-        if (!session.getAccessManager().canRead(id)) {
-            // clear cache
-            evictItem(id);
-            throw new AccessDeniedException("cannot read item " + id);
-        }
-
         // check cache
         ItemImpl item = retrieveItem(id);
         if (item == null) {
+            // not yet in cache, need to create instance:
+            // check privileges
+            if (!session.getAccessManager().canRead(id)) {
+                throw new AccessDeniedException("cannot read item " + id);
+            }
             // create instance of item
             item = createItemInstance(id);
         }

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
Mon Aug  7 07:11:13 2006
@@ -127,12 +127,12 @@
      */
     public String getName() throws RepositoryException {
         checkStatus();
-        QName name = session.getHierarchyManager().getQName(getId());
+        QName qName = getQName();
         try {
-            return NameFormat.format(name, session.getNamespaceResolver());
+            return NameFormat.format(getQName(), session.getNamespaceResolver());
         } catch (NoPrefixDeclaredException npde) {
             // should never get here...
-            String msg = "internal error: encountered unregistered namespace " + name.getNamespaceURI();
+            String msg = "internal error: encountered unregistered namespace " + qName.getNamespaceURI();
             log.debug(msg);
             throw new RepositoryException(msg, npde);
         }
@@ -144,7 +144,7 @@
     public Node getParent() throws ItemNotFoundException, AccessDeniedException, RepositoryException
{
         checkStatus();
         // check if root node
-        NodeState parentState = getItemState().getParentState();
+        NodeState parentState = getItemState().getParent();
         if (parentState == null) {
             String msg = "root node doesn't have a parent";
             log.debug(msg);
@@ -537,7 +537,7 @@
      */
     public int getIndex() throws RepositoryException {
         checkStatus();
-        NodeState parentState = getItemState().getParentState();
+        NodeState parentState = getItemState().getParent();
         if (parentState == null) {
             // the root node cannot have same-name siblings; always return the
             // default index

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java
Mon Aug  7 07:11:13 2006
@@ -22,7 +22,6 @@
 import org.apache.jackrabbit.name.NoPrefixDeclaredException;
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.NameFormat;
-import org.apache.jackrabbit.spi.PropertyId;
 import org.apache.jackrabbit.value.QValue;
 import org.apache.jackrabbit.value.ValueFormat;
 import org.apache.jackrabbit.value.ValueHelper;
@@ -71,8 +70,7 @@
      */
     public String getName() throws RepositoryException {
         checkStatus();
-        PropertyId propId = getPropertyId();
-        QName name = propId.getQName();
+        QName name = getQName();
         try {
             return NameFormat.format(name, session.getNamespaceResolver());
         } catch (NoPrefixDeclaredException npde) {
@@ -88,7 +86,7 @@
      */
     public Node getParent() throws ItemNotFoundException, AccessDeniedException, RepositoryException
{
         checkStatus();
-        return (Node) itemMgr.getItem(getItemState().getParentState().getId());
+        return (Node) itemMgr.getItem(getItemState().getParent().getId());
     }
 
     /**
@@ -413,15 +411,14 @@
 
     //-----------------------------------------------------------< ItemImpl >---
     /**
-     * Returns the QName defined with this <code>PropertyId</code>
+     * Returns the QName defined with this <code>PropertyState</code>
      *
      * @return
-     * @see PropertyId#getQName()
+     * @see PropertyState#getQName()
      * @see ItemImpl#getQName()
      */
     QName getQName() {
-        PropertyId propId = (PropertyId)getId();
-        return propId.getQName();
+        return getPropertyState().getQName();
     }
 
     //------------------------------------------------------< check methods >---
@@ -557,13 +554,5 @@
      */
     private PropertyState getPropertyState() {
         return (PropertyState) getItemState();
-    }
-
-    /**
-     *
-     * @return
-     */
-    private PropertyId getPropertyId() {
-        return (PropertyId) getId();
     }
 }

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ZombieHierarchyManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ZombieHierarchyManager.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ZombieHierarchyManager.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ZombieHierarchyManager.java
Mon Aug  7 07:11:13 2006
@@ -87,7 +87,7 @@
     protected NodeId getParentId(ItemState state) {
         if (state.hasOverlayedState()) {
             // use 'old' parent in case item has been removed
-            return state.getOverlayedState().getParentState().getNodeId();
+            return state.getOverlayedState().getParent().getNodeId();
         }
         // delegate to base class
         return super.getParentId(state);

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockManagerImpl.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockManagerImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockManagerImpl.java
Mon Aug  7 07:11:13 2006
@@ -299,7 +299,7 @@
              * this would have a negative impact on performance though...
              */
             while (!nodeState.hasPropertyName(QName.JCR_LOCKOWNER)) {
-                NodeState parentState = nodeState.getParentState();
+                NodeState parentState = nodeState.getParent();
                 if (parentState == null) {
                     // reached root state without finding a locked node
                     return null;

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java
Mon Aug  7 07:11:13 2006
@@ -217,7 +217,7 @@
         QPropertyDefinition def = propState.getDefinition();
         if (def == null) {
             try {
-                def = ntReg.getEffectiveNodeType(parentState.getNodeTypeNames()).getApplicablePropertyDefinition(propState.getName(),
propState.getType(), propState.isMultiValued());
+                def = ntReg.getEffectiveNodeType(parentState.getNodeTypeNames()).getApplicablePropertyDefinition(propState.getQName(),
propState.getType(), propState.isMultiValued());
                 propState.setDefinition(def);
             } catch (NodeTypeConflictException e) {
                 String msg = "internal error: failed to build effective node type.";

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Remove.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Remove.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Remove.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Remove.java
Mon Aug  7 07:11:13 2006
@@ -61,7 +61,7 @@
 
     //------------------------------------------------------------< Factory >---
     public static Operation create(ItemState state) {
-        Remove rm = new Remove(state.getId(), state.getParentState().getNodeId());
+        Remove rm = new Remove(state.getId(), state.getParent().getNodeId());
         return rm;
     }
 }

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java
Mon Aug  7 07:11:13 2006
@@ -362,7 +362,7 @@
      *
      * @return the parent <code>NodeState</code>'s Id
      */
-    public abstract NodeState getParentState();
+    public abstract NodeState getParent();
 
     /**
      * Returns the status of this item.

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemStateValidator.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemStateValidator.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemStateValidator.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemStateValidator.java
Mon Aug  7 07:11:13 2006
@@ -419,7 +419,7 @@
         VersionException, LockException, ItemNotFoundException,
         ItemExistsException, PathNotFoundException, RepositoryException {
 
-        checkWriteProperty(propState.getParentState(), propState.getName(), propState.getDefinition(),
options);
+        checkWriteProperty(propState.getParent(), propState.getQName(), propState.getDefinition(),
options);
     }
 
     /**
@@ -587,7 +587,7 @@
         // NOTE: referencial integrity should be asserted for all child-nodes.
 
         ItemId targetId = targetState.getId();
-        NodeState parentState = targetState.getParentState();
+        NodeState parentState = targetState.getParent();
         if (parentState == null) {
             // root or orphaned node
             throw new ConstraintViolationException("Cannot remove root node");
@@ -648,7 +648,7 @@
         if (itemState.getStatus() == ItemState.STATUS_NEW) {
             return;
         }
-        NodeState nodeState = (itemState.isNode()) ? (NodeState)itemState : itemState.getParentState();
+        NodeState nodeState = (itemState.isNode()) ? (NodeState)itemState : itemState.getParent();
         if (!mgrProvider.getVersionManager().isCheckedOut(nodeState.getNodeId())) {
             throw new VersionException(safeGetJCRPath(nodeState.getNodeId()) + " is checked-in");
         }
@@ -669,7 +669,7 @@
         // for properties.
         NodeState nodeState = (itemState.isNode())
             ? ((NodeState)itemState)
-            : itemState.getParentState();
+            : itemState.getParent();
         mgrProvider.getLockManager().checkLock(nodeState.getNodeId());
     }
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java
Mon Aug  7 07:11:13 2006
@@ -184,7 +184,7 @@
     /**
      * {@inheritDoc}
      */
-    public NodeState getParentState() {
+    public NodeState getParent() {
         return parent;
     }
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java
Mon Aug  7 07:11:13 2006
@@ -131,7 +131,7 @@
     /**
      * {@inheritDoc}
      */
-    public NodeState getParentState() {
+    public NodeState getParent() {
         return parent;
     }
 
@@ -140,7 +140,7 @@
      *
      * @return the name of this property.
      */
-    public QName getName() {
+    public QName getQName() {
         return id.getQName();
     }
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java
Mon Aug  7 07:11:13 2006
@@ -847,8 +847,8 @@
                 Set dependentIDs = new HashSet();
                 if (nodeState.hasOverlayedState()) {
                     // TODO: review usage of NodeId
-                    NodeId oldParentId = nodeState.getOverlayedState().getParentState().getNodeId();
-                    NodeId newParentId = nodeState.getParentState().getNodeId();
+                    NodeId oldParentId = nodeState.getOverlayedState().getParent().getNodeId();
+                    NodeId newParentId = nodeState.getParent().getNodeId();
                     if (oldParentId != null) {
                         if (newParentId == null) {
                             // node has been removed, add old parent
@@ -1381,7 +1381,7 @@
         boolean success = false;
         try {
             // assert parent is transient state
-            NodeState parent = create(itemState.getParentState());
+            NodeState parent = create(itemState.getParent());
             if (itemState.isNode()) {
                 removeNodeState(parent, (NodeState)itemState);
             } else {
@@ -1425,7 +1425,7 @@
     private void removePropertyState(NodeState parent, PropertyState target) {
         PropertyState modifiableTarget = create(target);
         // remove property entry
-        parent.removePropertyName(modifiableTarget.getName());
+        parent.removePropertyName(modifiableTarget.getQName());
         // destroy property state
         destroy(modifiableTarget);
     }

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManagerImpl.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManagerImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManagerImpl.java
Mon Aug  7 07:11:13 2006
@@ -74,7 +74,7 @@
              * this would have a negative impact on performance though...
              */
             while (!nodeState.hasPropertyName(QName.JCR_ISCHECKEDOUT)) {
-                NodeState parentState = nodeState.getParentState();
+                NodeState parentState = nodeState.getParent();
                 if (parentState == null) {
                     // reached root state without finding a jcr:isCheckedOut property
                     return true;

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/ImporterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/ImporterImpl.java?rev=429348&r1=429347&r2=429348&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/ImporterImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/ImporterImpl.java
Mon Aug  7 07:11:13 2006
@@ -379,7 +379,7 @@
 
             case ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING:
                 // 'replace' current parent with parent of conflicting
-                parent = conflicting.getParentState();
+                parent = conflicting.getParent();
                 if (parent == null) {
                     msg = "Root node cannot be replaced";
                     log.debug(msg);



Mime
View raw message