Package com.gooddata.notification
Class NotificationService
- java.lang.Object
-
- com.gooddata.AbstractService
-
- com.gooddata.notification.NotificationService
-
public class NotificationService extends AbstractService
Service to trigger and manage notifications.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.gooddata.AbstractService
AbstractService.OutputStreamResponseExtractor
-
-
Field Summary
-
Fields inherited from class com.gooddata.AbstractService
mapper, restTemplate
-
-
Constructor Summary
Constructors Constructor Description NotificationService(org.springframework.web.client.RestTemplate restTemplate)Deprecated.use NotificationService(RestTemplate, GoodDataSettings) constructor insteadNotificationService(org.springframework.web.client.RestTemplate restTemplate, GoodDataSettings settings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChannelcreateChannel(Account account, Channel channel)Create channel for notificationsSubscriptioncreateSubscription(Project project, Account account, Subscription subscription)Create subscription for notificationsvoidremoveChannel(Channel channel)Remove channelvoidremoveSubscription(Subscription subscription)Remove subscriptionvoidtriggerEvent(Project project, ProjectEvent event)Triggers given project event.-
Methods inherited from class com.gooddata.AbstractService
extractData
-
-
-
-
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 eventevent- event to trigger
-
createChannel
public Channel createChannel(Account account, Channel channel)
Create channel for notifications- Parameters:
account- to create notifications onchannel- 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 onaccount- to create subscription forsubscription- to create- Returns:
- created subscription
-
removeSubscription
public void removeSubscription(Subscription subscription)
Remove subscription- Parameters:
subscription- to delete
-
-