public Blob create(MutableBlobMetadata metadata) { return new BlobImpl(metadata != null ? metadata : metadataProvider.get()); } }
public Blob create(MutableBlobMetadata metadata) { return new BlobImpl(metadata != null ? metadata : metadataProvider.get()); } }
public Blob create(MutableBlobMetadata metadata) { return new BlobImpl(metadata != null ? metadata : metadataProvider.get()); } }
public Blob create(MutableBlobMetadata metadata) { return new BlobImpl(metadata != null ? metadata : metadataProvider.get()); } }
public Blob create(MutableBlobMetadata metadata) { return new BlobImpl(metadata != null ? metadata : metadataProvider.get()); } }
public Blob create(MutableBlobMetadata metadata) { return new BlobImpl(metadata != null ? metadata : metadataProvider.get()); } }
public Blob create(MutableBlobMetadata metadata) { return new BlobImpl(metadata != null ? metadata : metadataProvider.get()); } }
@Override public Blob getBlob(String container, String name, GetOptions options) { ObjectApi objectApi = api.getObjectApi(regionId, container); SwiftObject object = objectApi.get(name, toGetOptions.apply(options)); if (object == null) { return null; } Blob blob = new BlobImpl(toBlobMetadata(container).apply(object)); blob.setPayload(object.getPayload()); blob.setAllHeaders(object.getHeaders()); return blob; }
@Override public Blob getBlob(String container, String name, GetOptions options) { ObjectApi objectApi = api.getObjectApi(regionId, container); SwiftObject object = objectApi.get(name, toGetOptions.apply(options)); if (object == null) { return null; } Blob blob = new BlobImpl(toBlobMetadata(container).apply(object)); blob.setPayload(object.getPayload()); blob.setAllHeaders(object.getHeaders()); return blob; }
@Override public Blob build() { Blob blob = new BlobImpl(new MutableBlobMetadataImpl()); checkState(name != null, "name"); blob.getMetadata().setName(name); if (payload != null) blob.setPayload(payload); blob.getMetadata().setUserMetadata(userMetadata); blob.getMetadata().setType(type); return blob; }
@Override public Blob getBlob(String container, String name, GetOptions options) { ObjectApi objectApi = api.getObjectApi(regionId, container); SwiftObject object = objectApi.get(name, toGetOptions.apply(options)); if (object == null) { return null; } Blob blob = new BlobImpl(toBlobMetadata(container).apply(object)); blob.setPayload(object.getPayload()); blob.setAllHeaders(object.getHeaders()); return blob; }
@Override public Blob build() { Blob blob = new BlobImpl(new MutableBlobMetadataImpl()); checkState(name != null, "name"); blob.getMetadata().setName(name); if (payload != null) blob.setPayload(payload); blob.getMetadata().setUserMetadata(userMetadata); blob.getMetadata().setType(type); return blob; }
@Override public Blob build() { Blob blob = new BlobImpl(new MutableBlobMetadataImpl()); checkState(name != null, "name"); blob.getMetadata().setName(name); if (payload != null) blob.setPayload(payload); blob.getMetadata().setUserMetadata(userMetadata); blob.getMetadata().setType(type); return blob; }
@Override public Blob build() { Blob blob = new BlobImpl(new MutableBlobMetadataImpl()); checkState(name != null, "name"); blob.getMetadata().setName(name); if (payload != null) blob.setPayload(payload); blob.getMetadata().setUserMetadata(userMetadata); blob.getMetadata().setType(type); return blob; }
@Override public Blob build() { Blob blob = new BlobImpl(new MutableBlobMetadataImpl()); checkState(name != null, "name"); blob.getMetadata().setName(name); if (payload != null) blob.setPayload(payload); blob.getMetadata().setUserMetadata(userMetadata); blob.getMetadata().setType(type); return blob; }
@Override public Blob build() { Blob blob = new BlobImpl(new MutableBlobMetadataImpl()); checkState(name != null, "name"); blob.getMetadata().setName(name); if (payload != null) blob.setPayload(payload); blob.getMetadata().setUserMetadata(userMetadata); blob.getMetadata().setType(type); blob.getMetadata().setTier(tier); return blob; }
@Override public Blob build() { Blob blob = new BlobImpl(new MutableBlobMetadataImpl()); checkState(name != null, "name"); blob.getMetadata().setName(name); if (payload != null) blob.setPayload(payload); blob.getMetadata().setUserMetadata(userMetadata); blob.getMetadata().setType(type); blob.getMetadata().setTier(tier); blob.getMetadata().setETag(eTag); return blob; }
@Override public Blob getBlob(String container, String name, GetOptions options) { GoogleCloudStorageObject gcsObject = api.getObjectApi().getObject(container, Strings2.urlEncode(name)); if (gcsObject == null) { return null; } org.jclouds.http.options.GetOptions httpOptions = blob2ObjectGetOptions.apply(options); MutableBlobMetadata metadata = objectToBlobMetadata.apply(gcsObject); Blob blob = new BlobImpl(metadata); // TODO: Does getObject not get the payload?! Payload payload = api.getObjectApi().download(container, Strings2.urlEncode(name), httpOptions).getPayload(); payload.setContentMetadata(metadata.getContentMetadata()); // Doing this first retains it on setPayload. blob.setPayload(payload); return blob; }
@Override public Blob getBlob(String container, String name, GetOptions options) { GoogleCloudStorageObject gcsObject = api.getObjectApi().getObject(container, Strings2.urlEncode(name)); if (gcsObject == null) { return null; } org.jclouds.http.options.GetOptions httpOptions = blob2ObjectGetOptions.apply(options); MutableBlobMetadata metadata = objectToBlobMetadata.apply(gcsObject); Blob blob = new BlobImpl(metadata); // TODO: Does getObject not get the payload?! Payload payload = api.getObjectApi().download(container, Strings2.urlEncode(name), httpOptions).getPayload(); payload.setContentMetadata(metadata.getContentMetadata()); // Doing this first retains it on setPayload. blob.setPayload(payload); return blob; }
@Override public Blob getBlob(String container, String name, GetOptions options) { GoogleCloudStorageObject gcsObject = api.getObjectApi().getObject(container, Strings2.urlEncode(name)); if (gcsObject == null) { return null; } org.jclouds.http.options.GetOptions httpOptions = blob2ObjectGetOptions.apply(options); MutableBlobMetadata metadata = objectToBlobMetadata.apply(gcsObject); Blob blob = new BlobImpl(metadata); // TODO: Does getObject not get the payload?! Payload payload = api.getObjectApi().download(container, Strings2.urlEncode(name), httpOptions).getPayload(); payload.setContentMetadata(metadata.getContentMetadata()); // Doing this first retains it on setPayload. blob.setPayload(payload); return blob; }