Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
608 changes: 598 additions & 10 deletions ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3Client.java

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3ClientImpl.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/*
* ****************************************************************************
* Copyright 2014-2016 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
* ******************************************************************************
* Copyright 2014-2015 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file.
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
* ****************************************************************************
* or in the "license" file accompanying this file.
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
* ****************************************************************************
*/

// This code is auto-generated, do not modify
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class AbortMultiPartUploadRequest extends AbstractRequest {

// Constructor


public AbortMultiPartUploadRequest(final String bucketName, final String objectName, final UUID uploadId) {
this.bucketName = bucketName;
this.objectName = objectName;
Expand All @@ -41,6 +42,7 @@ public AbortMultiPartUploadRequest(final String bucketName, final String objectN
this.getQueryParams().put("upload_id", uploadId.toString());
}


public AbortMultiPartUploadRequest(final String bucketName, final String objectName, final String uploadId) {
this.bucketName = bucketName;
this.objectName = objectName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class CompleteMultiPartUploadRequest extends AbstractRequest {

// Constructor


public CompleteMultiPartUploadRequest(final String bucketName, final String objectName, final CompleteMultipartUpload requestPayload, final UUID uploadId) {
this.bucketName = bucketName;
this.objectName = objectName;
Expand All @@ -50,6 +51,7 @@ public CompleteMultiPartUploadRequest(final String bucketName, final String obje
this.getQueryParams().put("upload_id", uploadId.toString());
}


public CompleteMultiPartUploadRequest(final String bucketName, final String objectName, final CompleteMultipartUpload requestPayload, final String uploadId) {
this.bucketName = bucketName;
this.objectName = objectName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class DeleteBucketRequest extends AbstractRequest {

// Constructor


public DeleteBucketRequest(final String bucketName) {
this.bucketName = bucketName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class DeleteObjectRequest extends AbstractRequest {

// Constructor


public DeleteObjectRequest(final String bucketName, final String objectName) {
this.bucketName = bucketName;
this.objectName = objectName;
Expand All @@ -49,6 +50,7 @@ public DeleteObjectRequest withReplicate(final boolean replicate) {
return this;
}


public DeleteObjectRequest withRollBack(final boolean rollBack) {
this.rollBack = rollBack;
if (this.rollBack) {
Expand All @@ -60,6 +62,7 @@ public DeleteObjectRequest withRollBack(final boolean rollBack) {
}



@Override
public HttpVerb getVerb() {
return HttpVerb.DELETE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ public class DeleteObjectsRequest extends AbstractRequest {

// Constructor


public DeleteObjectsRequest(final String bucketName, final List<String> objects) {
this.bucketName = bucketName;
this.objects = objects;

this.getQueryParams().put("delete", null);
}


public DeleteObjectsRequest(final String bucketName, final Iterable<Contents> objs) {
this.bucketName = bucketName;

Expand All @@ -76,6 +78,7 @@ public DeleteObjectsRequest withReplicate(final boolean replicate) {
return this;
}


public DeleteObjectsRequest withRollBack(final boolean rollBack) {
this.rollBack = rollBack;
if (this.rollBack) {
Expand All @@ -87,6 +90,7 @@ public DeleteObjectsRequest withRollBack(final boolean rollBack) {
}



public DeleteObjectsRequest withQuiet(final boolean quiet) {
this.quiet = quiet;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class GetBucketRequest extends AbstractRequest {

// Constructor


public GetBucketRequest(final String bucketName) {
this.bucketName = bucketName;

Expand All @@ -47,25 +48,29 @@ public GetBucketRequest withDelimiter(final String delimiter) {
return this;
}


public GetBucketRequest withMarker(final String marker) {
this.marker = marker;
this.updateQueryParam("marker", marker);
return this;
}


public GetBucketRequest withMaxKeys(final int maxKeys) {
this.maxKeys = maxKeys;
this.updateQueryParam("max_keys", maxKeys);
return this;
}


public GetBucketRequest withPrefix(final String prefix) {
this.prefix = prefix;
this.updateQueryParam("prefix", prefix);
return this;
}



@Override
public HttpVerb getVerb() {
return HttpVerb.GET;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class GetObjectRequest extends AbstractRequest {
private ChecksumType.Type checksumType = ChecksumType.Type.NONE;

// Constructor

/** @deprecated use {@link #GetObjectRequest(String, String, WritableByteChannel, UUID, long)} instead */
@Deprecated
public GetObjectRequest(final String bucketName, final String objectName, final WritableByteChannel channel) {
Expand All @@ -56,6 +57,7 @@ public GetObjectRequest(final String bucketName, final String objectName, final

}


public GetObjectRequest(final String bucketName, final String objectName, final WritableByteChannel channel, final UUID job, final long offset) {
this.bucketName = bucketName;
this.objectName = objectName;
Expand All @@ -68,6 +70,7 @@ public GetObjectRequest(final String bucketName, final String objectName, final

}


public GetObjectRequest(final String bucketName, final String objectName, final WritableByteChannel channel, final String job, final long offset) {
this.bucketName = bucketName;
this.objectName = objectName;
Expand All @@ -87,19 +90,22 @@ public GetObjectRequest withJob(final UUID job) {
return this;
}


public GetObjectRequest withJob(final String job) {
this.job = job;
this.updateQueryParam("job", job);
return this;
}


public GetObjectRequest withOffset(final long offset) {
this.offset = offset;
this.updateQueryParam("offset", offset);
return this;
}



/**
* Set a MD5 checksum for the request.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class GetServiceRequest extends AbstractRequest {

// Constructor


public GetServiceRequest() {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class HeadBucketRequest extends AbstractRequest {

// Constructor


public HeadBucketRequest(final String bucketName) {
this.bucketName = bucketName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class HeadObjectRequest extends AbstractRequest {

// Constructor


public HeadObjectRequest(final String bucketName, final String objectName) {
this.bucketName = bucketName;
this.objectName = objectName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class InitiateMultiPartUploadRequest extends AbstractRequest {

// Constructor


public InitiateMultiPartUploadRequest(final String bucketName, final String objectName) {
this.bucketName = bucketName;
this.objectName = objectName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class ListMultiPartUploadPartsRequest extends AbstractRequest {

// Constructor


public ListMultiPartUploadPartsRequest(final String bucketName, final String objectName, final UUID uploadId) {
this.bucketName = bucketName;
this.objectName = objectName;
Expand All @@ -46,6 +47,7 @@ public ListMultiPartUploadPartsRequest(final String bucketName, final String obj
this.getQueryParams().put("upload_id", uploadId.toString());
}


public ListMultiPartUploadPartsRequest(final String bucketName, final String objectName, final String uploadId) {
this.bucketName = bucketName;
this.objectName = objectName;
Expand All @@ -60,13 +62,15 @@ public ListMultiPartUploadPartsRequest withMaxParts(final int maxParts) {
return this;
}


public ListMultiPartUploadPartsRequest withPartNumberMarker(final Integer partNumberMarker) {
this.partNumberMarker = partNumberMarker;
this.updateQueryParam("part_number_marker", partNumberMarker);
return this;
}



@Override
public HttpVerb getVerb() {
return HttpVerb.GET;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class ListMultiPartUploadsRequest extends AbstractRequest {

// Constructor


public ListMultiPartUploadsRequest(final String bucketName) {
this.bucketName = bucketName;

Expand All @@ -50,31 +51,36 @@ public ListMultiPartUploadsRequest withDelimiter(final String delimiter) {
return this;
}


public ListMultiPartUploadsRequest withKeyMarker(final String keyMarker) {
this.keyMarker = keyMarker;
this.updateQueryParam("key_marker", keyMarker);
return this;
}


public ListMultiPartUploadsRequest withMaxUploads(final int maxUploads) {
this.maxUploads = maxUploads;
this.updateQueryParam("max_uploads", maxUploads);
return this;
}


public ListMultiPartUploadsRequest withPrefix(final String prefix) {
this.prefix = prefix;
this.updateQueryParam("prefix", prefix);
return this;
}


public ListMultiPartUploadsRequest withUploadIdMarker(final String uploadIdMarker) {
this.uploadIdMarker = uploadIdMarker;
this.updateQueryParam("upload_id_marker", uploadIdMarker);
return this;
}



@Override
public HttpVerb getVerb() {
return HttpVerb.GET;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class PutBucketRequest extends AbstractRequest {

// Constructor


public PutBucketRequest(final String bucketName) {
this.bucketName = bucketName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class PutMultiPartUploadPartRequest extends AbstractRequest {

// Constructor


public PutMultiPartUploadPartRequest(final String bucketName, final String objectName, final SeekableByteChannel channel, final int partNumber, final long size, final UUID uploadId) {
this.bucketName = bucketName;
this.objectName = objectName;
Expand All @@ -57,6 +58,7 @@ public PutMultiPartUploadPartRequest(final String bucketName, final String objec
this.stream = new SeekableByteChannelInputStream(channel);
}


public PutMultiPartUploadPartRequest(final String bucketName, final String objectName, final SeekableByteChannel channel, final int partNumber, final long size, final String uploadId) {
this.bucketName = bucketName;
this.objectName = objectName;
Expand All @@ -70,6 +72,7 @@ public PutMultiPartUploadPartRequest(final String bucketName, final String objec
this.stream = new SeekableByteChannelInputStream(channel);
}


public PutMultiPartUploadPartRequest(final String bucketName, final String objectName, final int partNumber, final long size, final InputStream stream, final UUID uploadId) {
this.bucketName = bucketName;
this.objectName = objectName;
Expand All @@ -82,6 +85,7 @@ public PutMultiPartUploadPartRequest(final String bucketName, final String objec
this.getQueryParams().put("upload_id", uploadId.toString());
}


public PutMultiPartUploadPartRequest(final String bucketName, final String objectName, final int partNumber, final long size, final InputStream stream, final String uploadId) {
this.bucketName = bucketName;
this.objectName = objectName;
Expand Down
Loading