public class NoOpNotificationFeedManager extends Object implements NotificationFeedManager
NotificationFeedManager used for testing purposes.| Constructor and Description |
|---|
NoOpNotificationFeedManager() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
createFeed(co.cask.cdap.proto.notification.NotificationFeedInfo feed)
Create a notification feed.
|
void |
deleteFeed(co.cask.cdap.proto.id.NotificationFeedId feed)
Deletes the
feed from the manager store. |
co.cask.cdap.proto.notification.NotificationFeedInfo |
getFeed(co.cask.cdap.proto.id.NotificationFeedId feed)
Get a
NotificationFeedId based on the feed.getId() method of the feed argument. |
List<co.cask.cdap.proto.notification.NotificationFeedInfo> |
listFeeds(co.cask.cdap.proto.id.NamespaceId namespace)
List all the
NotificationFeedInfos present in the manager store for a namespace. |
public boolean createFeed(co.cask.cdap.proto.notification.NotificationFeedInfo feed)
throws NotificationFeedException
NotificationFeedManagercreateFeed in interface NotificationFeedManagerfeed - the feed to createtrue if the feed was created successfully; false if the feed already existsNotificationFeedException - if the feed has an incorrect structure;
for example, if it is missing a name, a namespace or a categorypublic void deleteFeed(co.cask.cdap.proto.id.NotificationFeedId feed)
throws NotificationFeedNotFoundException,
NotificationFeedException
NotificationFeedManagerfeed from the manager store.deleteFeed in interface NotificationFeedManagerfeed - the NotificationFeedId to deleteNotificationFeedNotFoundException - if the feed does not existNotificationFeedException - in case of unforeseen errorpublic co.cask.cdap.proto.notification.NotificationFeedInfo getFeed(co.cask.cdap.proto.id.NotificationFeedId feed)
throws NotificationFeedNotFoundException
NotificationFeedManagerNotificationFeedId based on the feed.getId() method of the feed argument.getFeed in interface NotificationFeedManagerfeed - feed containing the feed Id of the feed to retrieveNotificationFeedId of the feed which ID is the same as feedNotificationFeedNotFoundException - if the feed does not existpublic List<co.cask.cdap.proto.notification.NotificationFeedInfo> listFeeds(co.cask.cdap.proto.id.NamespaceId namespace) throws NotificationFeedException
NotificationFeedManagerNotificationFeedInfos present in the manager store for a namespace.listFeeds in interface NotificationFeedManagernamespace - Id of the namespace to list feeds forNotificationFeedInfos present in the manager storeNotificationFeedException - in case of unforeseen errorCopyright © 2018 Cask Data, Inc. Licensed under the Apache License, Version 2.0.