public class AccessControlList extends HeaderResponse
GranteeInterface
) 分配特定权限(
Permission
)的集合。Modifier and Type | Field and Description |
---|---|
static AccessControlList |
REST_CANNED_AUTHENTICATED_READ
预定义访问策略 授权用户读私有写(authenticated-read)
|
static AccessControlList |
REST_CANNED_BUCKET_OWNER_FULL_CONTROL
预定义访问策略 桶所有者读写对象所有者读写( bucket-owner-full-control)
|
static AccessControlList |
REST_CANNED_BUCKET_OWNER_READ
预定义访问策略 桶所有者读对象所有者读写( bucket-owner-read)
|
static AccessControlList |
REST_CANNED_LOG_DELIVERY_WRITE
预定义访问策略 日志投递组写( log-delivery-write)
|
static AccessControlList |
REST_CANNED_PRIVATE
预定义访问策略 私有读写(private)
|
static AccessControlList |
REST_CANNED_PUBLIC_READ
预定义访问策略 公共读私有写(public-read)
|
static AccessControlList |
REST_CANNED_PUBLIC_READ_DELIVERED
预定义访问策略 桶公共读,桶内对象公共读(public-read-delivered)
|
static AccessControlList |
REST_CANNED_PUBLIC_READ_WRITE
预定义访问策略 公共读写( public-read-write)
|
static AccessControlList |
REST_CANNED_PUBLIC_READ_WRITE_DELIVERED
预定义访问策略 桶公共读写,桶内对象公共读写(public-read-write-delivered)
|
Constructor and Description |
---|
AccessControlList() |
Modifier and Type | Method and Description |
---|---|
GrantAndPermission[] |
getGrantAndPermissions()
获取ACL中的所有权限
|
Set<GrantAndPermission> |
getGrants()
获取ACL中的所有权限
|
Owner |
getOwner()
获取所有者
|
List<Permission> |
getPermissionsForGrantee(GranteeInterface grantee)
获取ACL中指定
GranteeInterface 的权限 |
void |
grantAllPermissions(GrantAndPermission[] grantAndPermissions)
为ACL添加权限组
|
GrantAndPermission |
grantPermission(GranteeInterface grantee,
Permission permission)
为ACL中指定
GranteeInterface 授权特定权限
Permission 。 |
GrantAndPermission |
grantPermission(GranteeInterface grantee,
Permission permission,
boolean delivered)
为ACL中指定
GranteeInterface 授权特定权限
Permission 。 |
boolean |
isDelivered()
获取对象的ACL传递标识
|
void |
setDelivered(boolean delivered)
设置对象的ACL传递标识,只对对象权限有效
|
void |
setOwner(Owner owner)
设置所有者
|
String |
toString() |
getRequestId, getResponseHeaders, getStatusCode
public static final AccessControlList REST_CANNED_PRIVATE
public static final AccessControlList REST_CANNED_PUBLIC_READ
public static final AccessControlList REST_CANNED_PUBLIC_READ_WRITE
public static final AccessControlList REST_CANNED_PUBLIC_READ_DELIVERED
public static final AccessControlList REST_CANNED_PUBLIC_READ_WRITE_DELIVERED
public static final AccessControlList REST_CANNED_AUTHENTICATED_READ
public static final AccessControlList REST_CANNED_BUCKET_OWNER_READ
public static final AccessControlList REST_CANNED_BUCKET_OWNER_FULL_CONTROL
public static final AccessControlList REST_CANNED_LOG_DELIVERY_WRITE
public boolean isDelivered()
public void setDelivered(boolean delivered)
delivered
- ACL传递标识public Owner getOwner()
public void setOwner(Owner owner)
owner
- 所有者public Set<GrantAndPermission> getGrants()
public List<Permission> getPermissionsForGrantee(GranteeInterface grantee)
GranteeInterface
的权限grantee
- 被授权者GranteeInterface
的权限列表public GrantAndPermission grantPermission(GranteeInterface grantee, Permission permission)
GranteeInterface
授权特定权限
Permission
。grantee
- 被授权者permission
- Permission
中定义的权限public GrantAndPermission grantPermission(GranteeInterface grantee, Permission permission, boolean delivered)
GranteeInterface
授权特定权限
Permission
。grantee
- 被授权者permission
- Permission
中定义的权限delivered
- 桶的ACL是否向桶内对象传递public void grantAllPermissions(GrantAndPermission[] grantAndPermissions)
grantAndPermissions
- 权限组public GrantAndPermission[] getGrantAndPermissions()
public String toString()
toString
in class HeaderResponse
Copyright © 2021. All rights reserved.