diff options
author | vasraz <vasyl.razinkov@est.tech> | 2021-03-22 15:33:06 +0000 |
---|---|---|
committer | Christophe Closset <christophe.closset@intl.att.com> | 2021-03-24 06:59:47 +0000 |
commit | d378c37fbd1ecec7b43394926f1ca32a695e07de (patch) | |
tree | 5c8a085f8732f980d871d966ac49361644efa698 /openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main | |
parent | a6ae7294ecd336d7e88f915710b08e2658eaee00 (diff) |
Reformat openecomp-be
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-3449
Change-Id: I13e02322f8e00820cc5a1d85752caaeda9bf10d1
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main')
19 files changed, 37 insertions, 86 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/destinationprovider/DestinationProvider.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/destinationprovider/DestinationProvider.java index fb8f3ce0ef..2ece29bdcb 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/destinationprovider/DestinationProvider.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/destinationprovider/DestinationProvider.java @@ -26,5 +26,6 @@ import java.util.List; * @since July 09, 2017 */ public interface DestinationProvider { + List<String> getSubscribers(); } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/LastNotificationDao.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/LastNotificationDao.java index f0bf7e8874..38603f8ac7 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/LastNotificationDao.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/LastNotificationDao.java @@ -17,18 +17,15 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.notification.dao; +import java.util.UUID; import org.openecomp.core.dao.BaseDao; import org.openecomp.sdc.notification.dao.types.LastSeenNotificationEntity; -import java.util.UUID; - public interface LastNotificationDao extends BaseDao<LastSeenNotificationEntity> { - UUID getOwnerLastEventId(String ownerId); - - void persistOwnerLastEventId(String ownerId, UUID eventId); + UUID getOwnerLastEventId(String ownerId); + void persistOwnerLastEventId(String ownerId, UUID eventId); } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/NotificationsDao.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/NotificationsDao.java index 6542d70158..111cfa699d 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/NotificationsDao.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/NotificationsDao.java @@ -17,17 +17,14 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.notification.dao; -import org.openecomp.core.dao.BaseDao; -import org.openecomp.sdc.notification.dao.types.NotificationEntity; -import org.openecomp.sdc.notification.dtos.NotificationsStatus; - import java.util.Collection; import java.util.List; import java.util.UUID; - +import org.openecomp.core.dao.BaseDao; +import org.openecomp.sdc.notification.dao.types.NotificationEntity; +import org.openecomp.sdc.notification.dtos.NotificationsStatus; public interface NotificationsDao extends BaseDao<NotificationEntity> { @@ -43,7 +40,7 @@ public interface NotificationsDao extends BaseDao<NotificationEntity> { NotificationsStatus getNotificationsStatus(String ownerId, UUID lastSeenNotification, int numOfRecordsToReturn, UUID prevLastNotification); - void markNotificationAsRead(String ownerId, Collection<UUID> eventIds); + void markNotificationAsRead(String ownerId, Collection<UUID> eventIds); void createBatch(List<NotificationEntity> notificationEntities); } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/SubscribersDao.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/SubscribersDao.java index 3daf165efc..d0c16e6e7c 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/SubscribersDao.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/SubscribersDao.java @@ -17,15 +17,12 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.notification.dao; +import java.util.Set; import org.openecomp.core.dao.BaseDao; import org.openecomp.sdc.notification.dao.types.SubscribersEntity; -import java.util.Set; - - public interface SubscribersDao extends BaseDao<SubscribersEntity> { void subscribe(String ownerId, String entityId); @@ -33,5 +30,4 @@ public interface SubscribersDao extends BaseDao<SubscribersEntity> { void unsubscribe(String ownerId, String entityId); Set<String> getSubscribers(String entityId); - } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/LastSeenNotificationEntity.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/LastSeenNotificationEntity.java index 97aba63f1c..a09d687c5a 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/LastSeenNotificationEntity.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/LastSeenNotificationEntity.java @@ -13,19 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.openecomp.sdc.notification.dao.types; import com.datastax.driver.mapping.annotations.Column; import com.datastax.driver.mapping.annotations.PartitionKey; import com.datastax.driver.mapping.annotations.Table; - import java.util.UUID; - import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import lombok.ToString; @Data @AllArgsConstructor @@ -34,11 +30,9 @@ import lombok.ToString; public class LastSeenNotificationEntity { public static final String ENTITY_TYPE = "Event Notification"; - @PartitionKey @Column(name = "owner_id") private String ownerId; - @Column(name = "event_id") private UUID lastEventId; } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/NotificationEntity.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/NotificationEntity.java index b45a2a0c7d..a8d631512c 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/NotificationEntity.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/NotificationEntity.java @@ -13,16 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.openecomp.sdc.notification.dao.types; import com.datastax.driver.mapping.annotations.ClusteringColumn; import com.datastax.driver.mapping.annotations.Column; import com.datastax.driver.mapping.annotations.PartitionKey; import com.datastax.driver.mapping.annotations.Table; - import java.util.UUID; - import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -34,24 +31,18 @@ import lombok.NoArgsConstructor; public class NotificationEntity { public static final String ENTITY_TYPE = "Event Notification"; - @PartitionKey @Column(name = "owner_id") private String ownerId; - @Column(name = "read") private boolean read; - @ClusteringColumn @Column(name = "event_id") private UUID eventId; - @Column(name = "event_type") private String eventType; - @Column(name = "event_attributes") private String eventAttributes; - @Column(name = "originator_id") private String originatorId; diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/SubscribersEntity.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/SubscribersEntity.java index b1b80cd135..248c82974e 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/SubscribersEntity.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/SubscribersEntity.java @@ -13,15 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.openecomp.sdc.notification.dao.types; import com.datastax.driver.mapping.annotations.Column; import com.datastax.driver.mapping.annotations.PartitionKey; import com.datastax.driver.mapping.annotations.Table; - import java.util.Set; - import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -35,7 +32,6 @@ public class SubscribersEntity { @PartitionKey @Column(name = "entity_id") private String entityId; - @Column(name = "subscribers") private Set<String> subscribers; } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dtos/NotificationsStatus.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dtos/NotificationsStatus.java index 7532ab9218..152b7b72e7 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dtos/NotificationsStatus.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dtos/NotificationsStatus.java @@ -19,10 +19,9 @@ */ package org.openecomp.sdc.notification.dtos; -import org.openecomp.sdc.notification.dao.types.NotificationEntity; - import java.util.List; import java.util.UUID; +import org.openecomp.sdc.notification.dao.types.NotificationEntity; /** * @author Avrahamg @@ -30,14 +29,13 @@ import java.util.UUID; */ public interface NotificationsStatus { - List<NotificationEntity> getNotifications(); - - List<UUID> getNewEntries(); + List<NotificationEntity> getNotifications(); - UUID getLastScanned(); + List<UUID> getNewEntries(); - UUID getEndOfPage(); + UUID getLastScanned(); - long getNumOfNotSeenNotifications(); + UUID getEndOfPage(); + long getNumOfNotSeenNotifications(); } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/exceptons/NotificationNotExistException.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/exceptons/NotificationNotExistException.java index cb3b8a4b07..7ac7bf81ec 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/exceptons/NotificationNotExistException.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/exceptons/NotificationNotExistException.java @@ -24,12 +24,13 @@ package org.openecomp.sdc.notification.exceptons; * @since July 02, 2017 */ public class NotificationNotExistException extends Exception { - private String message; + private String message; - public NotificationNotExistException(String Message){ + public NotificationNotExistException(String Message) { this(Message, null); } + public NotificationNotExistException(String message, Throwable cause) { super(cause); this.message = message; diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/LastNotificationDaoFactory.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/LastNotificationDaoFactory.java index 6e6f9f063a..26415de8a0 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/LastNotificationDaoFactory.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/LastNotificationDaoFactory.java @@ -17,18 +17,15 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.notification.factories; import org.openecomp.core.factory.api.AbstractComponentFactory; import org.openecomp.core.factory.api.AbstractFactory; import org.openecomp.sdc.notification.dao.LastNotificationDao; - public abstract class LastNotificationDaoFactory extends AbstractComponentFactory<LastNotificationDao> { - public static LastNotificationDaoFactory getInstance() { - return AbstractFactory.getInstance(LastNotificationDaoFactory.class); - } - + public static LastNotificationDaoFactory getInstance() { + return AbstractFactory.getInstance(LastNotificationDaoFactory.class); + } } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/NotificationPropagationManagerFactory.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/NotificationPropagationManagerFactory.java index 134920635e..9286dc700f 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/NotificationPropagationManagerFactory.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/NotificationPropagationManagerFactory.java @@ -25,10 +25,7 @@ import org.openecomp.sdc.notification.services.NotificationPropagationManager; public abstract class NotificationPropagationManagerFactory extends AbstractComponentFactory<NotificationPropagationManager> { - public static NotificationPropagationManagerFactory getInstance() { return AbstractFactory.getInstance(NotificationPropagationManagerFactory.class); } - - } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/NotificationsDaoFactory.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/NotificationsDaoFactory.java index 341af7e296..82c7ba15b3 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/NotificationsDaoFactory.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/NotificationsDaoFactory.java @@ -17,18 +17,15 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.notification.factories; import org.openecomp.core.factory.api.AbstractComponentFactory; import org.openecomp.core.factory.api.AbstractFactory; import org.openecomp.sdc.notification.dao.NotificationsDao; - public abstract class NotificationsDaoFactory extends AbstractComponentFactory<NotificationsDao> { - public static NotificationsDaoFactory getInstance() { - return AbstractFactory.getInstance(NotificationsDaoFactory.class); - } - + public static NotificationsDaoFactory getInstance() { + return AbstractFactory.getInstance(NotificationsDaoFactory.class); + } } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/NotificationsServiceFactory.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/NotificationsServiceFactory.java index eab26188c1..2b94de31f6 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/NotificationsServiceFactory.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/NotificationsServiceFactory.java @@ -17,18 +17,15 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.notification.factories; import org.openecomp.core.factory.api.AbstractComponentFactory; import org.openecomp.core.factory.api.AbstractFactory; import org.openecomp.sdc.notification.services.NotificationsService; - public abstract class NotificationsServiceFactory extends AbstractComponentFactory<NotificationsService> { - public static NotificationsServiceFactory getInstance() { - return AbstractFactory.getInstance(NotificationsServiceFactory.class); - } - + public static NotificationsServiceFactory getInstance() { + return AbstractFactory.getInstance(NotificationsServiceFactory.class); + } } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/PropagationServiceFactory.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/PropagationServiceFactory.java index 7a20e985e3..0859f45db5 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/PropagationServiceFactory.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/PropagationServiceFactory.java @@ -25,10 +25,7 @@ import org.openecomp.sdc.notification.services.PropagationService; public abstract class PropagationServiceFactory extends AbstractComponentFactory<PropagationService> { - public static PropagationServiceFactory getInstance() { return AbstractFactory.getInstance(PropagationServiceFactory.class); } - - } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/SubscribersDaoFactory.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/SubscribersDaoFactory.java index 33b62e2f5d..07cbd8cbd9 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/SubscribersDaoFactory.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/SubscribersDaoFactory.java @@ -17,18 +17,15 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.notification.factories; import org.openecomp.core.factory.api.AbstractComponentFactory; import org.openecomp.core.factory.api.AbstractFactory; import org.openecomp.sdc.notification.dao.SubscribersDao; - public abstract class SubscribersDaoFactory extends AbstractComponentFactory<SubscribersDao> { public static SubscribersDaoFactory getInstance() { return AbstractFactory.getInstance(SubscribersDaoFactory.class); } - } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/SubscriptionServiceFactory.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/SubscriptionServiceFactory.java index 3e789c22a7..26b045f27a 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/SubscriptionServiceFactory.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/factories/SubscriptionServiceFactory.java @@ -17,18 +17,15 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.notification.factories; import org.openecomp.core.factory.api.AbstractComponentFactory; import org.openecomp.core.factory.api.AbstractFactory; import org.openecomp.sdc.notification.services.SubscriptionService; - public abstract class SubscriptionServiceFactory extends AbstractComponentFactory<SubscriptionService> { public static SubscriptionServiceFactory getInstance() { return AbstractFactory.getInstance(SubscriptionServiceFactory.class); } - } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/services/NotificationPropagationManager.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/services/NotificationPropagationManager.java index 9912990084..6fa9e52dc0 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/services/NotificationPropagationManager.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/services/NotificationPropagationManager.java @@ -26,6 +26,8 @@ import org.openecomp.sdc.notification.dtos.Event; * @since July 09, 2017 */ public interface NotificationPropagationManager { - void notifySubscribers(Event event, String ... excludedSubscribers); + + void notifySubscribers(Event event, String... excludedSubscribers); + void directNotification(Event event, String destinationId); } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/services/NotificationsService.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/services/NotificationsService.java index 9990f6dc2e..aca8eacde3 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/services/NotificationsService.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/services/NotificationsService.java @@ -19,32 +19,30 @@ */ package org.openecomp.sdc.notification.services; +import java.util.List; +import java.util.UUID; import org.openecomp.sdc.notification.dao.types.LastSeenNotificationEntity; import org.openecomp.sdc.notification.dao.types.NotificationEntity; import org.openecomp.sdc.notification.dtos.NotificationsStatus; import org.openecomp.sdc.notification.exceptons.NotificationNotExistException; -import java.util.List; -import java.util.UUID; - /** * @author Avrahamg * @since June 22, 2017 */ public interface NotificationsService { - LastSeenNotificationEntity getLastNotification(String ownerId); + LastSeenNotificationEntity getLastNotification(String ownerId); - NotificationsStatus getNotificationsStatus(String ownerId, UUID lastDelivered, int numOfRecordsToReturn, UUID endOfPage); + NotificationsStatus getNotificationsStatus(String ownerId, UUID lastDelivered, int numOfRecordsToReturn, UUID endOfPage); - void updateLastSeenNotification(String ownerId, UUID eventId); + void updateLastSeenNotification(String ownerId, UUID eventId); - void markAsRead(String ownerId, String notificationId) throws NotificationNotExistException; + void markAsRead(String ownerId, String notificationId) throws NotificationNotExistException; List<NotificationEntity> getNotificationsByOwnerId(String ownerId, int limit); List<NotificationEntity> getNewNotificationsByOwnerId(String ownerId, UUID eventId); List<NotificationEntity> getNewNotificationsByOwnerId(String ownerId, UUID eventId, int limit); - } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/services/SubscriptionService.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/services/SubscriptionService.java index a0b1721796..35aa5c6924 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/services/SubscriptionService.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/services/SubscriptionService.java @@ -26,6 +26,7 @@ import java.util.Set; * @since July 09, 2017 */ public interface SubscriptionService { + void subscribe(String ownerId, String entityId); void unsubscribe(String ownerId, String entityId); |