public class ParseRole extends ParseObject
ParseRoles represent groupings of
ParseUsers for the purposes of granting permissions (e.g. specifying a ParseACL
for a ParseObject). Roles are specified by their sets of child users and child roles, all
of which are granted any permissions that the parent role has.DEFAULT_PIN| Constructor and Description |
|---|
ParseRole(String name)
Constructs a new ParseRole with the given name.
|
ParseRole(String name,
ParseACL acl)
Constructs a new ParseRole with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Gets the name of the role.
|
static ParseQuery<ParseRole> |
getQuery()
Gets a
ParseQuery over the Role collection. |
ParseRelation<ParseRole> |
getRoles()
Gets the
ParseRelation for the ParseRoles that are direct children of this
role. |
ParseRelation<ParseUser> |
getUsers()
Gets the
ParseRelation for the ParseUsers 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.
|
protected void |
validateSave() |
add, addAll, addAllUnique, addUnique, containsKey, create, create, createWithoutData, createWithoutData, delete, deleteAll, deleteAllInBackground, deleteAllInBackground, deleteEventually, deleteEventually, deleteInBackground, deleteInBackground, fetch, fetchAll, fetchAllIfNeeded, fetchAllIfNeededInBackground, fetchAllIfNeededInBackground, fetchAllInBackground, fetchAllInBackground, fetchFromLocalDatastore, fetchFromLocalDatastoreInBackground, fetchIfNeeded, fetchIfNeededInBackground, fetchIfNeededInBackground, fetchInBackground, fetchInBackground, get, getACL, getBoolean, getBytes, getClassName, getCreatedAt, getDate, getDouble, getInt, getJSONArray, getJSONObject, getList, getLong, getMap, getNumber, getObjectId, getParseFile, getParseGeoPoint, getParseObject, getParseUser, getRelation, getString, getUpdatedAt, has, hasSameId, increment, increment, isDataAvailable, isDirty, isDirty, keySet, pin, pin, pinAll, pinAll, pinAllInBackground, pinAllInBackground, pinAllInBackground, pinAllInBackground, pinInBackground, pinInBackground, pinInBackground, pinInBackground, refresh, refreshInBackground, registerSubclass, remove, removeAll, save, saveAll, saveAllInBackground, saveAllInBackground, saveEventually, saveEventually, saveInBackground, saveInBackground, setACL, setObjectId, unpin, unpin, unpinAll, unpinAll, unpinAll, unpinAll, unpinAllInBackground, unpinAllInBackground, unpinAllInBackground, unpinAllInBackground, unpinAllInBackground, unpinAllInBackground, unpinAllInBackground, unpinAllInBackground, unpinInBackground, unpinInBackground, unpinInBackground, unpinInBackgroundpublic ParseRole(String name)
name - The name of the Role to create.public void setName(String name)
name - The name of the role.IllegalStateException - if the object has already been saved to the server.public String getName()
public ParseRelation<ParseUser> getUsers()
ParseRelation for the ParseUsers that are direct children of this
role. These users are granted any privileges that this role has been granted (e.g. read or
write access through ACLs). You can add or remove users from the role through this relation.public ParseRelation<ParseRole> getRoles()
ParseRelation for the ParseRoles that are direct children of this
role. These roles' users are granted any privileges that this role has been granted (e.g. read
or write access through ACLs). You can add or remove child roles from this role through this
relation.protected void validateSave()
public void put(String key, Object value)
ParseObjectcamelCaseLikeThis.put in class ParseObjectkey - Keys must be alphanumerical plus underscore, and start with a letter.value - Values may be numerical, String, JSONObject, JSONArray,
JSONObject.NULL, or other ParseObjects. value may not be null.public static ParseQuery<ParseRole> getQuery()
ParseQuery over the Role collection.