Package alpine.model
Interface UserPrincipal
- All Known Implementing Classes:
LdapUser,ManagedUser,OidcUser
public interface UserPrincipal
Defines Alpine UserPrincipal.
- Since:
- 1.0.0
- Author:
- Steve Springett
-
Method Summary
Modifier and TypeMethodDescriptiongetEmail()The email address of the principal.longgetId()The database id of the principal.getName()Use of this method may be necessary to satisfyPrincipalrequirements, but the implementation should not be used and should return the same value asgetUsername().A list of permissions the principal has.getTeams()A list of teams the principal is a member of.The username of the principal.voidSpecifies the email address of the principal.voidsetId(long id) Specifies the database id of the principal.voidsetPermissions(List<Permission> permissions) Specifies the permissions the principal should have.voidSpecifies the teams the principal is a member of.voidsetUsername(String username) Specifies the username of the principal.
-
Method Details
-
getId
long getId()The database id of the principal.- Returns:
- a long of the unique id
-
setId
void setId(long id) Specifies the database id of the principal.- Parameters:
id- a long of the unique id
-
getUsername
String getUsername()The username of the principal.- Returns:
- a String of the username
-
setUsername
Specifies the username of the principal.- Parameters:
username- the username of the principal
-
getEmail
String getEmail()The email address of the principal.- Returns:
- a String of the email address
-
setEmail
Specifies the email address of the principal.- Parameters:
email- the email address of the principal
-
getTeams
A list of teams the principal is a member of.- Returns:
- a List of Team objects
-
setTeams
Specifies the teams the principal is a member of.- Parameters:
teams- a List of Team objects
-
getPermissions
List<Permission> getPermissions()A list of permissions the principal has.- Returns:
- a List of Permissions objects
-
setPermissions
Specifies the permissions the principal should have.- Parameters:
permissions- a List of Permission objects
-
getName
String getName()Use of this method may be necessary to satisfyPrincipalrequirements, but the implementation should not be used and should return the same value asgetUsername().- Returns:
- a String of the username
-