jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r448894 - in /jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav: NamespaceResolverImpl.java RepositoryServiceImpl.java
Date Fri, 22 Sep 2006 11:38:09 GMT
Author: angela
Date: Fri Sep 22 04:38:08 2006
New Revision: 448894

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

- mark known issues (TODO)
- batch-methods initialised too early
- node type registration not supported

Modified:
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/NamespaceResolverImpl.java
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java

Modified: jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/NamespaceResolverImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/NamespaceResolverImpl.java?view=diff&rev=448894&r1=448893&r2=448894
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/NamespaceResolverImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/NamespaceResolverImpl.java
Fri Sep 22 04:38:08 2006
@@ -27,9 +27,11 @@
 /**
  * <code>NamespaceResolverImpl</code>...
  */
-public class NamespaceResolverImpl extends AbstractNamespaceResolver {
+class NamespaceResolverImpl extends AbstractNamespaceResolver {
 
     private static Logger log = LoggerFactory.getLogger(NamespaceResolverImpl.class);
+
+    // TODO: TO_BE_FIXED. missing notification and subsequent reloading of namespaces causes
this resolver to throw NameException
 
     private Properties prefixToURI = new Properties();
     private Properties uriToPrefix = new Properties();

Modified: jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java?view=diff&rev=448894&r1=448893&r2=448894
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Fri Sep 22 04:38:08 2006
@@ -741,6 +741,8 @@
                 Iterator it = batchImpl.methods();
                 while (it.hasNext()) {
                     DavMethod method = (DavMethod) it.next();
+                    initMethod(method, batchImpl.sessionInfo, true);
+
                     client.executeMethod(method);
                     if (!(success = method.succeeded())) {
                         throw method.getResponseException();
@@ -1463,24 +1465,27 @@
     }
 
     /**
+     * @throws UnsupportedRepositoryOperationException
      * @see RepositoryService#registerNodeTypes(SessionInfo, QNodeTypeDefinition[])
      */
     public void registerNodeTypes(SessionInfo sessionInfo, QNodeTypeDefinition[] nodetypeDefs)
throws NoSuchNodeTypeException, UnsupportedRepositoryOperationException, RepositoryException
{
-        // TODO: missing implementation
+        throw new UnsupportedRepositoryOperationException("JSR170 does not defined methods
to register nodetypes.");
     }
 
     /**
+     * @throws UnsupportedRepositoryOperationException
      * @see RepositoryService#reregisterNodeTypes(SessionInfo, QNodeTypeDefinition[])
      */
     public void reregisterNodeTypes(SessionInfo sessionInfo, QNodeTypeDefinition[] nodetypeDefs)
throws NoSuchNodeTypeException, UnsupportedRepositoryOperationException, RepositoryException
{
-        // TODO: missing implementation
+        throw new UnsupportedRepositoryOperationException("JSR170 does not defined methods
to reregister nodetypes.");
     }
 
     /**
+     * @throws UnsupportedRepositoryOperationException
      * @see RepositoryService#unregisterNodeTypes(SessionInfo, QName[])
      */
     public void unregisterNodeTypes(SessionInfo sessionInfo, QName[] nodetypeNames) throws
NoSuchNodeTypeException, UnsupportedRepositoryOperationException, RepositoryException {
-        // TODO: missing implementation
+        throw new UnsupportedRepositoryOperationException("JSR170 does not defined methods
to unregister nodetypes.");
     }
 
     //------------------------------------------------< Inner Class 'Batch' >---
@@ -1580,7 +1585,7 @@
             try {
                 String uri = getItemUri(parentId, nodeName, sessionInfo);
                 MkColMethod method = new MkColMethod(uri);
-                initMethod(method, sessionInfo, true);
+
                 // build 'sys-view' for the node to create and append it as request body
                 if (nodetypeName != null || uuid != null) {
                     Document body = DomUtil.BUILDER_FACTORY.newDocumentBuilder().newDocument();
@@ -1677,7 +1682,6 @@
             try {
                 String uri = getItemUri(parentId, propertyName, sessionInfo);
                 PutMethod method = new PutMethod(uri);
-                initMethod(method, sessionInfo, true);
                 method.setRequestBody(vp);
 
                 methods.add(method);
@@ -1791,7 +1795,6 @@
             try {
                 String uri = getItemUri(propertyId, sessionInfo);
                 PropPatchMethod method = new PropPatchMethod(uri, setProperties, new DavPropertyNameSet());
-                initMethod(method, sessionInfo, true);
 
                 methods.add(method);
             } catch (IOException e) {
@@ -1806,7 +1809,6 @@
             checkConsumed();
             String uri = getItemUri(itemId, sessionInfo);
             DeleteMethod method = new DeleteMethod(uri);
-            initMethod(method, sessionInfo, true);
 
             methods.add(method);
         }
@@ -1823,7 +1825,6 @@
 
                 String uri = getItemUri(parentId, sessionInfo);
                 OrderPatchMethod method = new OrderPatchMethod(uri, srcSegment, targetSegment,
true);
-                initMethod(method, sessionInfo, true);
 
                 methods.add(method);
             } catch (IOException e) {
@@ -1855,7 +1856,6 @@
 
                 String uri = getItemUri(nodeId, sessionInfo);
                 PropPatchMethod method = new PropPatchMethod(uri, setProperties, removeProperties);
-                initMethod(method, sessionInfo, true);
 
                 methods.add(method);
             } catch (IOException e) {
@@ -1874,7 +1874,6 @@
             String uri = getItemUri(srcNodeId, sessionInfo);
             String destUri = getItemUri(destParentNodeId, destName, sessionInfo);
             MoveMethod method = new MoveMethod(uri, destUri, true);
-            initMethod(method, sessionInfo, true);
 
             methods.add(method);
         }



Mime
View raw message