camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bibr...@apache.org
Subject svn commit: r1364557 - in /camel/trunk/components/camel-cmis/src: main/java/org/apache/camel/component/cmis/ test/java/org/apache/camel/componenet/cmis/ test/resources/
Date Mon, 23 Jul 2012 09:51:52 GMT
Author: bibryam
Date: Mon Jul 23 09:51:52 2012
New Revision: 1364557

URL: http://svn.apache.org/viewvc?rev=1364557&view=rev
Log:
Cleanup cmis component

Modified:
    camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISConsumer.java
    camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISProducer.java
    camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
    camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CamelCMISConstants.java
    camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/RecursiveTreeWalker.java
    camel/trunk/components/camel-cmis/src/test/java/org/apache/camel/componenet/cmis/CMISProducerTest.java
    camel/trunk/components/camel-cmis/src/test/resources/log4j.properties

Modified: camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISConsumer.java?rev=1364557&r1=1364556&r2=1364557&view=diff
==============================================================================
--- camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISConsumer.java
(original)
+++ camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISConsumer.java
Mon Jul 23 09:51:52 2012
@@ -51,7 +51,7 @@ public class CMISConsumer extends Schedu
         Exchange exchange = getEndpoint().createExchange();
         exchange.getIn().setHeaders(properties);
         exchange.getIn().setBody(inputStream);
-        LOG.debug("Polling node : {0}", properties.get("cmis:name"));
+        LOG.debug("Polling node : {}", properties.get("cmis:name"));
         getProcessor().process(exchange);
         return 1;
     }

Modified: camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISProducer.java?rev=1364557&r1=1364556&r2=1364557&view=diff
==============================================================================
--- camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISProducer.java
(original)
+++ camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISProducer.java
Mon Jul 23 09:51:52 2012
@@ -65,11 +65,11 @@ public class CMISProducer extends Defaul
             String mimeType = getMimeType(message);
             byte[] buf = getBodyData(message);
             ContentStream contentStream = cmisSessionFacade.createContentStream(fileName,
buf, mimeType);
-            return storeDocument(parentFolder, cmisProperties, contentStream, cmisSessionFacade);
+            return storeDocument(parentFolder, cmisProperties, contentStream);
         } else if (isFolder(message)) {
             return storeFolder(parentFolder, cmisProperties);
         } else {  //other types
-            return storeDocument(parentFolder, cmisProperties, null, cmisSessionFacade);
+            return storeDocument(parentFolder, cmisProperties, null);
         }
     }
 
@@ -110,22 +110,22 @@ public class CMISProducer extends Defaul
         if (!cmisProperties.containsKey(PropertyIds.OBJECT_TYPE_ID)) {
             cmisProperties.put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_FOLDER);
         }
-        LOG.debug("Creating folder with properties: {0}", cmisProperties);
+        LOG.debug("Creating folder with properties: {}", cmisProperties);
         return parentFolder.createFolder(cmisProperties);
     }
 
     private Document storeDocument(Folder parentFolder, Map<String, Object> cmisProperties,
-                                   ContentStream contentStream, CMISSessionFacade cmisSessionFacade)
{
+                                   ContentStream contentStream) {
         if (!cmisProperties.containsKey(PropertyIds.OBJECT_TYPE_ID)) {
             cmisProperties.put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
         }
 
         VersioningState versioningState = VersioningState.NONE;
-        if (this.cmisSessionFacade
+        if (cmisSessionFacade
                 .isObjectTypeVersionable((String)cmisProperties.get(PropertyIds.OBJECT_TYPE_ID)))
{
             versioningState = VersioningState.MAJOR;
         }
-        LOG.debug("Creating document with properties: {0}", cmisProperties);
+        LOG.debug("Creating document with properties: {}", cmisProperties);
         return parentFolder.createDocument(cmisProperties, contentStream, versioningState);
     }
 

Modified: camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java?rev=1364557&r1=1364556&r2=1364557&view=diff
==============================================================================
--- camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
(original)
+++ camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
Mon Jul 23 09:51:52 2012
@@ -92,7 +92,7 @@ public class CMISSessionFacade {
         ItemIterable<QueryResult> itemIterable = executeQuery(query);
         while (!finished) {
             ItemIterable<QueryResult> currentPage = itemIterable.skipTo(count).getPage();
-            LOG.debug("Processing page {0}", pageNumber);
+            LOG.debug("Processing page {}", pageNumber);
             for (QueryResult item : currentPage) {
                 Map<String, Object> properties = CMISHelper.propertyDataToMap(item.getProperties());
                 Object objectTypeId = item.getPropertyValueById(PropertyIds.OBJECT_TYPE_ID);
@@ -125,7 +125,7 @@ public class CMISSessionFacade {
         boolean finished = false;
         while (!finished) {
             ItemIterable<QueryResult> currentPage = itemIterable.skipTo(count).getPage();
-            LOG.debug("Processing page {0}", pageNumber);
+            LOG.debug("Processing page {}", pageNumber);
             for (QueryResult item : currentPage) {
                 Map<String, Object> properties = CMISHelper.propertyDataToMap(item.getProperties());
                 if (retrieveContent) {

Modified: camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CamelCMISConstants.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CamelCMISConstants.java?rev=1364557&r1=1364556&r2=1364557&view=diff
==============================================================================
--- camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CamelCMISConstants.java
(original)
+++ camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CamelCMISConstants.java
Mon Jul 23 09:51:52 2012
@@ -20,7 +20,6 @@ public interface CamelCMISConstants {
     String CMIS_DOCUMENT = "cmis:document";
     String CMIS_FOLDER = "cmis:folder";
     String CMIS_FOLDER_PATH = "CamelCMISFolderPath";
-    String CMIS_MIME_TYPE = "CamelCMISMimeType";
     String CAMEL_CMIS_RESULT_COUNT = "CamelCMISResultCount";
     String CAMEL_CMIS_RETRIEVE_CONTENT = "CamelCMISRetrieveContent";
     String CAMEL_CMIS_READ_SIZE = "CamelCMISReadSize";

Modified: camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/RecursiveTreeWalker.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/RecursiveTreeWalker.java?rev=1364557&r1=1364556&r2=1364557&view=diff
==============================================================================
--- camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/RecursiveTreeWalker.java
(original)
+++ camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/RecursiveTreeWalker.java
Mon Jul 23 09:51:52 2012
@@ -57,7 +57,7 @@ public class RecursiveTreeWalker {
         ItemIterable<CmisObject> itemIterable = folder.getChildren(operationContext);
         while (!finished) {
             ItemIterable<CmisObject> currentPage = itemIterable.skipTo(count).getPage();
-            LOG.debug("Processing page {0}", pageNumber);
+            LOG.debug("Processing page {}", pageNumber);
             for (CmisObject child : currentPage) {
                 if (CMISHelper.isFolder(child)) {
                     Folder childFolder = (Folder)child;

Modified: camel/trunk/components/camel-cmis/src/test/java/org/apache/camel/componenet/cmis/CMISProducerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cmis/src/test/java/org/apache/camel/componenet/cmis/CMISProducerTest.java?rev=1364557&r1=1364556&r2=1364557&view=diff
==============================================================================
--- camel/trunk/components/camel-cmis/src/test/java/org/apache/camel/componenet/cmis/CMISProducerTest.java
(original)
+++ camel/trunk/components/camel-cmis/src/test/java/org/apache/camel/componenet/cmis/CMISProducerTest.java
Mon Jul 23 09:51:52 2012
@@ -132,7 +132,6 @@ public class CMISProducerTest extends CM
         Producer producer = endpoint.createProducer();
 
         Exchange exchange = createExchangeWithInBody("Some content to be store");
-        exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_MIME_TYPE, "text/plain;
charset=UTF-8");
         exchange.getIn().getHeaders().put(PropertyIds.NAME, "test.txt");
         producer.process(exchange);
     }

Modified: camel/trunk/components/camel-cmis/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cmis/src/test/resources/log4j.properties?rev=1364557&r1=1364556&r2=1364557&view=diff
==============================================================================
--- camel/trunk/components/camel-cmis/src/test/resources/log4j.properties (original)
+++ camel/trunk/components/camel-cmis/src/test/resources/log4j.properties Mon Jul 23 09:51:52
2012
@@ -5,9 +5,9 @@
 ## The ASF licenses this file to You under the Apache License, Version 2.0
 ## (the "License"); you may not use this file except in compliance with
 ## the License.  You may obtain a copy of the License at
-## 
+##
 ## http://www.apache.org/licenses/LICENSE-2.0
-## 
+##
 ## Unless required by applicable law or agreed to in writing, software
 ## distributed under the License is distributed on an "AS IS" BASIS,
 ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,17 +20,18 @@
 #
 log4j.rootLogger=INFO, file
 
-log4j.logger.org.apache.camel.impl.converter=WARN
-log4j.logger.org.apache.camel.component.cxf=INFO
+#log4j.logger.org.apache.camel.component.cmis=DEBUG
+#log4j.logger.org.apache.camel=INFO
+
 
 # CONSOLE appender not used by default
 log4j.appender.out=org.apache.log4j.ConsoleAppender
 log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=%d [%-35.35t] %-5p %-30.30c{1} - %m%n
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
 
 # File appender
 log4j.appender.file=org.apache.log4j.FileAppender
 log4j.appender.file.layout=org.apache.log4j.PatternLayout
 log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
 log4j.appender.file.file=target/camel-cmis-test.log
-log4j.appender.file.append=true
+log4j.appender.file.append=false
\ No newline at end of file



Mime
View raw message