java.lang.Object
org.apache.gravitino.dto.authorization.UserDTO
All Implemented Interfaces:
Auditable, User

public class UserDTO extends Object implements User
Represents a User Data Transfer Object (DTO).
  • Constructor Details

    • UserDTO

      protected UserDTO()
      Default constructor for Jackson deserialization.
    • UserDTO

      protected UserDTO(String name, List<String> roles, AuditDTO audit)
      Creates a new instance of UserDTO.
      Parameters:
      name - The name of the User DTO.
      roles - The roles of the User DTO.
      audit - The audit information of the User DTO.
  • Method Details

    • name

      public String name()
      Description copied from interface: User
      The name of the user. It's the identifier of User. It must be unique. Usually the name comes from an external user management system like LDAP, IAM and so on.
      Specified by:
      name in interface User
      Returns:
      The name of the User DTO.
    • roles

      public List<String> roles()
      The roles of the user. A user can have multiple roles. Every role binds several privileges.
      Specified by:
      roles in interface User
      Returns:
      The roles of the user.
    • auditInfo

      public Audit auditInfo()
      Specified by:
      auditInfo in interface Auditable
      Returns:
      The audit information of the User DTO.
    • builder

      public static UserDTO.Builder builder()
      Creates a new Builder for constructing a User DTO.
      Returns:
      A new Builder instance.