public final class UserCondition extends Object
Modifier and Type | Class and Description |
---|---|
static class |
UserCondition.MatcherType
Type of matcher this condition represents.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getKey()
Returns the they in the users metadata that is used for evaluating this condition.
|
UserCondition.MatcherType |
getType()
Returns the type of data this condition matches.
|
String |
getValue()
Returns the value that is used when matching users.
|
int |
hashCode() |
static UserCondition |
keyValue(String key,
String value)
Creates a custom permission condition.
|
static UserCondition |
noExistingPermissions()
Creates a condition that will match all users with no permissions for the Realm.
|
String |
toString() |
static UserCondition |
userId(String userId)
Creates a condition for matching, exactly, a users id.
|
static UserCondition |
username(String username)
Creates a condition for matching, exactly, a users username.
|
public static UserCondition username(String username)
username
- exact username to match against.public static UserCondition userId(String userId)
userId
- user id to match against. No wildcards are allowed.SyncUser.getIdentity()
public static UserCondition noExistingPermissions()
The AccessLevel
defined alongside this condition, will also be used as the default access level
for future new users that might be given access to the Realm.
public static UserCondition keyValue(String key, String value)
key
- key to use.value
- value for that field to match.public String getKey()
public String getValue()
public UserCondition.MatcherType getType()