Class UIProjectUserGroupsService
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.ria.web.services.UIProjectUserGroupsService
-
@Component public class UIProjectUserGroupsService extends java.lang.Object
UI Service to handle requests for project user groups.
-
-
Constructor Summary
Constructors Constructor Description UIProjectUserGroupsService(ProjectService projectService, UserGroupService userGroupService, org.springframework.context.MessageSource messageSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
addUserGroupToProject(java.lang.Long projectId, NewMemberRequest request, java.util.Locale locale)
java.util.List<UserGroup>
getAvailableUserGroupsForProject(java.lang.Long projectId, java.lang.String query)
TableResponse<ProjectUserGroupsTableModel>
getUserGroupsForProject(java.lang.Long projectId, TableRequest request)
Get a table page ofProjectUserGroupsTableModel
java.lang.String
removeUserGroupFromProject(long projectId, long groupId, java.util.Locale locale)
java.lang.String
updateUserGroupMetadataRoleOnProject(java.lang.Long projectId, java.lang.Long groupId, java.lang.String metadataRole, java.util.Locale locale)
java.lang.String
updateUserGroupRoleOnProject(java.lang.Long projectId, java.lang.Long groupId, java.lang.String role, java.util.Locale locale)
-
-
-
Constructor Detail
-
UIProjectUserGroupsService
public UIProjectUserGroupsService(ProjectService projectService, UserGroupService userGroupService, org.springframework.context.MessageSource messageSource)
-
-
Method Detail
-
getUserGroupsForProject
public TableResponse<ProjectUserGroupsTableModel> getUserGroupsForProject(java.lang.Long projectId, TableRequest request)
Get a table page ofProjectUserGroupsTableModel
- Parameters:
projectId
- Identifier for aProject
request
-TableRequest
details about the current page of the table- Returns:
TableResponse
-
removeUserGroupFromProject
public java.lang.String removeUserGroupFromProject(long projectId, long groupId, java.util.Locale locale)
-
getAvailableUserGroupsForProject
public java.util.List<UserGroup> getAvailableUserGroupsForProject(java.lang.Long projectId, java.lang.String query)
-
addUserGroupToProject
public java.lang.String addUserGroupToProject(java.lang.Long projectId, NewMemberRequest request, java.util.Locale locale)
-
updateUserGroupRoleOnProject
public java.lang.String updateUserGroupRoleOnProject(java.lang.Long projectId, java.lang.Long groupId, java.lang.String role, java.util.Locale locale) throws UIProjectWithoutOwnerException, UIConstraintViolationException
- Parameters:
projectId
- Identifier for aProject
groupId
- Identifier for anUserGroup
role
- Role to update the user group tolocale
- Current usersLocale
- Returns:
- message to user about the result of the update
- Throws:
UIProjectWithoutOwnerException
- thrown when updating the role will result in the project to have no ownerUIConstraintViolationException
- thrown when updating the project role to owner and the metadata role is not set to the highest level
-
updateUserGroupMetadataRoleOnProject
public java.lang.String updateUserGroupMetadataRoleOnProject(java.lang.Long projectId, java.lang.Long groupId, java.lang.String metadataRole, java.util.Locale locale) throws UIConstraintViolationException
- Parameters:
projectId
- Identifier for aProject
groupId
- Identifier for anUserGroup
metadataRole
- metadata role to update for the grouplocale
- Current usersLocale
- Returns:
- message to user about the result of the update
- Throws:
UIConstraintViolationException
- if a project owners metadata role is set to anything other than the highest level
-
-