jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r651627 - in /jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav: NodeInfoImpl.java PropertyInfoImpl.java RepositoryServiceImpl.java
Date Fri, 25 Apr 2008 15:17:10 GMT
Author: angela
Date: Fri Apr 25 08:17:09 2008
New Revision: 651627

URL: http://svn.apache.org/viewvc?rev=651627&view=rev
Log:
JCR-1550: Remove ItemInfo.getName() since it is redundant

Modified:
    jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/NodeInfoImpl.java
    jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/PropertyInfoImpl.java
    jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java

Modified: jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/NodeInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/NodeInfoImpl.java?rev=651627&r1=651626&r2=651627&view=diff
==============================================================================
--- jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/NodeInfoImpl.java
(original)
+++ jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/NodeInfoImpl.java
Fri Apr 25 08:17:09 2008
@@ -21,7 +21,6 @@
 import org.apache.jackrabbit.webdav.property.DavPropertySet;
 import org.apache.jackrabbit.webdav.property.DavProperty;
 import org.apache.jackrabbit.spi.commons.conversion.NameException;
-import org.apache.jackrabbit.spi.commons.name.NameConstants;
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
 import org.apache.jackrabbit.spi.NodeInfo;
 import org.apache.jackrabbit.spi.NodeId;
@@ -45,7 +44,6 @@
     private static Logger log = LoggerFactory.getLogger(NodeInfoImpl.class);
 
     private final NodeId id;
-    private final Name qName;
     private final int index;
 
     private final Name primaryNodeTypeName;
@@ -61,28 +59,6 @@
         // set id
         this.id = id;
 
-        // retrieve name
-        if (id.getPath() == null) {
-            DavProperty nameProp = propSet.get(ItemResourceConstants.JCR_NAME);
-            if (nameProp != null && nameProp.getValue() != null) {
-                // not root node
-                // jcrName is transported from jackrabbit-webdav -> convert
-                // note, that unescaping is not required.
-                String jcrName = nameProp.getValue().toString();
-                try {
-                    qName = resolver.getQName(jcrName);
-                } catch (NameException e) {
-                    throw new RepositoryException("Unable to build ItemInfo object, invalid
name found: " + jcrName);
-                }
-            } else {
-                // root
-                qName = NameConstants.ROOT;
-            }
-        } else {
-            Path.Element el = id.getPath().getNameElement();
-            qName = (el.denotesRoot()) ? NameConstants.ROOT : el.getName();
-        }
-
         DavProperty indexProp = propSet.get(ItemResourceConstants.JCR_INDEX);
         if (indexProp != null && indexProp.getValue() != null) {
             index = Integer.parseInt(indexProp.getValue().toString());
@@ -124,10 +100,6 @@
     //-----------------------------------------------------------< ItemInfo >---
     public boolean denotesNode() {
         return true;
-    }
-
-    public Name getName() {
-        return qName;
     }
 
     //-----------------------------------------------------------< NodeInfo >---

Modified: jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/PropertyInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/PropertyInfoImpl.java?rev=651627&r1=651626&r2=651627&view=diff
==============================================================================
--- jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/PropertyInfoImpl.java
(original)
+++ jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/PropertyInfoImpl.java
Fri Apr 25 08:17:09 2008
@@ -99,10 +99,6 @@
         return false;
     }
 
-    public Name getName() {
-        return id.getName();
-    }
-
     //-------------------------------------------------------< PropertyInfo >---
     public PropertyId getId() {
         return id;

Modified: jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java?rev=651627&r1=651626&r2=651627&view=diff
==============================================================================
--- jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Fri Apr 25 08:17:09 2008
@@ -750,7 +750,6 @@
     public NodeInfo getNodeInfo(SessionInfo sessionInfo, NodeId nodeId) throws ItemNotFoundException,
RepositoryException {
         // set of properties to be retrieved
         DavPropertyNameSet nameSet = new DavPropertyNameSet();
-        nameSet.add(ItemResourceConstants.JCR_NAME);
         nameSet.add(ItemResourceConstants.JCR_INDEX);
         nameSet.add(ItemResourceConstants.JCR_PARENT);
         nameSet.add(ItemResourceConstants.JCR_PRIMARYNODETYPE);
@@ -920,7 +919,6 @@
     public PropertyInfo getPropertyInfo(SessionInfo sessionInfo, PropertyId propertyId) throws
ItemNotFoundException, RepositoryException {
         // set of Dav-properties to be retrieved
         DavPropertyNameSet nameSet = new DavPropertyNameSet();
-        nameSet.add(ItemResourceConstants.JCR_NAME);
         nameSet.add(ItemResourceConstants.JCR_PARENT);
         nameSet.add(ItemResourceConstants.JCR_TYPE);
         nameSet.add(ItemResourceConstants.JCR_VALUE);



Mime
View raw message