Package ghidra.framework.remote
Class User
java.lang.Object
ghidra.framework.remote.User
- All Implemented Interfaces:
Serializable
,Comparable<User>
Container class for the user name and the permission type: READ_ONLY,
WRITE, or ADMIN.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Value corresponding to Administrative permission for a repository user.static final String
Name associated with anonymous userstatic final int
Value corresponding to Read-only permission for a repository user.static final long
static final int
Value corresponding to Write permission for a repository user. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
getName()
Returns user id/nameint
Returns the permission value assigned this user.int
hashCode()
boolean
Return true if this user has permission of WRITE or ADMIN.boolean
isAdmin()
Returns true if permission is ADMIN.boolean
Returns true if permission is READ_ONLY.toString()
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
ANONYMOUS_USERNAME
Name associated with anonymous user- See Also:
-
READ_ONLY
public static final int READ_ONLYValue corresponding to Read-only permission for a repository user.- See Also:
-
WRITE
public static final int WRITEValue corresponding to Write permission for a repository user.- See Also:
-
ADMIN
public static final int ADMINValue corresponding to Administrative permission for a repository user.- See Also:
-
-
Constructor Details
-
User
Constructor.- Parameters:
name
- user id/namepermission
- permission value (READ_ONLY, WRITE or ADMIN)
-
-
Method Details
-
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
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<User>
-