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, AVObject.Hook| Modifier and Type | Field and Description |
|---|---|
static String |
className |
acl, CREATED_AT, createdAt, CREATOR, INVALID_KEYS, OBJECT_ID, objectId, requestStatistic, UPDATED_AT, updatedAt| Constructor and Description |
|---|
AVRole() |
AVRole(String name)
Constructs a new AVRole with the given name.
|
AVRole(String name,
AVACL acl)
Constructs a new AVRole with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
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(String key,
Object value)
Add a key-value pair to this object.
|
void |
setName(String name)
Sets the name for a role.
|
add, addAll, addAllUnique, addUnique, alwaysSaveAllKeyValues, alwaysUsePost, buildBatchParameterForNonSavedObject, cast, containsKey, copyFromJson, copyFromMap, create, createWithoutData, createWithoutData, delete, delete, deleteAll, deleteAllInBackground, deleteEventually, deleteEventually, deleteInBackground, deleteInBackground, deleteInBackground, deleteInBackground, describeContents, disableAfterHook, disableBeforeHook, 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, headerMap, ignoreHook, increment, increment, internalClassName, internalId, isDataAvailable, isFetchWhenSave, keySet, onDataSynchronized, onSaveFailure, onSaveSuccess, parseAVObject, put, rebuildInstanceData, refresh, refresh, refreshInBackground, refreshInBackground, registerSubclass, remove, removeAll, save, save, saveAll, saveAllInBackground, saveAllInBackground, saveEventually, saveEventually, saveFileBeforeSave, saveInBackground, saveInBackground, saveInBackground, saveInBackground, setACL, setFetchWhenSave, setObjectId, shouldThrowException, toJSONObject, toString, writeToParcelpublic static final String className
public AVRole()
public AVRole(String name)
name - The name of the Role to create.public String getName()
public static AVQuery<AVRole> getQuery()
public AVRelation getRoles()
public AVRelation getUsers()
public void put(String key, Object value)
public void setName(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 © 2017. All rights reserved.