Skip to content

Commit

Permalink
Document AclAction and InfoAction run() methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mziccard committed Jun 8, 2016
1 parent 6e859c9 commit 44cb081
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ public String params() {
* @see <a href="https://cloud.google.com/storage/docs/json_api/v1/objects/get">Objects: get</a>
*/
private static class InfoAction extends BlobsAction {

/**
* Gets information for the provided blobs, using the {@code storage} service. If
* {@code blobIds} contains only one blob identity and {@code blobIds[0].name()} is empty, this
* method gets information for the bucket identified by {@code blobIds[0].bucket()}.
*/
@Override
public void run(Storage storage, BlobId... blobIds) {
if (blobIds.length == 1) {
Expand Down Expand Up @@ -565,6 +571,12 @@ public String params() {

private abstract static class AclAction extends StorageAction<Tuple<BlobId, Acl>> {

/**
* Sets the ACL according to the provided {@code params}, using the {@code storage} service. If
* {@code params.x()} returns a complete blob identity, the {@code params.y()} ACL is added to
* the blob. If {@code params.x().name()} is empty, the {@code params.y()} ACL is added to the
* bucket identified by {@code params.x().bucket()}.
*/
@Override
public void run(Storage storage, Tuple<BlobId, Acl> params) {
BlobId blobId = params.x();
Expand Down

0 comments on commit 44cb081

Please sign in to comment.