Class User
- java.lang.Object
-
- com.atlassian.confluence.api.model.people.Person
-
- com.atlassian.confluence.api.model.people.User
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
User.Expansions
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.base.Predicate<User>
isUserKnown
Deprecated.since 8.6.0.static com.google.common.base.Function<User,String>
mapUserToUsername
Deprecated.since 8.6.0.protected String
username
-
Fields inherited from class com.atlassian.confluence.api.model.people.Person
ANONYMOUS_USER_TYPE, KNOWN_USER_TYPE
-
-
Constructor Summary
Constructors Constructor Description User(Icon profilePicture, String username)
Deprecated.since 5.6.User(Icon profilePicture, String username, String displayName, com.atlassian.sal.api.user.UserKey userKey)
User(Icon profilePicture, String username, String displayName, String userKey)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static User
fromUserkey(com.atlassian.sal.api.user.UserKey key)
Creates a user object with only the userkey filled in, suitable for passing to services that accept a User objectstatic User
fromUsername(String username)
Creates a user object with only the username filled in, suitable for passing to services that accept a User objectString
getUsername()
Optional<com.atlassian.sal.api.user.UserKey>
optionalUserKey()
Optional<String>
optionalUsername()
String
toString()
-
Methods inherited from class com.atlassian.confluence.api.model.people.Person
getDisplayName, getOptionalUsername, getProfilePicture, getSubjectType, getUserKey
-
-
-
-
Field Detail
-
username
protected final String username
-
mapUserToUsername
@Deprecated public static final com.google.common.base.Function<User,String> mapUserToUsername
Deprecated.since 8.6.0. No replacement.Creates a user object with only the userkey filled in, suitable for passing to services that accept a User object
-
isUserKnown
@Deprecated public static final com.google.common.base.Predicate<User> isUserKnown
Deprecated.since 8.6.0. No replacement.A predicate that filters out unknown users.
-
-
Constructor Detail
-
User
public User(Icon profilePicture, String username, String displayName, com.atlassian.sal.api.user.UserKey userKey)
-
User
@Deprecated public User(Icon profilePicture, String username)
Deprecated.since 5.6. UseUser(Icon, String, String, UserKey)
instead.
-
-
Method Detail
-
getUsername
public String getUsername()
-
optionalUsername
public Optional<String> optionalUsername()
- Specified by:
optionalUsername
in classPerson
-
optionalUserKey
public Optional<com.atlassian.sal.api.user.UserKey> optionalUserKey()
- Specified by:
optionalUserKey
in classPerson
-
fromUsername
public static User fromUsername(String username)
Creates a user object with only the username filled in, suitable for passing to services that accept a User object
-
fromUserkey
public static User fromUserkey(com.atlassian.sal.api.user.UserKey key)
Creates a user object with only the userkey filled in, suitable for passing to services that accept a User object
-
-