jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1080610 - /jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernel.java
Date Fri, 11 Mar 2011 15:38:34 GMT
Author: stefan
Date: Fri Mar 11 15:38:33 2011
New Revision: 1080610

URL: http://svn.apache.org/viewvc?rev=1080610&view=rev
Log:
drafting a MicroKernel api (WIP)

Modified:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernel.java

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernel.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernel.java?rev=1080610&r1=1080609&r2=1080610&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernel.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernel.java
Fri Mar 11 15:38:33 2011
@@ -16,12 +16,16 @@
  */
 package org.apache.jackrabbit.mk;
 
+import java.io.InputStream;
+
 /**
  * TBD:
  *
  * - workspaces are just top-level nodes (e.g. /default. /system)
  *   => no need for inter-workspace operations, simplified versioning implementation
  *
+ * - should the rmk support (polling) observation? are getHistory/diff good enough?
+ *
  * - nodeId is unique per repository and system-generated (e.g. sha1 or similar)
  *   is the concept of a nodeId really required? if yes, how should the nodeId
  *   be exposed? as a system-generated synthetic property? should every node
@@ -33,12 +37,19 @@ package org.apache.jackrabbit.mk;
  *
  * - json representation of properties:
  *   objects? or name/value pairs (type information needs to be encoded somehow)
+ *   what about multi-valued properties?
  *
  * - should the rmk provide native support for shareable nodes?
  *
- * - should child nodes and properties share the same namespace?
+ * - should child nodes and properties share the same namespace? how should this
+ *   be represented in json?
+ *
+ * - does the order of child nodes matter? if yes, how should they be represented
+ *   json (a json object is an unordered set of name/value pairs.
  *
- * - should the rmk support (polling) observation? are getHistory/diff sufficient?
+ * - do we need to specify a 'reorder' op in jsop? perhaps based on 'move'?
+ *
+ * - how should an incomplete list of child nodes be represented in json?
  */
 public interface MicroKernel {
 
@@ -75,9 +86,20 @@ public interface MicroKernel {
     long getChildNodeCount(String idOrPath, String revisionId) throws MicroKernelException;
 
     /**
+     * WRITE ops
+     */
+    /* @todo JSOP diff format doesn't specify a 'copy' op */
+    /* @todo JSOP format doesn't provide property type information */
+    String /* revisionId */ commit(String idOrPath, String jsonDiff) throws MicroKernelException;
+
+    /**
      * DataStore READ/WRITE ops
      */
+    // @todo encode length in id?
     long getLength(String dsId) throws MicroKernelException;
+    InputStream read(String dsId) throws MicroKernelException;
+    String /* dsId */ write(InputStream in) throws MicroKernelException;
+
     int /* count */ read(String dsId, byte[] buf, int off, int size) throws MicroKernelException;
     // alternative a:
     String /* dsId */ write(byte[] data, int size) throws MicroKernelException;
@@ -86,13 +108,4 @@ public interface MicroKernel {
     // alternative b:
     // tmp: isTemporary, timeToLive=3600s, if tmp=false -> returned dsId is a hash of
the content
     String /* dsId */ append(String dsBaseId, byte[] data, int size, boolean tmp) throws
MicroKernelException;
-
-
-    /**
-     * WRITE ops
-     */
-    /* @todo JSOP diff format doesn't specify a 'copy' op */
-    /* @todo JSOP format doesn't provide property type information */
-    String /* revisionId */ commit(String idOrPath, String jsonDiff) throws MicroKernelException;
 }
-



Mime
View raw message