jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r554676 - in /jackrabbit/trunk/contrib/spi: jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ spi/src/main/java/org/a...
Date Mon, 09 Jul 2007 15:09:49 GMT
Author: reschke
Date: Mon Jul  9 08:09:48 2007
New Revision: 554676

URL: http://svn.apache.org/viewvc?view=rev&rev=554676
Log:
JCR-1004: Introduced RepositoryService.getQNodeTypeDefiniion(); also renamed getNodeTypeDefinitions()
to getQNodeTypeDefinitions(). Implementations in SPI impls (currently throws RTE), and usage
in JCR2SPI to be done.

Modified:
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
    jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientRepositoryService.java
    jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ServerRepositoryService.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
    jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/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=554676&r1=554675&r2=554676
==============================================================================
--- 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
Mon Jul  9 08:09:48 2007
@@ -386,7 +386,7 @@
      * @throws RepositoryException
      */
     private NodeTypeRegistry createNodeTypeRegistry(QNodeDefinition rootNodeDef, NamespaceRegistry
nsRegistry, Map descriptors) throws RepositoryException {
-        Iterator it = service.getNodeTypeDefinitions(sessionInfo);
+        Iterator it = service.getQNodeTypeDefinitions(sessionInfo);
         List ntDefs = new ArrayList();
         while (it.hasNext()) {
             ntDefs.add(it.next());

Modified: jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientRepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientRepositoryService.java?view=diff&rev=554676&r1=554675&r2=554676
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientRepositoryService.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientRepositoryService.java
Mon Jul  9 08:09:48 2007
@@ -742,7 +742,7 @@
     /**
      * {@inheritDoc}
      */
-    public Iterator getNodeTypeDefinitions(
+    public Iterator getQNodeTypeDefinitions(
             SessionInfo sessionInfo) throws RepositoryException {
         try {
             QNodeTypeDefinition[] ntDefs = remoteService.getNodeTypeDefinitions(
@@ -751,6 +751,14 @@
         } catch (RemoteException e) {
             throw new RemoteRepositoryException(e);
         }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public QNodeTypeDefinition getQNodeTypeDefinition(SessionInfo sessionInfo, QName nodetypeName)
throws RepositoryException {
+        // TODO: implement me
+        throw new RuntimeException("implementation for getQNodeTypeDefinition missing");
     }
 
     //------------------------------< internal >--------------------------------

Modified: jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ServerRepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ServerRepositoryService.java?view=diff&rev=554676&r1=554675&r2=554676
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ServerRepositoryService.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ServerRepositoryService.java
Mon Jul  9 08:09:48 2007
@@ -822,7 +822,7 @@
      */
     public QNodeTypeDefinition[] getNodeTypeDefinitions(RemoteSessionInfo sessionInfo)
             throws RepositoryException, RemoteException {
-        Iterator it = service.getNodeTypeDefinitions(getSessionInfo(sessionInfo));
+        Iterator it = service.getQNodeTypeDefinitions(getSessionInfo(sessionInfo));
         List nts = new ArrayList();
         while (it.hasNext()) {
             QNodeTypeDefinition nt = (QNodeTypeDefinition) it.next();

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=554676&r1=554675&r2=554676
==============================================================================
--- 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
Mon Jul  9 08:09:48 2007
@@ -766,5 +766,20 @@
      * @see javax.jcr.nodetype.NodeTypeManager#getPrimaryNodeTypes()
      * @see javax.jcr.nodetype.NodeTypeManager#getNodeType(String)
      */
-    public Iterator getNodeTypeDefinitions(SessionInfo sessionInfo) throws RepositoryException;
+    public Iterator getQNodeTypeDefinitions(SessionInfo sessionInfo) throws RepositoryException;
+
+    /**
+     * Retrieve a specific <code>QNodeTypeDefinition</code>.
+     *
+     * @param sessionInfo
+     * @param nodetypeName name of node type to retrieve
+     * @return {@link QNodeTypeDefinition}
+     * @throws javax.jcr.RepositoryException
+     * @see javax.jcr.Workspace#getNodeTypeManager()
+     * @see javax.jcr.nodetype.NodeTypeManager#getAllNodeTypes()
+     * @see javax.jcr.nodetype.NodeTypeManager#getMixinNodeTypes()
+     * @see javax.jcr.nodetype.NodeTypeManager#getPrimaryNodeTypes()
+     * @see javax.jcr.nodetype.NodeTypeManager#getNodeType(String)
+     */
+    public QNodeTypeDefinition getQNodeTypeDefinition(SessionInfo sessionInfo, QName nodetypeName)
throws 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=554676&r1=554675&r2=554676
==============================================================================
--- 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
Mon Jul  9 08:09:48 2007
@@ -1479,7 +1479,7 @@
             resolvedTypeNames = new HashSet();
             // make sure node type definitions are available
             if (nodeTypeDefinitions.size() == 0) {
-                getNodeTypeDefinitions(sessionInfo);
+                getQNodeTypeDefinitions(sessionInfo);
             }
             synchronized (nodeTypeDefinitions) {
                 for (int i = 0; i < nodeTypeNames.length; i++) {
@@ -1808,9 +1808,9 @@
     }
 
     /**
-     * @see RepositoryService#getNodeTypeDefinitions(SessionInfo)
+     * @see RepositoryService#getQNodeTypeDefinitions(SessionInfo)
      */
-    public Iterator getNodeTypeDefinitions(SessionInfo sessionInfo) throws RepositoryException
{
+    public Iterator getQNodeTypeDefinitions(SessionInfo sessionInfo) throws RepositoryException
{
         ReportInfo info = new ReportInfo(NodeTypesReport.NODETYPES_REPORT, DEPTH_0);
         info.setContentElement(DomUtil.createElement(domFactory, NodeTypeConstants.XML_REPORT_ALLNODETYPES,
NodeTypeConstants.NAMESPACE));
 
@@ -1846,6 +1846,14 @@
                 method.releaseConnection();
             }
         }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public QNodeTypeDefinition getQNodeTypeDefinition(SessionInfo sessionInfo, QName nodetypeName)
throws RepositoryException {
+        // TODO: implement me
+        throw new RuntimeException("implementation for getQNodeTypeDefinition missing");
     }
 
     /**

Modified: jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/RepositoryServiceImpl.java?view=diff&rev=554676&r1=554675&r2=554676
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/RepositoryServiceImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/RepositoryServiceImpl.java
Mon Jul  9 08:09:48 2007
@@ -23,6 +23,7 @@
 import org.apache.jackrabbit.spi.ItemId;
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.QNodeDefinition;
+import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.spi.PropertyId;
 import org.apache.jackrabbit.spi.NodeInfo;
@@ -980,7 +981,7 @@
     /**
      * {@inheritDoc}
      */
-    public Iterator getNodeTypeDefinitions(SessionInfo sessionInfo) throws RepositoryException
{
+    public Iterator getQNodeTypeDefinitions(SessionInfo sessionInfo) throws RepositoryException
{
         SessionInfoImpl sInfo = getSessionInfoImpl(sessionInfo);
         NodeTypeManager ntMgr = sInfo.getSession().getWorkspace().getNodeTypeManager();
         List nodeTypes = new ArrayList();
@@ -994,6 +995,14 @@
             throw new RepositoryException(e);
         }
         return nodeTypes.iterator();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public QNodeTypeDefinition getQNodeTypeDefinition(SessionInfo sessionInfo, QName nodetypeName)
throws RepositoryException {
+        // TODO: implement me
+        throw new RuntimeException("implementation for getQNodeTypeDefinition missing");
     }
 
     //----------------------------< internal >----------------------------------



Mime
View raw message