Package alpine.model
Interface UserPrincipal
-
- All Known Implementing Classes:
LdapUser,ManagedUser,OidcUser
public interface UserPrincipalDefines Alpine UserPrincipal.- Since:
- 1.0.0
- Author:
- Steve Springett
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetEmail()The email address of the principal.longgetId()The database id of the principal.StringgetName()Use of this method may be necessary to satisfyPrincipalrequirements, but the implementation should not be used and should return the same value asgetUsername().List<Permission>getPermissions()A list of permissions the principal has.List<Team>getTeams()A list of teams the principal is a member of.StringgetUsername()The username of the principal.voidsetEmail(String email)Specifies 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.voidsetTeams(List<Team> teams)Specifies the teams the principal is a member of.voidsetUsername(String username)Specifies the username of the principal.
-
-
-
Method Detail
-
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
void setUsername(String username)
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
void setEmail(String email)
Specifies the email address of the principal.- Parameters:
email- the email address of the principal
-
getTeams
List<Team> getTeams()
A list of teams the principal is a member of.- Returns:
- a List of Team objects
-
setTeams
void setTeams(List<Team> teams)
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
void setPermissions(List<Permission> permissions)
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
-
-