jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds-labs-google] JCLOUDS-458:Added Blobstore Abstraction (#48)
Date Sat, 20 Sep 2014 03:13:43 GMT
> +      GCSObject gcsObject = api.getObjectApi().getObject(container, name);
> +      if (gcsObject == null) {
> +         return null;
> +      }
> +      Blob blob = new BlobBuilderImpl().payload(impl.getPayload()).payload(impl.getPayload())
> +               .contentType(gcsObject.getContentType()).contentDisposition(gcsObject.getContentDisposition())
> +               .contentEncoding(gcsObject.getContentEncoding()).contentLanguage(gcsObject.getContentLanguage())
> +               .contentLength(gcsObject.getSize()).contentMD5(gcsObject.getMd5HashCode()).name(gcsObject.getName())
> +               .userMetadata(gcsObject.getAllMetadata()).build();
> +      blob.getMetadata().setContainer(container);
> +      blob.getMetadata().setLastModified(gcsObject.getUpdated());
> +      blob.getMetadata().setETag(gcsObject.getEtag());
> +      blob.getMetadata().setPublicUri(gcsObject.getMediaLink());
> +      blob.getMetadata().setUserMetadata(gcsObject.getAllMetadata());
> +      blob.getMetadata().setUri(gcsObject.getSelfLink());
> +      blob.getMetadata().setId(gcsObject.getId());

This conversion code looks like it might be good to have in an injected function..?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/48/files#r17817515
Mime
View raw message