Repository: camel
Updated Branches:
  refs/heads/master 929bb33ff -> 727038db4


Use a better property prefix for the Box component's parentId.

Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/727038db
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/727038db
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/727038db

Branch: refs/heads/master
Commit: 727038db4c146fd524f755cdeb19f9922a70dd31
Parents: 929bb33
Author: Hiram Chirino <hi...@hiramchirino.com>
Authored: Tue Jul 1 19:45:41 2014 -0400
Committer: Hiram Chirino <hi...@hiramchirino.com>
Committed: Tue Jul 1 19:45:41 2014 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/camel/component/box/BoxConverter.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/727038db/components/camel-box/src/main/java/org/apache/camel/component/box/BoxConverter.java
----------------------------------------------------------------------
diff --git 
a/components/camel-box/src/main/java/org/apache/camel/component/box/BoxConverter.java
 
b/components/camel-box/src/main/java/org/apache/camel/component/box/BoxConverter.java
index e5daf5c..7c4b0a4 100644
--- 
a/components/camel-box/src/main/java/org/apache/camel/component/box/BoxConverter.java
+++ 
b/components/camel-box/src/main/java/org/apache/camel/component/box/BoxConverter.java
@@ -22,6 +22,7 @@ import 
com.box.restclientv2.requestsbase.BoxFileUploadRequestObject;
 import org.apache.camel.Converter;
 import org.apache.camel.Exchange;
 import org.apache.camel.NoTypeConversionAvailableException;
+import org.apache.camel.component.box.internal.BoxConstants;
 import org.apache.camel.component.file.GenericFile;
 
 import java.io.File;
@@ -39,7 +40,7 @@ public final class BoxConverter {
     public static BoxFileUploadRequestObject 
genericFileToBoxFileUploadRequestObject(GenericFile<?> file, Exchange exchange) 
throws IOException, NoTypeConversionAvailableException, BoxRestException, 
BoxJSONException {
         String parentId = "0";
         if (exchange != null) {
-            parentId = exchange.getProperty("box.parentId", "0", String.class);
+            parentId = exchange.getProperty(BoxConstants.PROPERTY_PREFIX + 
"parentId", "0", String.class);
         }
         if (file.getFile() instanceof File) {
             // prefer to use a file input stream if its a java.io.File

Reply via email to