@ExperimentalApi public static enum UserManager.UserState extends Enum<UserManager.UserState>
Using the various test methods like isInMultipleDirectories()
and
isValid()
should be preferred over testing for exact matches.
Enum Constant and Description |
---|
INVALID_USER
Indicates that the specified user was not valid, meaning that the directory ID
is invalid, that directory is disabled, or the directory does not have a user
with the specified username.
|
NORMAL_USER
Indicates that there is only a single active user with that username across
all active user directories and shadowing is not relevant for the user.
|
NORMAL_USER_WITH_SHADOW
Indicates that the specified username was first found in the specified directory is active and that there is at least one user with the
same username defined in another directory that is ordered after it, so this
user has a shadow (it is the effective version of the user, and is hiding others).
|
SHADOW_USER
Indicates that an active user with the same name was found in a directory that
currently takes priority over directory and username that were specified, meaning
that the specified user is shadowed by another.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isEffective()
Returns whether or not the user is the same user that would be returned by a
call to
UserManager.getUserByName(String) . |
boolean |
isInMultipleDirectories()
Returns
true if the user is in multiple active user directories, regardless
of whether or not the specified directory ID was the active one. |
boolean |
isValid()
Convenience method that only returns
true for all of the valid user types. |
static UserManager.UserState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static UserManager.UserState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final UserManager.UserState INVALID_USER
public static final UserManager.UserState SHADOW_USER
public static final UserManager.UserState NORMAL_USER
public static final UserManager.UserState NORMAL_USER_WITH_SHADOW
public static UserManager.UserState[] values()
for (UserManager.UserState c : UserManager.UserState.values()) System.out.println(c);
public static UserManager.UserState valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isEffective()
UserManager.getUserByName(String)
. This is, it was the first matching
user found.public boolean isValid()
true
for all of the valid user types.true
if the specified username and directory ID was valid;
false
if the user does not actually existpublic boolean isInMultipleDirectories()
true
if the user is in multiple active user directories, regardless
of whether or not the specified directory ID was the active one.true
if the user is in multiple active user directories; false
if the user is only in one or does not exist at allCopyright © 2002-2019 Atlassian. All Rights Reserved.