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 classUser.Expansions
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.base.Predicate<User>isUserKnownA predicate that filters out unknown users.static com.google.common.base.Function<User,String>mapUserToUsernameprotected Stringusername-
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 UserfromUserkey(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 UserfromUsername(String username)Creates a user object with only the username filled in, suitable for passing to services that accept a User objectStringgetUsername()Optional<com.atlassian.sal.api.user.UserKey>optionalUserKey()Optional<String>optionalUsername()StringtoString()-
Methods inherited from class com.atlassian.confluence.api.model.people.Person
getDisplayName, getOptionalUsername, getProfilePicture, getSubjectType, getUserKey
-
-
-
-
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:
optionalUsernamein classPerson
-
optionalUserKey
public Optional<com.atlassian.sal.api.user.UserKey> optionalUserKey()
- Specified by:
optionalUserKeyin 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
-
-