Package org.jgrapes.webconsole.base
Class ConsoleUser
java.lang.Object
org.jgrapes.webconsole.base.ConsoleUser
- All Implemented Interfaces:
Principal
A
Principal
representing an identity used by web console
components.Console users are usually not managed. Rather, the information is derived from some authentication system and provided to console components in a way that is independent from a particular authentication strategy.
-
Constructor Summary
ConstructorDescriptionConsoleUser
(String name) Instantiates a new console user with the name also being used as display name.ConsoleUser
(String name, String displayName) Instantiates a new console user. -
Method Summary
Modifier and TypeMethodDescriptionjakarta.mail.Address
email()
Gets the email address.boolean
The name to use when showing the user to humans.getName()
Gets the unique name.int
hashCode()
setEmail
(jakarta.mail.Address email) Sets the email address.toString()
Returns the name followed by the display name in parenthesis.
-
Constructor Details
-
ConsoleUser
Instantiates a new console user.Note that
name
must be unique.- Parameters:
name
- the namedisplayName
- the display name
-
ConsoleUser
Instantiates a new console user with the name also being used as display name.- Parameters:
name
- the name
-
-
Method Details
-
getName
Gets the unique name.Used as key when storing or retrieving user specific information.
-
getDisplayName
The name to use when showing the user to humans.- Returns:
- the display name
-
email
Gets the email address.- Returns:
- the email
-
setEmail
Sets the email address.- Parameters:
email
- the new email
-
hashCode
-
equals
-
toString
Returns the name followed by the display name in parenthesis.
-