Skip to content

Commit

Permalink
CAMEL-11751: Upgraded dropbox-core SDK to 3.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
vrlgohel authored and davsclaus committed Oct 6, 2017
1 parent ac17984 commit f549e03
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 106 deletions.
Expand Up @@ -91,7 +91,7 @@ with the following path and query parameters:
|=== |===
| Name | Description | Default | Type | Name | Description | Default | Type
| *accessToken* (common) | *Required* The access token to make API requests for a specific Dropbox user | | String | *accessToken* (common) | *Required* The access token to make API requests for a specific Dropbox user | | String
| *client* (common) | To use an existing DbxClient instance as DropBox client. | | DbxClient | *client* (common) | To use an existing DbxClient instance as DropBox client. | | DbxClientV2
| *clientIdentifier* (common) | *Required* Name of the app registered to make API requests | | String | *clientIdentifier* (common) | *Required* Name of the app registered to make API requests | | String
| *localPath* (common) | Optional folder or file to upload on Dropbox from the local filesystem. If this option has not been configured then the message body is used as the content to upload. | | String | *localPath* (common) | Optional folder or file to upload on Dropbox from the local filesystem. If this option has not been configured then the message body is used as the content to upload. | | String
| *newRemotePath* (common) | Destination file or folder | | String | *newRemotePath* (common) | Destination file or folder | | String
Expand Down
Expand Up @@ -18,8 +18,8 @@


import java.util.Locale; import java.util.Locale;


import com.dropbox.core.DbxClient;
import com.dropbox.core.DbxRequestConfig; import com.dropbox.core.DbxRequestConfig;
import com.dropbox.core.v2.DbxClientV2;
import org.apache.camel.component.dropbox.util.DropboxOperation; import org.apache.camel.component.dropbox.util.DropboxOperation;
import org.apache.camel.component.dropbox.util.DropboxUploadMode; import org.apache.camel.component.dropbox.util.DropboxUploadMode;
import org.apache.camel.spi.Metadata; import org.apache.camel.spi.Metadata;
Expand Down Expand Up @@ -56,16 +56,16 @@ public class DropboxConfiguration {
private String clientIdentifier; private String clientIdentifier;
//reference to dropbox client //reference to dropbox client
@UriParam @UriParam
private DbxClient client; private DbxClientV2 client;


/** /**
* To use an existing DbxClient instance as DropBox client. * To use an existing DbxClient instance as DropBox client.
*/ */
public void setClient(DbxClient client) { public void setClient(DbxClientV2 client) {
this.client = client; this.client = client;
} }


public DbxClient getClient() { public DbxClientV2 getClient() {
return client; return client;
} }


Expand All @@ -74,7 +74,7 @@ public DbxClient getClient() {
*/ */
public void createClient() { public void createClient() {
DbxRequestConfig config = new DbxRequestConfig(clientIdentifier, Locale.getDefault().toString()); DbxRequestConfig config = new DbxRequestConfig(clientIdentifier, Locale.getDefault().toString());
this.client = new DbxClient(config, accessToken); this.client = new DbxClientV2(config, accessToken);
} }


public String getAccessToken() { public String getAccessToken() {
Expand Down

0 comments on commit f549e03

Please sign in to comment.