Package org.jclouds.s3.domain.internal

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


      contentMetadataBuilder.contentType(contentType);
      return this;
   }

   public ObjectMetadata build() {
      MutableObjectMetadataImpl toReturn = new MutableObjectMetadataImpl();
      toReturn.setContentMetadata(BaseMutableContentMetadata.fromContentMetadata(contentMetadataBuilder.build()));
      toReturn.setCacheControl(cacheControl);
      toReturn.setKey(key);
      toReturn.setBucket(bucket);
      toReturn.setUri(uri);
      toReturn.setETag(eTag);
      toReturn.setOwner(owner);
      toReturn.setStorageClass(storageClass);
      toReturn.setUserMetadata(userMetadata);
      toReturn.setLastModified(lastModified);
      return toReturn;
   }
View Full Code Here


      http.getPayload().getContentMetadata().setContentEncoding("encoding");
      http.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_OCTET_STREAM);

      MutableObjectMetadata response = parser.apply(http);

      MutableObjectMetadataImpl expects = new MutableObjectMetadataImpl();
      expects.setCacheControl("cacheControl");
      expects.getContentMetadata().setContentDisposition("contentDisposition");
      expects.getContentMetadata().setContentEncoding("encoding");
      expects.getContentMetadata().setContentMD5(base16().lowerCase().decode("abcd"));
      expects.getContentMetadata().setContentType(MediaType.APPLICATION_OCTET_STREAM);
      expects.getContentMetadata().setContentLength(1025l);
      expects.setETag("\"abcd\"");
      expects.setKey("key");
      expects.setLastModified(now);
      expects.setOwner(null);
      expects.setStorageClass(StorageClass.STANDARD);
      expects.setUserMetadata(userMetadata);

      assertEquals(response, expects);
   }
View Full Code Here

   private String bucket;

   public MutableObjectMetadata apply(BlobMetadata from) {
      if (from == null)
         return null;
      MutableObjectMetadata to = new MutableObjectMetadataImpl();
      HttpUtils.copy(from.getContentMetadata(), to.getContentMetadata());
      to.setUri(from.getUri());
      to.setETag(from.getETag());
      to.setKey(from.getName());
      to.setBucket(bucket);
      to.setLastModified(from.getLastModified());
      if (from.getUserMetadata() != null) {
         for (Entry<String, String> entry : from.getUserMetadata().entrySet())
            to.getUserMetadata().put(entry.getKey().toLowerCase(), entry.getValue());
      }
      return to;
   }
View Full Code Here

      contentMetadataBuilder.contentType(contentType);
      return this;
   }

   public ObjectMetadata build() {
      MutableObjectMetadataImpl toReturn = new MutableObjectMetadataImpl();
      toReturn.setContentMetadata(BaseMutableContentMetadata.fromContentMetadata(contentMetadataBuilder.build()));
      toReturn.setCacheControl(cacheControl);
      toReturn.setKey(key);
      toReturn.setBucket(bucket);
      toReturn.setUri(uri);
      toReturn.setETag(eTag);
      toReturn.setOwner(owner);
      toReturn.setStorageClass(storageClass);
      toReturn.setUserMetadata(userMetadata);
      toReturn.setLastModified(lastModified);
      return toReturn;
   }
View Full Code Here

      http.getPayload().getContentMetadata().setContentEncoding("encoding");
      http.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_OCTET_STREAM);

      MutableObjectMetadata response = parser.apply(http);

      MutableObjectMetadataImpl expects = new MutableObjectMetadataImpl();
      expects.setCacheControl("cacheControl");
      expects.getContentMetadata().setContentDisposition("contentDisposition");
      expects.getContentMetadata().setContentEncoding("encoding");
      expects.getContentMetadata().setContentType(MediaType.APPLICATION_OCTET_STREAM);
      expects.getContentMetadata().setContentLength(1025l);
      expects.getContentMetadata().setContentMD5(base16().lowerCase().decode("abcd"));
      expects.setETag("\"abcd\"");
      expects.setKey("key");
      expects.setLastModified(now);
      expects.setOwner(null);
      expects.setStorageClass(StorageClass.STANDARD);
      expects.setUserMetadata(userMetadata);
      assertEquals(response, expects);
   }
View Full Code Here

      http.getPayload().getContentMetadata().setContentEncoding("encoding");
      http.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_OCTET_STREAM);

      MutableObjectMetadata response = parser.apply(http);

      MutableObjectMetadataImpl expects = new MutableObjectMetadataImpl();
      expects.setCacheControl("cacheControl");
      expects.getContentMetadata().setContentDisposition("contentDisposition");
      expects.getContentMetadata().setContentEncoding("encoding");
      expects.getContentMetadata().setContentType(MediaType.APPLICATION_OCTET_STREAM);
      expects.getContentMetadata().setContentLength(1025l);
      expects.setETag("\"abcd-1\"");
      expects.setKey("key");
      expects.setLastModified(now);
      expects.setOwner(null);
      expects.setStorageClass(StorageClass.STANDARD);
      expects.setUserMetadata(userMetadata);
      assertEquals(response, expects);
   }
View Full Code Here

      http.getPayload().getContentMetadata().setContentEncoding("encoding");
      http.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_OCTET_STREAM);

      MutableObjectMetadata response = parser.apply(http);

      MutableObjectMetadataImpl expects = new MutableObjectMetadataImpl();
      expects.setCacheControl("cacheControl");
      expects.getContentMetadata().setContentDisposition("contentDisposition");
      expects.getContentMetadata().setContentEncoding("encoding");
      expects.getContentMetadata().setContentType(MediaType.APPLICATION_OCTET_STREAM);
      expects.getContentMetadata().setContentLength(1025l);
      expects.getContentMetadata().setContentMD5(base16().lowerCase().decode("abcd"));
      expects.setETag("\"abcd\"");
      expects.setKey("key");
      expects.setLastModified(now);
      expects.setOwner(null);
      expects.setStorageClass(StorageClass.STANDARD);
      expects.setUserMetadata(userMetadata);
      assertEquals(response, expects);
   }
View Full Code Here

      http.getPayload().getContentMetadata().setContentEncoding("encoding");
      http.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_OCTET_STREAM);

      MutableObjectMetadata response = parser.apply(http);

      MutableObjectMetadataImpl expects = new MutableObjectMetadataImpl();
      expects.setCacheControl("cacheControl");
      expects.getContentMetadata().setContentDisposition("contentDisposition");
      expects.getContentMetadata().setContentEncoding("encoding");
      expects.getContentMetadata().setContentType(MediaType.APPLICATION_OCTET_STREAM);
      expects.getContentMetadata().setContentLength(1025l);
      expects.setETag("\"abcd-1\"");
      expects.setKey("key");
      expects.setLastModified(now);
      expects.setOwner(null);
      expects.setStorageClass(StorageClass.STANDARD);
      expects.setUserMetadata(userMetadata);
      assertEquals(response, expects);
   }
View Full Code Here

      http.getPayload().getContentMetadata().setContentEncoding("encoding");
      http.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_OCTET_STREAM);

      MutableObjectMetadata response = parser.apply(http);

      MutableObjectMetadataImpl expects = new MutableObjectMetadataImpl();
      expects.setCacheControl("cacheControl");
      expects.getContentMetadata().setContentDisposition("contentDisposition");
      expects.getContentMetadata().setContentEncoding("encoding");
      expects.getContentMetadata().setContentMD5(base16().lowerCase().decode("abcd"));
      expects.getContentMetadata().setContentType(MediaType.APPLICATION_OCTET_STREAM);
      expects.getContentMetadata().setContentLength(1025l);
      expects.setETag("\"abcd\"");
      expects.setKey("key");
      expects.setLastModified(now);
      expects.setOwner(null);
      expects.setStorageClass(StorageClass.STANDARD);
      expects.setUserMetadata(userMetadata);

      assertEquals(response, expects);
   }
View Full Code Here

      contentMetadataBuilder.contentType(contentType);
      return this;
   }

   public ObjectMetadata build() {
      MutableObjectMetadataImpl toReturn = new MutableObjectMetadataImpl();
      toReturn.setContentMetadata(BaseMutableContentMetadata.fromContentMetadata(contentMetadataBuilder.build()));
      toReturn.setCacheControl(cacheControl);
      toReturn.setKey(key);
      toReturn.setBucket(bucket);
      toReturn.setUri(uri);
      toReturn.setETag(eTag);
      toReturn.setOwner(owner);
      toReturn.setStorageClass(storageClass);
      toReturn.setUserMetadata(userMetadata);
      toReturn.setLastModified(lastModified);
      return toReturn;
   }
View Full Code Here

TOP

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

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.