manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From piergior...@apache.org
Subject svn commit: r1384250 - in /manifoldcf/trunk: ./ connectors/cmis/ tests/cmis/ tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/ tests/elasticsearch/ tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/
Date Thu, 13 Sep 2012 09:37:17 GMT
Author: piergiorgio
Date: Thu Sep 13 09:37:16 2012
New Revision: 1384250

URL: http://svn.apache.org/viewvc?rev=1384250&view=rev
Log:
Upgraded the CMIS connector with OpenCMIS 0.7.0 (CONNECTORS-525)

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/build.xml
    manifoldcf/trunk/connectors/cmis/build.xml
    manifoldcf/trunk/connectors/cmis/pom.xml
    manifoldcf/trunk/tests/cmis/pom.xml
    manifoldcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/APISanityIT.java
    manifoldcf/trunk/tests/elasticsearch/pom.xml
    manifoldcf/trunk/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/APISanityDerbyIT.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1384250&r1=1384249&r2=1384250&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Thu Sep 13 09:37:16 2012
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 0.7-dev =====================
 
+CONNECTORS-525: Upgrade to OpenCMIS 0.7.0
+(Piergiorgio Lucidi)
+
 CONNECTORS-527: Error during CMIS ingestion of nodes without binary content
 (Piergiorgio Lucidi)
 

Modified: manifoldcf/trunk/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/build.xml?rev=1384250&r1=1384249&r2=1384250&view=diff
==============================================================================
--- manifoldcf/trunk/build.xml (original)
+++ manifoldcf/trunk/build.xml Thu Sep 13 09:37:16 2012
@@ -3202,7 +3202,7 @@ Use Apache Forrest version forrest-0.9-d
     
     <target name="download-chemistry">
         <mkdir dir="lib"/>
-        <property name="chemistry-version" value="0.6.0"/>
+        <property name="chemistry-version" value="0.7.0"/>
         <property name="chemistry-package" value="org/apache/chemistry/opencmis"/>
         <antcall target="download-via-maven"><param name="project-path" value="${chemistry-package}"/><param
name="artifact-version" value="${chemistry-version}"/><param name="target" value="lib"/>
             <param name="artifact-name" value="chemistry-opencmis-client-impl"/>
@@ -3244,26 +3244,6 @@ Use Apache Forrest version forrest-0.9-d
         </antcall>
     </target>
     
-    <target name="download-jsr181-api">
-        <mkdir dir="lib"/>
-        <antcall target="download-via-maven"><param name="target" value="lib"/>
-            <param name="project-path" value="javax/jws"/>
-            <param name="artifact-version" value="1.0-MR1"/>
-            <param name="artifact-name" value="jsr181-api"/>
-            <param name="artifact-type" value="jar"/>
-        </antcall>
-    </target>
-
-    <target name="download-jsr250-api">
-        <mkdir dir="lib"/>
-        <antcall target="download-via-maven"><param name="target" value="lib"/>
-            <param name="project-path" value="javax/annotation"/>
-            <param name="artifact-version" value="1.0"/>
-            <param name="artifact-name" value="jsr250-api"/>
-            <param name="artifact-type" value="jar"/>
-        </antcall>
-    </target>
-    
     <target name="download-junit">
         <mkdir dir="lib"/>
         <antcall target="download-via-maven"><param name="target" value="lib"/>
@@ -3461,7 +3441,7 @@ Use Apache Forrest version forrest-0.9-d
         </copy>
     </target>
 
-    <target name="make-core-deps" depends="download-json,download-hsqldb,download-xerces,download-commons,download-solr-plugins,download-sharepoint-plugins,download-jstl,download-xmlgraphics-commons,download-wstx-asl,download-xmlsec,download-xml-apis,download-wss4j,download-velocity,download-streambuffer,download-stax,download-servlet-api,download-xml-resolver,download-osgi,download-opensaml,download-mimepull,download-mail,download-log4j,download-junit,download-jsr181-api,download-jsr250-api,download-jaxws,download-glassfish,download-jaxb,download-tomcat,download-h2,download-h2-support,download-geronimo-specs,download-fop,download-derby,download-postgresql,download-axis,download-saaj,download-wsdl4j,download-castor,download-jetty,download-slf4j,download-xalan,download-activation,download-avalon-framework,download-poi,download-chemistry,download-ecj">
+    <target name="make-core-deps" depends="download-json,download-hsqldb,download-xerces,download-commons,download-solr-plugins,download-sharepoint-plugins,download-jstl,download-xmlgraphics-commons,download-wstx-asl,download-xmlsec,download-xml-apis,download-wss4j,download-velocity,download-streambuffer,download-stax,download-servlet-api,download-xml-resolver,download-osgi,download-opensaml,download-mimepull,download-mail,download-log4j,download-junit,download-jaxws,download-glassfish,download-jaxb,download-tomcat,download-h2,download-h2-support,download-geronimo-specs,download-fop,download-derby,download-postgresql,download-axis,download-saaj,download-wsdl4j,download-castor,download-jetty,download-slf4j,download-xalan,download-activation,download-avalon-framework,download-poi,download-chemistry,download-ecj">
         <copy todir="lib">
             <fileset dir="lib-license" includes="*.txt"/>
         </copy>

Modified: manifoldcf/trunk/connectors/cmis/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/cmis/build.xml?rev=1384250&r1=1384249&r2=1384250&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/cmis/build.xml (original)
+++ manifoldcf/trunk/connectors/cmis/build.xml Thu Sep 13 09:37:16 2012
@@ -32,8 +32,6 @@
             <include name="mimepull*.jar"/>
             <include name="resolver*.jar"/>
             <include name="org.osgi.core*.jar"/>
-            <include name="jsr181-api*.jar"/>
-            <include name="jsr250-api*.jar"/>
             <include name="activation*.jar"/>
             <include name="commons-lang*.jar"/>
         </fileset>
@@ -53,8 +51,6 @@
                 <include name="mimepull*.jar"/>
                 <include name="resolver*.jar"/>
                 <include name="org.osgi.core*.jar"/>
-                <include name="jsr181-api*.jar"/>
-                <include name="jsr250-api*.jar"/>
                 <include name="activation*.jar"/>
             </fileset>
         </copy>

Modified: manifoldcf/trunk/connectors/cmis/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/cmis/pom.xml?rev=1384250&r1=1384249&r2=1384250&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/cmis/pom.xml (original)
+++ manifoldcf/trunk/connectors/cmis/pom.xml Thu Sep 13 09:37:16 2012
@@ -109,7 +109,7 @@
     <dependency>
         <groupId>org.apache.chemistry.opencmis</groupId>
         <artifactId>chemistry-opencmis-client-impl</artifactId>
-        <version>0.6.0</version>
+        <version>0.7.0</version>
      </dependency>
      <dependency>
         <groupId>commons-lang</groupId>

Modified: manifoldcf/trunk/tests/cmis/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/tests/cmis/pom.xml?rev=1384250&r1=1384249&r2=1384250&view=diff
==============================================================================
--- manifoldcf/trunk/tests/cmis/pom.xml (original)
+++ manifoldcf/trunk/tests/cmis/pom.xml Thu Sep 13 09:37:16 2012
@@ -60,7 +60,7 @@
                 <artifactItem>
                   <groupId>org.apache.chemistry.opencmis</groupId>
                   <artifactId>chemistry-opencmis-server-inmemory</artifactId>
-                  <version>0.6.0</version>
+                  <version>0.7.0</version>
                   <type>war</type>
                   <overWrite>false</overWrite>
                   <destFileName>chemistry-opencmis-server-inmemory.war</destFileName>
@@ -97,7 +97,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
-        <version>2.12</version>
+        <version>2.12.3</version>
         <configuration>
           <skipTests>${skipITs}</skipTests>
           <systemPropertyVariables>
@@ -135,7 +135,7 @@
     <dependency>
       <groupId>org.apache.chemistry.opencmis</groupId>
       <artifactId>chemistry-opencmis-server-inmemory</artifactId>
-      <version>0.6.0</version>
+      <version>0.7.0</version>
       <type>war</type>
     </dependency>
     <dependency>
@@ -328,7 +328,7 @@
     <dependency>
       <groupId>org.apache.chemistry.opencmis</groupId>
       <artifactId>chemistry-opencmis-client-impl</artifactId>
-      <version>0.6.0</version>
+      <version>0.7.0</version>
   </dependency>
   <dependency>
       <groupId>commons-lang</groupId>

Modified: manifoldcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/APISanityIT.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/APISanityIT.java?rev=1384250&r1=1384249&r2=1384250&view=diff
==============================================================================
--- manifoldcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/APISanityIT.java
(original)
+++ manifoldcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/APISanityIT.java
Thu Sep 13 09:37:16 2012
@@ -25,6 +25,7 @@ import java.math.BigInteger;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.chemistry.opencmis.client.api.Document;
 import org.apache.chemistry.opencmis.client.api.Folder;
 import org.apache.chemistry.opencmis.client.api.ItemIterable;
 import org.apache.chemistry.opencmis.client.api.QueryResult;
@@ -36,7 +37,6 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.data.ContentStream;
 import org.apache.chemistry.opencmis.commons.enums.BindingType;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl;
-import org.apache.chemistry.opencmis.commons.spi.Holder;
 import org.apache.chemistry.opencmis.commons.spi.ObjectService;
 import org.apache.commons.lang.StringUtils;
 import org.apache.manifoldcf.core.interfaces.Configuration;
@@ -123,14 +123,12 @@ public class APISanityIT extends BaseDer
     for (QueryResult result : results) {
       objectId = result.getPropertyById("cmis:objectId").getFirstValue().toString();
     }
-    String repositoryId = session.getRepositoryInfo().getId();
-    Holder<String> objectIdHolder = new Holder<String>(objectId);
-    Boolean overwriteFlag = true;
+
     byte[] newContentByteArray = newContent.getBytes();
     InputStream stream = new ByteArrayInputStream(newContentByteArray);
     ContentStream contentStream = new ContentStreamImpl(name, new BigInteger(newContentByteArray),
"text/plain", stream);
-    ObjectService objectService = session.getBinding().getObjectService();
-    objectService.setContentStream(repositoryId, objectIdHolder, overwriteFlag, null, contentStream,
null);
+    Document documentToUpdate = (Document) session.getObject(objectId);
+    documentToUpdate.setContentStream(contentStream, true);
   }
   
   public void removeDocument(Session session, String name){

Modified: manifoldcf/trunk/tests/elasticsearch/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/tests/elasticsearch/pom.xml?rev=1384250&r1=1384249&r2=1384250&view=diff
==============================================================================
--- manifoldcf/trunk/tests/elasticsearch/pom.xml (original)
+++ manifoldcf/trunk/tests/elasticsearch/pom.xml Thu Sep 13 09:37:16 2012
@@ -69,7 +69,7 @@
                 <artifactItem>
                   <groupId>org.apache.chemistry.opencmis</groupId>
                   <artifactId>chemistry-opencmis-server-inmemory</artifactId>
-                  <version>0.6.0</version>
+                  <version>0.7.0</version>
                   <type>war</type>
                   <overWrite>false</overWrite>
                   <destFileName>chemistry-opencmis-server-inmemory.war</destFileName>
@@ -106,7 +106,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
-        <version>2.10</version>
+        <version>2.12.3</version>
         <configuration>
           <skipTests>${skipITs}</skipTests>
           <systemPropertyVariables>
@@ -144,7 +144,7 @@
     <dependency>
       <groupId>org.apache.chemistry.opencmis</groupId>
       <artifactId>chemistry-opencmis-server-inmemory</artifactId>
-      <version>0.6.0</version>
+      <version>0.7.0</version>
       <type>war</type>
     </dependency>
     <dependency>
@@ -343,7 +343,7 @@
     <dependency>
       <groupId>org.apache.chemistry.opencmis</groupId>
       <artifactId>chemistry-opencmis-client-impl</artifactId>
-      <version>0.6.0</version>
+      <version>0.7.0</version>
     </dependency>
     <dependency>
       <groupId>commons-lang</groupId>

Modified: manifoldcf/trunk/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/APISanityDerbyIT.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/APISanityDerbyIT.java?rev=1384250&r1=1384249&r2=1384250&view=diff
==============================================================================
--- manifoldcf/trunk/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/APISanityDerbyIT.java
(original)
+++ manifoldcf/trunk/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/APISanityDerbyIT.java
Thu Sep 13 09:37:16 2012
@@ -25,6 +25,7 @@ import java.math.BigInteger;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.chemistry.opencmis.client.api.Document;
 import org.apache.chemistry.opencmis.client.api.Folder;
 import org.apache.chemistry.opencmis.client.api.ItemIterable;
 import org.apache.chemistry.opencmis.client.api.QueryResult;
@@ -36,7 +37,6 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.data.ContentStream;
 import org.apache.chemistry.opencmis.commons.enums.BindingType;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl;
-import org.apache.chemistry.opencmis.commons.spi.Holder;
 import org.apache.chemistry.opencmis.commons.spi.ObjectService;
 import org.apache.commons.lang.StringUtils;
 import org.apache.manifoldcf.core.interfaces.Configuration;
@@ -123,14 +123,12 @@ public class APISanityDerbyIT extends Ba
     for (QueryResult result : results) {
       objectId = result.getPropertyById("cmis:objectId").getFirstValue().toString();
     }
-    String repositoryId = session.getRepositoryInfo().getId();
-    Holder<String> objectIdHolder = new Holder<String>(objectId);
-    Boolean overwriteFlag = true;
+    
     byte[] newContentByteArray = newContent.getBytes();
     InputStream stream = new ByteArrayInputStream(newContentByteArray);
     ContentStream contentStream = new ContentStreamImpl(name, new BigInteger(newContentByteArray),
"text/plain", stream);
-    ObjectService objectService = session.getBinding().getObjectService();
-    objectService.setContentStream(repositoryId, objectIdHolder, overwriteFlag, null, contentStream,
null);
+    Document documentToUpdate = (Document) session.getObject(objectId);
+    documentToUpdate.setContentStream(contentStream, true);
   }
   
   public void removeDocument(Session session, String name){



Mime
View raw message