Class UserJsonFacade

java.lang.Object
io.goobi.viewer.api.rest.model.UserJsonFacade

public class UserJsonFacade extends Object
Simplified representation of a User object for json (de-)serialization.
Author:
Florian Alpers
  • Constructor Details

    • UserJsonFacade

      public UserJsonFacade(User user, HttpServletRequest request)
      Parameters:
      user - the user to create the facade from
      request - current HTTP request for resolving avatar URL
    • UserJsonFacade

      public UserJsonFacade(User user)
      Parameters:
      user - the user to create the facade from
    • UserJsonFacade

      public UserJsonFacade(UserJsonFacade orig)
      Parameters:
      orig - the instance to copy all fields from
    • UserJsonFacade

      public UserJsonFacade(Long userId, String name, String avatar, long score, boolean active, boolean suspended, boolean anonymous, boolean superuser)
      Parameters:
      userId - database ID of the user
      name - display name of the user
      avatar - URL of the user's avatar image
      score - gamification score of the user
      active - whether the user account is active
      suspended - whether the user account is suspended
      anonymous - whether the user is an anonymous guest
      superuser - whether the user has superuser privileges
    • UserJsonFacade

      public UserJsonFacade(String name)
      Parameters:
      name - display name for the anonymous user facade
  • Method Details

    • getUserId

      public Long getUserId()
    • getName

      public String getName()
    • getAvatar

      public String getAvatar()
    • getScore

      public long getScore()
    • isActive

      public boolean isActive()
    • isSuspended

      public boolean isSuspended()
    • isAnonymous

      public boolean isAnonymous()
    • isSuperuser

      public boolean isSuperuser()
    • toString

      public String toString()
      Overrides:
      toString in class Object