Class User

  • All Implemented Interfaces:
    Recyclable

    public class User
    extends java.lang.Object
    implements Recyclable
    User

    Describes the authenticated User for a request.

    • Constructor Summary

      Constructors 
      Constructor Description
      User()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void copyFrom​(User other)  
      java.lang.String getEmail()
      Email of the logged in user
      java.lang.String getId()
      Identifier of the logged in user, e.g.
      java.lang.String getUsername()
      The username of the logged in user
      boolean hasContent()  
      void resetState()
      resets pooled object state so it can be reused
      User withEmail​(java.lang.String email)
      Email of the logged in user
      User withId​(java.lang.String id)
      Identifier of the logged in user, e.g.
      User withUsername​(java.lang.String username)
      The username of the logged in user
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • User

        public User()
    • Method Detail

      • getId

        @Nullable
        public java.lang.String getId()
        Identifier of the logged in user, e.g. the primary key of the user
      • withId

        public User withId​(@Nullable
                           java.lang.String id)
        Identifier of the logged in user, e.g. the primary key of the user
      • getEmail

        @Nullable
        public java.lang.String getEmail()
        Email of the logged in user
      • withEmail

        public User withEmail​(@Nullable
                              java.lang.String email)
        Email of the logged in user
      • getUsername

        @Nullable
        public java.lang.String getUsername()
        The username of the logged in user
      • withUsername

        public User withUsername​(@Nullable
                                 java.lang.String username)
        The username of the logged in user
      • resetState

        public void resetState()
        Description copied from interface: Recyclable
        resets pooled object state so it can be reused
        Specified by:
        resetState in interface Recyclable
      • copyFrom

        public void copyFrom​(User other)
      • hasContent

        public boolean hasContent()