Package com.kheops.jmap.server.security
Class User
java.lang.Object
com.kheops.jmap.server.security.User
- All Implemented Interfaces:
Serializable
,Comparable<User>
,Principal
This class represents a user.
it implements Principal, Serializable Comparable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Compares this object with the specified object for order.boolean
This method compares names of the user with that of the object instance passed as a paramaterGets the email addressGets the full namegetName()
Returns the username of the current user.Gets the passwordgetUser()
Gets the userint
hashCode()
This method gets hashcode of the user name plus a prefix indicating that it's a user (needed to differentiate it from a group with the same name)boolean
isHidden()
Returns whether this user should be hidden in lists.void
setEmailAddress
(String emailAddress) Sets the email addressvoid
setFullName
(String fullName) Sets the full namevoid
setHidden
(boolean hidden) Sets whether this user should be hidden in lists.void
setPassword
(String password) Sets the passwordtoString()
Overrides the toString method
-
Constructor Details
-
User
Constructor and Implementation
-
-
Method Details
-
getName
Returns the username of the current user. -
getUser
Gets the user- Returns:
- user
-
toString
Overrides the toString method -
getPassword
Gets the password- Returns:
- password
-
getFullName
Gets the full name- Returns:
- fullname
-
getEmailAddress
Gets the email address- Returns:
- emailAddress
-
getUserInfo
-
setFullName
Sets the full name -
setPassword
Sets the password -
setEmailAddress
Sets the email address -
hashCode
public int hashCode()This method gets hashcode of the user name plus a prefix indicating that it's a user (needed to differentiate it from a group with the same name) -
equals
This method compares names of the user with that of the object instance passed as a paramater -
compareTo
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.It overrides the compareTo from the Comparable interface
- Specified by:
compareTo
in interfaceComparable<User>
- Parameters:
user
- the object that is compare to- Returns:
- the corresponding integer value
- See Also:
-
isHidden
public boolean isHidden()Returns whether this user should be hidden in lists.- Returns:
- a boolean which defines if this user is hidden.
-
setHidden
public void setHidden(boolean hidden) Sets whether this user should be hidden in lists.- Parameters:
hidden
- a boolean which defines if this user is hidden.
-