本文整理了Java中com.google.cloud.storage.Bucket.getAcl()
方法的一些代码示例,展示了Bucket.getAcl()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bucket.getAcl()
方法的具体详情如下:
包路径:com.google.cloud.storage.Bucket
类名称:Bucket
方法名:getAcl
[英]Returns the ACL entry for the specified entity on this bucket or null if not found.
Example of getting the ACL entry for an entity.
Acl acl = bucket.getAcl(User.ofAllAuthenticatedUsers());
[中]返回此bucket上指定实体的ACL条目,如果未找到,则返回null。
获取实体的ACL项的示例。
Acl acl = bucket.getAcl(User.ofAllAuthenticatedUsers());
代码示例来源:origin: googleapis/google-cloud-java
/** Example of getting the ACL entry for an entity. */
// [TARGET getAcl(Entity)]
public Acl getAcl() {
// [START getAcl]
Acl acl = bucket.getAcl(User.ofAllAuthenticatedUsers());
// [END getAcl]
return acl;
}
代码示例来源:origin: googleapis/google-cloud-java
@Test
public void testGetAcl() throws Exception {
initializeExpectedBucket(4);
expect(storage.getOptions()).andReturn(mockOptions);
expect(storage.getAcl(BUCKET_INFO.getName(), User.ofAllAuthenticatedUsers())).andReturn(ACL);
replay(storage);
initializeBucket();
assertEquals(ACL, bucket.getAcl(User.ofAllAuthenticatedUsers()));
}
代码示例来源:origin: googleapis/google-cloud-java
.build();
assertEquals("b", bucket.getName());
assertEquals(ACLS, bucket.getAcl());
assertEquals(ETAG, bucket.getEtag());
assertEquals(GENERATED_ID, bucket.getGeneratedId());
内容来源于网络,如有侵权,请联系作者删除!