jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r497329 - in /jackrabbit/trunk/contrib/spi: jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ spi/src/main/java/org/apache/jackrabbit/spi/ spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/
Date Thu, 18 Jan 2007 07:26:15 GMT
Author: angela
Date: Wed Jan 17 23:26:14 2007
New Revision: 497329

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

findings from meeting
1) remove methods related to nt registration from RepositoryService since that functionality
is not defined by jsr170


Modified:
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java?view=diff&rev=497329&r1=497328&r2=497329
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
Wed Jan 17 23:26:14 2007
@@ -17,8 +17,8 @@
 package org.apache.jackrabbit.jcr2spi;
 
 import org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeRegistryImpl;
-import org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeStorage;
 import org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeRegistry;
+import org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeStorage;
 import org.apache.jackrabbit.jcr2spi.name.NamespaceStorage;
 import org.apache.jackrabbit.jcr2spi.name.NamespaceRegistryImpl;
 import org.apache.jackrabbit.jcr2spi.state.ItemState;
@@ -70,12 +70,12 @@
 import org.apache.jackrabbit.spi.QNodeDefinition;
 import org.apache.jackrabbit.spi.QNodeTypeDefinitionIterator;
 import org.apache.jackrabbit.spi.ItemId;
-import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 import org.apache.jackrabbit.spi.PropertyId;
 import org.apache.jackrabbit.spi.Batch;
 import org.apache.jackrabbit.spi.EventBundle;
 import org.apache.jackrabbit.spi.EventFilter;
 import org.apache.jackrabbit.spi.IdIterator;
+import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 import org.apache.jackrabbit.value.QValue;
 import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
@@ -119,7 +119,7 @@
 /**
  * <code>WorkspaceManager</code>...
  */
-public class WorkspaceManager implements UpdatableItemStateManager, NamespaceStorage, NodeTypeStorage,
AccessManager {
+public class WorkspaceManager implements UpdatableItemStateManager, NamespaceStorage, AccessManager
{
 
     private static Logger log = LoggerFactory.getLogger(WorkspaceManager.class);
 
@@ -352,7 +352,18 @@
         while (it.hasNext()) {
             ntDefs.add(it.nextDefinition());
         }
-        return NodeTypeRegistryImpl.create(ntDefs, this, rootNodeDef, nsRegistry);
+        NodeTypeStorage ntst = new NodeTypeStorage() {
+            public void registerNodeTypes(QNodeTypeDefinition[] nodeTypeDefs) throws NoSuchNodeTypeException,
RepositoryException {
+                throw new UnsupportedOperationException("NodeType registration not yet defined
by the SPI");
+            }
+            public void reregisterNodeTypes(QNodeTypeDefinition[] nodeTypeDefs) throws NoSuchNodeTypeException,
RepositoryException {
+                throw new UnsupportedOperationException("NodeType registration not yet defined
by the SPI");
+            }
+            public void unregisterNodeTypes(QName[] nodeTypeNames) throws NoSuchNodeTypeException,
RepositoryException {
+                throw new UnsupportedOperationException("NodeType registration not yet defined
by the SPI");
+            }
+        };
+        return NodeTypeRegistryImpl.create(ntDefs, ntst, rootNodeDef, nsRegistry);
     }
 
     /**
@@ -611,28 +622,6 @@
      */
     public void unregisterNamespace(String uri) throws NamespaceException, UnsupportedRepositoryOperationException,
AccessDeniedException, RepositoryException {
         service.unregisterNamespace(sessionInfo, uri);
-    }
-
-    //----------------------------------------------------< NodetypeStorage >---
-    /**
-     * @inheritDoc
-     */
-    public void registerNodeTypes(QNodeTypeDefinition[] nodeTypeDefs) throws NoSuchNodeTypeException,
UnsupportedRepositoryOperationException, RepositoryException {
-        service.registerNodeTypes(sessionInfo, nodeTypeDefs);
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public void reregisterNodeTypes(QNodeTypeDefinition[] nodeTypeDefs) throws NoSuchNodeTypeException,
UnsupportedRepositoryOperationException, RepositoryException {
-        service.reregisterNodeTypes(sessionInfo, nodeTypeDefs);
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public void unregisterNodeTypes(QName[] nodeTypeNames) throws NoSuchNodeTypeException,
UnsupportedRepositoryOperationException, RepositoryException {
-        service.unregisterNodeTypes(sessionInfo, nodeTypeNames);
     }
 
     //--------------------------------------------------------------------------

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java?view=diff&rev=497329&r1=497328&r2=497329
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
Wed Jan 17 23:26:14 2007
@@ -687,28 +687,4 @@
      * @see javax.jcr.nodetype.NodeTypeManager#getNodeType(String)
      */
     public QNodeTypeDefinitionIterator getNodeTypeDefinitions(SessionInfo sessionInfo) throws
RepositoryException;
-
-    /**
-     * @param sessionInfo
-     * @param nodetypeDefs
-     * @throws javax.jcr.nodetype.NoSuchNodeTypeException
-     * @throws javax.jcr.RepositoryException
-     */
-    public void registerNodeTypes(SessionInfo sessionInfo, QNodeTypeDefinition[] nodetypeDefs)
throws NoSuchNodeTypeException, UnsupportedRepositoryOperationException, RepositoryException;
-
-    /**
-     * @param sessionInfo
-     * @param nodetypeDefs
-     * @throws javax.jcr.nodetype.NoSuchNodeTypeException
-     * @throws javax.jcr.RepositoryException
-     */
-    public void reregisterNodeTypes(SessionInfo sessionInfo, QNodeTypeDefinition[] nodetypeDefs)
throws NoSuchNodeTypeException, UnsupportedRepositoryOperationException, RepositoryException;
-
-    /**
-     * @param sessionInfo
-     * @param nodetypeNames
-     * @throws javax.jcr.nodetype.NoSuchNodeTypeException
-     * @throws javax.jcr.RepositoryException
-     */
-    public void unregisterNodeTypes(SessionInfo sessionInfo, QName[] nodetypeNames) throws
NoSuchNodeTypeException, UnsupportedRepositoryOperationException, RepositoryException;
 }

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=497329&r1=497328&r2=497329
==============================================================================
--- 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
Wed Jan 17 23:26:14 2007
@@ -1611,30 +1611,6 @@
     }
 
     /**
-     * @throws UnsupportedRepositoryOperationException
-     * @see RepositoryService#registerNodeTypes(SessionInfo, QNodeTypeDefinition[])
-     */
-    public void registerNodeTypes(SessionInfo sessionInfo, QNodeTypeDefinition[] nodetypeDefs)
throws NoSuchNodeTypeException, UnsupportedRepositoryOperationException, RepositoryException
{
-        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
{
-        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 {
-        throw new UnsupportedRepositoryOperationException("JSR170 does not defined methods
to unregister nodetypes.");
-    }
-
-    /**
      * The XML elements and attributes used in serialization
      */
     private static final Namespace SV_NAMESPACE = Namespace.getNamespace(QName.NS_SV_PREFIX,
QName.NS_SV_URI);



Mime
View raw message