Package org.apache.archiva.redback.rbac
Interface UserAssignment
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractUserAssignment
,JpaUserAssignment
,MemoryUserAssignment
public interface UserAssignment extends Serializable
UserAssignment - This the mapping object that takes the principal for a user and associates it with a set of Roles. This is the many to many mapping object needed by persistence stores.- Author:
- Jesse McConnell, Joakim Erdfelt TODO expand on javadoc
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addRoleId(String roleId)
Adds a role id to this assignmentvoid
addRoleId(Role role)
void
addRoleName(String roleName)
Add a rolename to this assignment.void
addRoleName(Role role)
Add a rolename to this assignment.String
getPrincipal()
The principal for the User that the set of roles is associated with.List<String>
getRoleIds()
List<String>
getRoleNames()
Get the roles for this user.boolean
isPermanent()
Test to see if the object is a permanent object or not.void
removeRoleId(String roleId)
void
removeRoleId(Role role)
void
removeRoleName(String roleName)
Remove a role name from this assignment.void
removeRoleName(Role role)
Remove a rolename from this assignment.void
setPermanent(boolean permanent)
Set flag indicating if the object is a permanent object or not.void
setPrincipal(String principal)
Set the user principal object for this association.void
setRoleIds(List<String> roles)
void
setRoleNames(List<String> roles)
Set the roles names for this user.
-
-
-
Method Detail
-
getPrincipal
String getPrincipal()
The principal for the User that the set of roles is associated with. NOTE: This field is considered the Primary Key for this object.- Returns:
- the principal for the User.
-
getRoleNames
List<String> getRoleNames()
Get the roles for this user.- Returns:
- List of <
String
> objects representing the Role Names.
-
getRoleIds
List<String> getRoleIds()
-
addRoleName
void addRoleName(Role role)
Add a rolename to this assignment.- Parameters:
role
- the role.
-
addRoleName
void addRoleName(String roleName)
Add a rolename to this assignment.- Parameters:
roleName
- the role name.
-
removeRoleName
void removeRoleName(Role role)
Remove a rolename from this assignment.- Parameters:
role
- the role who's name is to be removed.
-
removeRoleName
void removeRoleName(String roleName)
Remove a role name from this assignment.- Parameters:
roleName
- the role name to be removed.
-
removeRoleId
void removeRoleId(Role role)
-
removeRoleId
void removeRoleId(String roleId)
-
setPrincipal
void setPrincipal(String principal)
Set the user principal object for this association. NOTE: This field is considered the Primary Key for this object.- Parameters:
principal
-
-
setRoleNames
void setRoleNames(List<String> roles)
Set the roles names for this user.- Parameters:
roles
- the List of <String
> objects representing the Role Names.
-
setRoleIds
void setRoleIds(List<String> roles)
-
isPermanent
boolean isPermanent()
Test to see if the object is a permanent object or not.- Returns:
- true if the object is permanent.
-
setPermanent
void setPermanent(boolean permanent)
Set flag indicating if the object is a permanent object or not.- Parameters:
permanent
- true if the object is permanent.
-
-