aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-core/src/main/java/org/openecomp/sdc/notification/services/impl/SubscriptionServiceImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-core/src/main/java/org/openecomp/sdc/notification/services/impl/SubscriptionServiceImpl.java')
-rw-r--r--openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-core/src/main/java/org/openecomp/sdc/notification/services/impl/SubscriptionServiceImpl.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-core/src/main/java/org/openecomp/sdc/notification/services/impl/SubscriptionServiceImpl.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-core/src/main/java/org/openecomp/sdc/notification/services/impl/SubscriptionServiceImpl.java
new file mode 100644
index 0000000000..2a12463fae
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-core/src/main/java/org/openecomp/sdc/notification/services/impl/SubscriptionServiceImpl.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.notification.services.impl;
+
+import org.openecomp.sdc.notification.dao.SubscribersDao;
+import org.openecomp.sdc.notification.services.SubscriptionService;
+
+import java.util.Set;
+
+public class SubscriptionServiceImpl implements SubscriptionService {
+
+ private SubscribersDao subscribersDao;
+
+ public SubscriptionServiceImpl(SubscribersDao subscribersDao) {
+ this.subscribersDao = subscribersDao;
+ }
+
+ @Override
+ public void subscribe(String ownerId, String entityId) {
+ subscribersDao.subscribe(ownerId, entityId);
+ }
+
+ @Override
+ public void unsubscribe(String ownerId, String entityId) {
+ subscribersDao.unsubscribe(ownerId, entityId);
+ }
+
+ @Override
+ public Set<String> getSubscribers(String entityId) {
+ return subscribersDao.getSubscribers(entityId);
+ }
+} \ No newline at end of file