public class AVACL extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
AVACL.Permissions |
| 构造器和说明 |
|---|
AVACL() |
AVACL(AVACL other)
copy constructor
|
AVACL(AVUser owner)
constructor
|
AVACL(HashMap data)
constructor
|
AVACL(JSONObject json) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o) |
Map<String,AVACL.Permissions> |
getPermissionsById()
get permissions by id.
|
boolean |
getPublicReadAccess()
Get whether the public is allowed to read this object.
|
boolean |
getPublicWriteAccess()
Set whether the public is allowed to write this object.
|
boolean |
getReadAccess(AVUser user)
Get whether the given user is *explicitly* allowed to read this object.
|
boolean |
getReadAccess(String userId)
Get whether the given user id is *explicitly* allowed to read this object.
|
boolean |
getRoleReadAccess(String role)
Get whether the given role is *explicitly* allowed to read this object.
|
boolean |
getRoleWriteAccess(String role)
Get whether the given role is *explicitly* allowed to write this object.
|
boolean |
getWriteAccess(AVUser user)
Get whether the given user is *explicitly* allowed to write this object.
|
boolean |
getWriteAccess(String userId)
Get whether the given user id is *explicitly* allowed to write this object.
|
int |
hashCode() |
void |
setPublicReadAccess(boolean allowed)
Set whether the public is allowed to read this object.
|
void |
setPublicWriteAccess(boolean allowed)
Set whether the public is allowed to write this object.
|
void |
setReadAccess(AVUser user,
boolean allowed)
Set whether the given user is allowed to read this object.
|
void |
setReadAccess(String userId,
boolean allowed)
Set whether the given user id is allowed to read this object.
|
void |
setRoleReadAccess(String role,
boolean allowed)
Set whether the given role is allowed to read this object.
|
void |
setRoleWriteAccess(String role,
boolean allowed)
Set whether the given role is allowed to write this object.
|
void |
setWriteAccess(AVUser user,
boolean allowed)
Set whether the given user is allowed to write this object.
|
void |
setWriteAccess(String userId,
boolean allowed)
Set whether the given user id is allowed to write this object.
|
JSONObject |
toJSONObject()
get json object.
|
public AVACL()
public AVACL(JSONObject json)
public AVACL(HashMap data)
data - hash map for acl.public AVACL(AVACL other)
other - other instancepublic AVACL(AVUser owner)
owner - owner with read/write permission.public Map<String,AVACL.Permissions> getPermissionsById()
public JSONObject toJSONObject()
public void setPublicReadAccess(boolean allowed)
allowed - flag to allow.public boolean getPublicReadAccess()
public void setPublicWriteAccess(boolean allowed)
allowed - flag to allowpublic boolean getPublicWriteAccess()
public void setReadAccess(String userId, boolean allowed)
userId - target user id.allowed - flag to allowpublic boolean getReadAccess(String userId)
false, the user may still be able to access it if getPublicReadAccess returns
true or a role that the user belongs to has read access.userId - target user id.public void setWriteAccess(String userId, boolean allowed)
userId - target user id.allowed - flag to allow.public boolean getWriteAccess(String userId)
false, the user may still be able to write it if getPublicWriteAccess returns
true or a role that the user belongs to has write access.userId - target user id.public void setReadAccess(AVUser user, boolean allowed)
user - target user.allowed - flag to allowpublic boolean getReadAccess(AVUser user)
false, the user may still be able to access it if getPublicReadAccess returns
true or a role that the user belongs to has read access.user - target user.public void setWriteAccess(AVUser user, boolean allowed)
user - target user.allowed - flag to allowpublic boolean getWriteAccess(AVUser user)
false, the user may still be able to access it if getPublicWriteAccess returns
true or a role that the user belongs to has write access.user - target user.public void setRoleReadAccess(String role, boolean allowed)
role - target role.allowed - flat to allow.public boolean getRoleReadAccess(String role)
false, the role may still be able to access it if getPublicReadAccess returnsrole - target role.public void setRoleWriteAccess(String role, boolean allowed)
role - target role.allowed - flat to allow.public boolean getRoleWriteAccess(String role)
false, the role may still be able to access it if getPublicWriteAccess returnsrole - target role.Copyright © 2020, 美味书签(北京)信息技术有限公司 All rights reserved.