chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r893252 - in /incubator/chemistry/trunk/chemistry: chemistry-api/src/main/java/org/apache/chemistry/ chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/ chemistry-atompub-server/src/main/java/org/apache/chemistry/ato...
Date Tue, 22 Dec 2009 18:06:53 GMT
Author: fguillaume
Date: Tue Dec 22 18:06:52 2009
New Revision: 893252

URL: http://svn.apache.org/viewvc?rev=893252&view=rev
Log:
Put parameters for SPI.setContentStream in more logical order

Modified:
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISChildrenCollection.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java
    incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java
    incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java?rev=893252&r1=893251&r2=893252&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java
Tue Dec 22 18:06:52 2009
@@ -405,9 +405,9 @@
      * provided as a parameter to this method.
      *
      * @param document the document
+     * @param contentStream the content stream to set
      * @param overwrite {@code true} if an already-existing content stream must
      *            be overwritten
-     * @param contentStream the content stream to set
      * @return the resulting document, which may differ from the one passed as
      *         input
      *
@@ -421,8 +421,8 @@
      * @throws IOException
      */
     // TODO return ObjectId or ObjectEntry?
-    ObjectId setContentStream(ObjectId document, boolean overwrite,
-            ContentStream contentStream) throws IOException,
+    ObjectId setContentStream(ObjectId document, ContentStream contentStream,
+            boolean overwrite) throws IOException,
             ContentAlreadyExistsException, UpdateConflictException;
 
     /**

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java?rev=893252&r1=893251&r2=893252&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java
Tue Dec 22 18:06:52 2009
@@ -465,8 +465,8 @@
         return cs;
     }
 
-    public ObjectId setContentStream(ObjectId document, boolean overwrite,
-            ContentStream cs) throws IOException {
+    public ObjectId setContentStream(ObjectId document, ContentStream cs,
+            boolean overwrite) throws IOException {
         APPObjectEntry current = getObjectEntry(document);
         String href = current.getLink(AtomPub.LINK_EDIT_MEDIA);
         if (href == null) {

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISChildrenCollection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISChildrenCollection.java?rev=893252&r1=893251&r2=893252&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISChildrenCollection.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISChildrenCollection.java
Tue Dec 22 18:06:52 2009
@@ -221,7 +221,7 @@
         try {
             ContentStream cs = new SimpleContentStream(in,
                     contentType.toString(), slug);
-            spi.setContentStream(entry, true, cs);
+            spi.setContentStream(entry, cs, true);
         } catch (IOException e) {
             throw new ResponseContextException(e.toString(), 500);
         } catch (UpdateConflictException e) {

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java?rev=893252&r1=893251&r2=893252&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
Tue Dec 22 18:06:52 2009
@@ -420,7 +420,7 @@
                 ContentStream contentStream = put.stream == null ? null
                         : new SimpleContentStream(put.stream, put.mimeType,
                                 filename);
-                spi.setContentStream(object, true, contentStream);
+                spi.setContentStream(object, contentStream, true);
             }
 
             // build response

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java?rev=893252&r1=893251&r2=893252&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java
Tue Dec 22 18:06:52 2009
@@ -570,8 +570,8 @@
         return new SimpleContentStream(bytes, mimeType, filename);
     }
 
-    public ObjectId setContentStream(ObjectId document, boolean overwrite,
-            ContentStream contentStream) {
+    public ObjectId setContentStream(ObjectId document, ContentStream contentStream,
+            boolean overwrite) {
         SimpleData data = repository.datas.get(document.getId());
         if (contentStream == null) {
             data.remove(SimpleProperty.CONTENT_BYTES_KEY);
@@ -605,7 +605,7 @@
     }
 
     public ObjectId deleteContentStream(ObjectId document) {
-        return setContentStream(document, true, null);
+        return setContentStream(document, null, true);
     }
 
     public ObjectId updateProperties(ObjectId object, String changeToken,

Modified: incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java?rev=893252&r1=893251&r2=893252&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java
Tue Dec 22 18:06:52 2009
@@ -478,8 +478,8 @@
         throw new UnsupportedOperationException();
     }
 
-    public ObjectId setContentStream(ObjectId documentId, boolean overwrite,
-            ContentStream contentStream) {
+    public ObjectId setContentStream(ObjectId documentId, ContentStream contentStream,
+            boolean overwrite) {
         // TODO Auto-generated method stub
         throw new UnsupportedOperationException();
     }

Modified: incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java?rev=893252&r1=893251&r2=893252&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java
Tue Dec 22 18:06:52 2009
@@ -350,7 +350,7 @@
         String filename = "doc.txt";
         ContentStream cs = new SimpleContentStream(blobBytes,
                 "text/plain;charset=UTF-8", filename);
-        spi.setContentStream(ob, true, cs);
+        spi.setContentStream(ob, cs, true);
 
         // refetch
         assertTrue(spi.hasContentStream(id));



Mime
View raw message