Package org.jclouds.s3.domain.internal

Examples of org.jclouds.s3.domain.internal.ListBucketResponseImpl


         public String apply(StorageMetadata from) {
            return from.getName();
         }

      }));
      return new ListBucketResponseImpl(null, contents, null, null, list.getNextMarker(), 0, "/",
               list.getNextMarker() != null, commonPrefixes);
   }
View Full Code Here


   public ListBucketResponse expected() {
      CanonicalUser owner = new CanonicalUser("e1a5f66a480ca99a4fdfe8e318c3020446c9989d7004e7778029fbcc5d990fa0",
               "ferncam");
      String bucket = "adriancole.org.jclouds.aws.s3.amazons3testdelimiter";
      ListBucketResponse expected = new ListBucketResponseImpl(bucket, ImmutableList.<ObjectMetadata> of(
               new ObjectMetadataBuilder().key("apps/0").bucket(bucket).uri(URI.create("http://bucket.com/apps/0"))
                        .lastModified(dateService.iso8601DateParse("2009-05-07T18:27:08.000Z")).eTag(
                                 "\"c82e6a0025c31c5de5947fda62ac51ab\"").owner(owner).contentMD5(
                                 base16().lowerCase().decode("c82e6a0025c31c5de5947fda62ac51ab")).contentLength(8l).build(),
               new ObjectMetadataBuilder().key("apps/1").bucket(bucket).uri(URI.create("http://bucket.com/apps/1"))
View Full Code Here

   public ListBucketHandler(DateService dateParser) {
      this.dateParser = dateParser;
   }

   public ListBucketResponse getResult() {
      return new ListBucketResponseImpl(bucketName, contents.build(), prefix, marker,
               (isTruncated && nextMarker == null) ? currentKey : nextMarker, maxResults, delimiter, isTruncated,
               commonPrefixes.build());
   }
View Full Code Here

   public ListBucketHandler(DateService dateParser) {
      this.dateParser = dateParser;
   }

   public ListBucketResponse getResult() {
      return new ListBucketResponseImpl(bucketName, contents.build(), prefix, marker,
               (isTruncated && nextMarker == null) ? currentKey : nextMarker, maxResults, delimiter, isTruncated,
               commonPrefixes.build());
   }
View Full Code Here

   public void testMultiPageResult() throws Exception {
      String nextMarker = "FOO";
      S3Client api = createMock(S3Client.class);
      ListBucketOptions options = new ListBucketOptions();
      ListBucketResponse response2 = new ListBucketHandlerTest().expected();
      ListBucketResponse response1 = new ListBucketResponseImpl(response2.getName(), response2, response2.getPrefix(),
            null, nextMarker, response2.getMaxKeys(), response2.getDelimiter(), false, response2.getCommonPrefixes());

      expect(api.listBucket("bucket", options)).andReturn(response1).once();
      expect(api.listBucket("bucket", options.afterMarker(nextMarker))).andReturn(response2).once();
View Full Code Here

   public ListBucketResponse expected() {
      CanonicalUser owner = new CanonicalUser("e1a5f66a480ca99a4fdfe8e318c3020446c9989d7004e7778029fbcc5d990fa0",
               "ferncam");
      String bucket = "adriancole.org.jclouds.aws.s3.amazons3testdelimiter";
      ListBucketResponse expected = new ListBucketResponseImpl(bucket, ImmutableList.<ObjectMetadata> of(
               new ObjectMetadataBuilder().key("apps/0").bucket(bucket).uri(URI.create("http://bucket.com/apps/0"))
                        .lastModified(dateService.iso8601DateParse("2009-05-07T18:27:08.000Z")).eTag(
                                 "\"c82e6a0025c31c5de5947fda62ac51ab\"").owner(owner).contentMD5(
                                 base16().lowerCase().decode("c82e6a0025c31c5de5947fda62ac51ab")).contentLength(8l).build(),
               new ObjectMetadataBuilder().key("apps/1").bucket(bucket).uri(URI.create("http://bucket.com/apps/1"))
View Full Code Here

         public String apply(StorageMetadata from) {
            return from.getName();
         }

      }));
      return new ListBucketResponseImpl(null, contents, null, null, list.getNextMarker(), 0, "/",
               list.getNextMarker() != null, commonPrefixes);
   }
View Full Code Here

   public ListBucketHandler(DateService dateParser) {
      this.dateParser = dateParser;
   }

   public ListBucketResponse getResult() {
      return new ListBucketResponseImpl(bucketName, contents.build(), prefix, marker,
               (isTruncated && nextMarker == null) ? currentKey : nextMarker, maxResults, delimiter, isTruncated,
               commonPrefixes.build());
   }
View Full Code Here

   public void testMultiPageResult() throws Exception {
      String nextMarker = "FOO";
      S3Client api = createMock(S3Client.class);
      ListBucketOptions options = new ListBucketOptions();
      ListBucketResponse response2 = new ListBucketHandlerTest().expected();
      ListBucketResponse response1 = new ListBucketResponseImpl(response2.getName(), response2, response2.getPrefix(),
            null, nextMarker, response2.getMaxKeys(), response2.getDelimiter(), false, response2.getCommonPrefixes());

      expect(api.listBucket("bucket", options)).andReturn(response1).once();
      expect(api.listBucket("bucket", options.afterMarker(nextMarker))).andReturn(response2).once();
View Full Code Here

   public ListBucketResponse expected() {
      CanonicalUser owner = new CanonicalUser("e1a5f66a480ca99a4fdfe8e318c3020446c9989d7004e7778029fbcc5d990fa0",
               "ferncam");
      String bucket = "adriancole.org.jclouds.aws.s3.amazons3testdelimiter";
      ListBucketResponse expected = new ListBucketResponseImpl(bucket, ImmutableList.<ObjectMetadata> of(
               new ObjectMetadataBuilder().key("apps/0").bucket(bucket).uri(URI.create("http://bucket.com/apps/0"))
                        .lastModified(dateService.iso8601DateParse("2009-05-07T18:27:08.000Z")).eTag(
                                 "\"c82e6a0025c31c5de5947fda62ac51ab\"").owner(owner).contentMD5(
                                 base16().lowerCase().decode("c82e6a0025c31c5de5947fda62ac51ab")).contentLength(8l).build(),
               new ObjectMetadataBuilder().key("apps/1").bucket(bucket).uri(URI.create("http://bucket.com/apps/1"))
View Full Code Here

TOP

Related Classes of org.jclouds.s3.domain.internal.ListBucketResponseImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.