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:04:48 GMT
> +   @Override
> +   public boolean createContainerInLocation(Location location, String container, CreateContainerOptions
options) {
> +      BucketTemplate template = new BucketTemplate().name(container);
> +      if (location != null) {
> +         org.jclouds.googlecloudstorage.domain.DomainResourceReferences.Location gcsLocation
= org.jclouds.googlecloudstorage.domain.DomainResourceReferences.Location
> +                  .fromValue(location.getId());
> +         template = template.location(gcsLocation);
> +      }
> +      Bucket bucket = api.getBucketApi().createBucket(projectId.get(), template);
> +      if (options.isPublicRead()) {
> +         try {
> +            DefaultObjectAccessControlsTemplate doAclTemplate = new DefaultObjectAccessControlsTemplate().entity(
> +                     "allUsers").role(ObjectRole.READER);
> +            api.getDefaultObjectAccessControlsApi().createDefaultObjectAccessControls(container,
doAclTemplate);
> +         } catch (HttpResponseException e) {
> +            // If DefaultObjectAccessControls operation fail, Reverse create operation
the operation.

[minor] "...reverse the create operation"?

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