Interface GroupRoleProvider
- All Superinterfaces:
org.opencastproject.security.api.GroupProvider,org.opencastproject.security.api.RoleProvider
- All Known Implementing Classes:
JpaGroupRoleProvider
public interface GroupRoleProvider
extends org.opencastproject.security.api.GroupProvider, org.opencastproject.security.api.RoleProvider
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddGroup(org.opencastproject.security.impl.jpa.JpaGroup group) Adds or updates a group to the persistence.Iterator<org.opencastproject.security.api.Group> Getting all groupsList<org.opencastproject.security.api.Role> getRolesForGroup(String groupName) List<org.opencastproject.security.api.Role> getRolesForUser(String userName) voidUpdate a groupvoidupdateGroupMembershipFromRoles(String userName, String orgId, List<String> roleList) Updates a user's group membershipMethods inherited from interface org.opencastproject.security.api.RoleProvider
findRoles
-
Method Details
-
getRolesForUser
- Specified by:
getRolesForUserin interfaceorg.opencastproject.security.api.RoleProvider- See Also:
-
getRolesForGroup
- Specified by:
getRolesForGroupin interfaceorg.opencastproject.security.api.GroupProvider- See Also:
-
getOrganization
String getOrganization()- Specified by:
getOrganizationin interfaceorg.opencastproject.security.api.RoleProvider- See Also:
-
updateGroupMembershipFromRoles
Updates a user's group membership- Parameters:
userName- the usernameorgId- the user's organizationroleList- the list of group role names
-
addGroup
void addGroup(org.opencastproject.security.impl.jpa.JpaGroup group) throws org.opencastproject.security.api.UnauthorizedException Adds or updates a group to the persistence.- Parameters:
group- the group to add- Throws:
org.opencastproject.security.api.UnauthorizedException
-
getGroups
Iterator<org.opencastproject.security.api.Group> getGroups()Getting all groups- Returns:
- Iterator<Group> persisted groups
-
updateGroup
void updateGroup(String groupId, String name, String description, String roles, String users) throws org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedException Update a group- Parameters:
groupId- the id of the group to updatename- the name to updatedescription- the description to updateroles- the roles to updateusers- the users to update- Throws:
org.opencastproject.util.NotFoundException- if the group is not foundorg.opencastproject.security.api.UnauthorizedException- if the user does not have rights to update the group
-