Class NotificationService


  • public class NotificationService
    extends AbstractService
    Service to trigger and manage notifications.
    • Constructor Detail

      • NotificationService

        public NotificationService​(org.springframework.web.client.RestTemplate restTemplate,
                                   GoodDataSettings settings)
      • NotificationService

        @Deprecated
        public NotificationService​(org.springframework.web.client.RestTemplate restTemplate)
        Deprecated.
        use NotificationService(RestTemplate, GoodDataSettings) constructor instead
    • Method Detail

      • triggerEvent

        public void triggerEvent​(Project project,
                                 ProjectEvent event)
        Triggers given project event.
        Parameters:
        project - project of the event
        event - event to trigger
      • createChannel

        public Channel createChannel​(Account account,
                                     Channel channel)
        Create channel for notifications
        Parameters:
        account - to create notifications on
        channel - configuration of channel
        Returns:
        created channel
      • removeChannel

        public void removeChannel​(Channel channel)
        Remove channel
        Parameters:
        channel - to delete
      • createSubscription

        public Subscription createSubscription​(Project project,
                                               Account account,
                                               Subscription subscription)
        Create subscription for notifications
        Parameters:
        project - to create subscription on
        account - to create subscription for
        subscription - to create
        Returns:
        created subscription
      • removeSubscription

        public void removeSubscription​(Subscription subscription)
        Remove subscription
        Parameters:
        subscription - to delete