Added oparent to sdc main
[sdc.git] / openecomp-be / lib / openecomp-sdc-notification-lib / openecomp-sdc-notification-api / src / main / java / org / openecomp / sdc / notification / services / NotificationsService.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20 package org.openecomp.sdc.notification.services;
21
22 import org.openecomp.sdc.notification.dao.types.LastSeenNotificationEntity;
23 import org.openecomp.sdc.notification.dao.types.NotificationEntity;
24 import org.openecomp.sdc.notification.dtos.NotificationsStatus;
25 import org.openecomp.sdc.notification.exceptons.NotificationNotExistException;
26
27 import java.util.List;
28 import java.util.UUID;
29
30 /**
31  * @author Avrahamg
32  * @since June 22, 2017
33  */
34 public interface NotificationsService {
35
36         LastSeenNotificationEntity getLastNotification(String ownerId);
37
38         NotificationsStatus getNotificationsStatus(String ownerId, UUID lastDelivered, int numOfRecordsToReturn, UUID endOfPage);
39
40         void updateLastSeenNotification(String ownerId, UUID eventId);
41
42         void markAsRead(String ownerId, String notificationId) throws NotificationNotExistException;
43
44     List<NotificationEntity> getNotificationsByOwnerId(String ownerId, int limit);
45
46     List<NotificationEntity> getNewNotificationsByOwnerId(String ownerId, UUID eventId);
47
48     List<NotificationEntity> getNewNotificationsByOwnerId(String ownerId, UUID eventId, int limit);
49
50 }