Package ghidra.framework.remote
Class User
- java.lang.Object
-
- ghidra.framework.remote.User
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<User>
public class User extends java.lang.Object implements java.lang.Comparable<User>, java.io.Serializable
Container class for the user name and the permission type: READ_ONLY, WRITE, or ADMIN.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
ADMIN
Value corresponding to Administrative permission for a repository user.static java.lang.String
ANONYMOUS_USERNAME
Name associated with anonymous userstatic int
READ_ONLY
Value corresponding to Read-only permission for a repository user.static long
serialVersionUID
static int
WRITE
Value corresponding to Write permission for a repository user.
-
Constructor Summary
Constructors Constructor Description User(java.lang.String name, int permission)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(User other)
boolean
equals(java.lang.Object obj)
java.lang.String
getName()
Returns user id/nameint
getPermissionType()
Returns the permission value assigned this user.int
hashCode()
boolean
hasWritePermission()
Return true if this user has permission of WRITE or ADMIN.boolean
isAdmin()
Returns true if permission is ADMIN.boolean
isReadOnly()
Returns true if permission is READ_ONLY.java.lang.String
toString()
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
ANONYMOUS_USERNAME
public static final java.lang.String ANONYMOUS_USERNAME
Name associated with anonymous user- See Also:
- Constant Field Values
-
READ_ONLY
public static final int READ_ONLY
Value corresponding to Read-only permission for a repository user.- See Also:
- Constant Field Values
-
WRITE
public static final int WRITE
Value corresponding to Write permission for a repository user.- See Also:
- Constant Field Values
-
ADMIN
public static final int ADMIN
Value corresponding to Administrative permission for a repository user.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public java.lang.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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-