Package org.jclouds.openstack.swift.v1.features

Examples of org.jclouds.openstack.swift.v1.features.ObjectApi.replace()


   public String putBlob(String container, Blob blob, PutOptions options) {
      if (options.isMultipart()) {
         throw new UnsupportedOperationException();
      }
      ObjectApi objectApi = api.objectApiInRegionForContainer(region.getId(), container);
      return objectApi.replace(blob.getMetadata().getName(), blob.getPayload(), blob.getMetadata().getUserMetadata());
   }

   @Override
   public BlobMetadata blobMetadata(String container, String name) {
      SwiftObject object = api.objectApiInRegionForContainer(region.getId(), container).head(name);
View Full Code Here


         String objectName = "testPurge";
         Payload payload = Payloads.newByteSourcePayload(ByteSource.wrap(new byte[] {1,2,3}));
         ObjectApi objectApi = api.objectApiInRegionForContainer(regionId, name);
        
         // create a new object
         objectApi.replace(objectName, payload, ImmutableMap.<String, String>of());
        
         CDNApi cdnApi = api.cdnApiInRegion(regionId);
         assertTrue(cdnApi.purgeObject(name, "testPurge", ImmutableList.<String>of()));
        
         // delete the object
View Full Code Here

   public String putBlob(String container, Blob blob, PutOptions options) {
      if (options.isMultipart()) {
         throw new UnsupportedOperationException();
      }
      ObjectApi objectApi = api.objectApiInRegionForContainer(region.getId(), container);
      return objectApi.replace(blob.getMetadata().getName(), blob.getPayload(), blob.getMetadata().getUserMetadata());
   }

   @Override
   public BlobMetadata blobMetadata(String container, String name) {
      SwiftObject object = api.objectApiInRegionForContainer(region.getId(), container).head(name);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.