|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectcom.parse.ParseObject
com.parse.ParseRole
public class ParseRole
Represents a Role on the Parse server. ParseRole
s 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.
Roles must have a name (which cannot be changed after creation of the role), and must specify an
ACL.
Field Summary |
---|
Fields inherited from class com.parse.ParseObject |
---|
DEFAULT_PIN |
Constructor Summary | |
---|---|
ParseRole(String name)
Constructs a new ParseRole with the given name. |
|
ParseRole(String name,
ParseACL acl)
Constructs a new ParseRole with the given name. |
Method Summary | |
---|---|
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 ParseRole s that are direct children of this
role. |
ParseRelation<ParseUser> |
getUsers()
Gets the ParseRelation for the ParseUser s 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()
|
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ParseRole(String name)
name
- The name of the Role to create.public ParseRole(String name, ParseACL acl)
name
- The name of the Role to create.acl
- The ACL for this role. Roles must have an ACL.Method Detail |
---|
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 ParseUser
s 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 ParseRole
s 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)
ParseObject
put
in class ParseObject
key
- 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |