Class UIProjectSubscriptionService
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.ria.web.services.UIProjectSubscriptionService
-
@Component public class UIProjectSubscriptionService extends java.lang.Object
A utility class for formatting responses for the project subscriptions page UI.
-
-
Constructor Summary
Constructors Constructor Description UIProjectSubscriptionService(ProjectSubscriptionService projectSubscriptionService, UserService userService, ProjectService projectService, org.springframework.context.MessageSource messageSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TableResponse<UserProjectDetailsModel>
getProjectSubscriptionsForUser(java.lang.Long userId, TableRequest tableRequest)
Get all the project subscriptions associated with a userjava.lang.String
updateProjectSubscription(java.lang.Long id, boolean subscribe, java.util.Locale locale)
Update an existing project subscription
-
-
-
Constructor Detail
-
UIProjectSubscriptionService
@Autowired public UIProjectSubscriptionService(ProjectSubscriptionService projectSubscriptionService, UserService userService, ProjectService projectService, org.springframework.context.MessageSource messageSource)
-
-
Method Detail
-
updateProjectSubscription
@Transactional public java.lang.String updateProjectSubscription(java.lang.Long id, boolean subscribe, java.util.Locale locale) throws UIEntityNotFoundException
Update an existing project subscription- Parameters:
id
- - the identifier of theProjectSubscription
subscribe
- - whether to subscribe or unsubscribe the user to/from the projectlocale
- -Locale
of the current user.- Returns:
- a message to user about the result of the update
- Throws:
UIEntityNotFoundException
- if there is an error updating the project subscription
-
getProjectSubscriptionsForUser
public TableResponse<UserProjectDetailsModel> getProjectSubscriptionsForUser(java.lang.Long userId, TableRequest tableRequest)
Get all the project subscriptions associated with a user- Parameters:
userId
- - the id for the user to show project subscriptions fortableRequest
- - details about the current page of the table requested- Returns:
- all project subscriptions for a specific user
-
-