Class UIProjectSubscriptionService


  • @Component
    public class UIProjectSubscriptionService
    extends java.lang.Object
    A utility class for formatting responses for the project subscriptions page UI.
    • Constructor Detail

    • 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 the ProjectSubscription
        subscribe - - whether to subscribe or unsubscribe the user to/from the project
        locale - - 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 for
        tableRequest - - details about the current page of the table requested
        Returns:
        all project subscriptions for a specific user