public final class AVRole extends AVObject
Represents a Role on the AVOSCloud server. AVRoles represent groupings of AVUsers for the purposes of granting permissions (e.g. specifying a AVACL for a AVObject). Roles are specified by their sets of child users and child roles, all of which are granted any permissions that the parent role has.
Roles must have a name (which cannot be changed after creation of the role), and must specify an ACL.
AVObject.AVObjectCreator
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
AVROLE_ENDPOINT |
static java.lang.String |
className |
static Creator |
CREATOR |
CREATED_AT, INVALID_KEYS, OBJECT_ID, UPDATED_AT
构造器和说明 |
---|
AVRole() |
AVRole(java.lang.String name)
Constructs a new AVRole with the given name.
|
AVRole(java.lang.String name,
AVACL acl)
Constructs a new AVRole with the given name.
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getName()
Gets the name of the role.
|
static AVQuery<AVRole> |
getQuery()
Gets a AVQuery over the Role collection.
|
AVRelation |
getRoles()
Gets the AVRelation for the AVRoles that are direct children of this role.
|
AVRelation |
getUsers()
Gets the AVRelation for the AVUsers that are direct children of this role.
|
void |
put(java.lang.String key,
java.lang.Object value)
Add a key-value pair to this object.
|
void |
setName(java.lang.String name)
Sets the name for a role.
|
add, addAll, addAllUnique, addUnique, containsKey, create, createWithoutData, createWithoutData, delete, delete, deleteAll, deleteAllInBackground, deleteEventually, deleteEventually, deleteInBackground, deleteInBackground, deleteInBackground, deleteInBackground, describeContents, equals, fetch, fetch, fetchAll, fetchAllIfNeeded, fetchAllIfNeededInBackground, fetchAllInBackground, fetchIfNeeded, fetchIfNeeded, fetchIfNeededInBackground, fetchIfNeededInBackground, fetchInBackground, fetchInBackground, get, getACL, getAVFile, getAVGeoPoint, getAVObject, getAVObject, getAVUser, getAVUser, getBoolean, getBytes, getClassName, getCreatedAt, getDate, getDouble, getInt, getJSONArray, getJSONObject, getList, getList, getLong, getMap, getNumber, getObjectId, getQuery, getRelation, getString, getUpdatedAt, getUuid, has, hashCode, hasSameId, increment, increment, isDataAvailable, isFetchWhenSave, keySet, parseAVObject, refresh, refresh, refreshInBackground, refreshInBackground, registerSubclass, remove, removeAll, save, save, saveAll, saveAllInBackground, saveAllInBackground, saveEventually, saveEventually, saveFileBeforeSave, saveInBackground, saveInBackground, saveInBackground, saveInBackground, setACL, setFetchWhenSave, setObjectId, toJSONObject, toString, writeToParcel
public static final java.lang.String className
public static final java.lang.String AVROLE_ENDPOINT
public static final transient Creator CREATOR
public AVRole()
public AVRole(java.lang.String name)
name
- The name of the Role to create.public AVRole(java.lang.String name, AVACL acl)
name
- The name of the Role to create.acl
- The ACL for this role. Roles must have an ACL.public java.lang.String getName()
public static AVQuery<AVRole> getQuery()
public AVRelation getRoles()
public AVRelation getUsers()
public void put(java.lang.String key, java.lang.Object value)
public void setName(java.lang.String name)
Sets the name for a role. This value must be set before the role has been saved to the server, and cannot be set once the role has been saved.
A role's name can only contain alphanumeric characters, _, -, and spaces.
name
- The name of the role.Copyright © 2013 AVOS Systems Inc. All Rights Reserved.