Class User

java.lang.Object
ghidra.framework.remote.User
All Implemented Interfaces:
Serializable, Comparable<User>

public class User extends Object implements Comparable<User>, Serializable
Container class for the user name and the permission type: READ_ONLY, WRITE, or ADMIN.
See Also:
  • Field Details

    • serialVersionUID

      public static final long serialVersionUID
      See Also:
    • ANONYMOUS_USERNAME

      public static final String ANONYMOUS_USERNAME
      Name associated with anonymous user
      See Also:
    • READ_ONLY

      public static final int READ_ONLY
      Value corresponding to Read-only permission for a repository user.
      See Also:
    • WRITE

      public static final int WRITE
      Value corresponding to Write permission for a repository user.
      See Also:
    • ADMIN

      public static final int ADMIN
      Value corresponding to Administrative permission for a repository user.
      See Also:
  • Constructor Details

    • User

      public User(String name, int permission)
      Constructor.
      Parameters:
      name - user id/name
      permission - permission value (READ_ONLY, WRITE or ADMIN)
  • Method Details

    • getName

      public String getName()
      Returns user id/name
    • isReadOnly

      public boolean isReadOnly()
      Returns true if permission is READ_ONLY.
    • hasWritePermission

      public boolean hasWritePermission()
      Return true if this user has permission of WRITE or ADMIN.
    • isAdmin

      public boolean isAdmin()
      Returns true if permission is ADMIN.
    • getPermissionType

      public int getPermissionType()
      Returns the permission value assigned this user.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(User other)
      Specified by:
      compareTo in interface Comparable<User>