java.lang.Object
com.atlassian.confluence.api.model.people.Person
com.atlassian.confluence.api.model.people.User
All Implemented Interfaces:
Subject, Relatable
Direct Known Subclasses:
KnownUser, UnknownUser

public class User extends Person implements Relatable
  • Field Details

    • username

      protected final String username
  • Constructor Details

  • Method Details

    • getUsername

      public String getUsername()
    • optionalUsername

      public Optional<String> optionalUsername()
      Specified by:
      optionalUsername in class Person
    • optionalUserKey

      public Optional<com.atlassian.sal.api.user.UserKey> optionalUserKey()
      Specified by:
      optionalUserKey in class Person
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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