diff --git a/at_client/src/main/java/org/atsign/client/api/impl/clients/NotificationServiceImpl.java b/at_client/src/main/java/org/atsign/client/api/impl/clients/NotificationServiceImpl.java new file mode 100644 index 00000000..7d9d6f6e --- /dev/null +++ b/at_client/src/main/java/org/atsign/client/api/impl/clients/NotificationServiceImpl.java @@ -0,0 +1,65 @@ +package org.atsign.client.api.impl.clients; + +import java.util.List; +import java.util.concurrent.CompletableFuture; + + +import org.atsign.client.api.AtClient; +import org.atsign.client.api.notification.AtNotification; +import org.atsign.client.api.notification.NotificationParams; +import org.atsign.client.api.notification.NotificationResult; +import org.atsign.client.api.notification.NotificationService; +import org.atsign.client.util.AtClientValidation; +import org.atsign.common.AtSign; +import org.atsign.common.NotificationStatus; + +public class NotificationServiceImpl implements NotificationService { + + private final AtClient atClient; + + public NotificationServiceImpl(AtClient atClient) { + this.atClient = atClient; + } + + @Override + public CompletableFuture subscribe(String regex, boolean shouldDecrypt) { + throw new IllegalCallerException("Not implemented yet"); + } + + @Override + + public CompletableFuture notify(NotificationParams params) { + + return CompletableFuture.supplyAsync(() -> { + NotificationResult result = new NotificationResult(params.getNotificationId(), params.getAtKey(), NotificationStatus.undelivered); + if(params.getAtKey().sharedBy == null) { + params.getAtKey().sharedBy = atClient.getAtSign(); + } + + return result; + }); + + + } + + @Override + public CompletableFuture getStatus(String notificationId) { + throw new IllegalCallerException("Not implemented yet"); + } + + @Override + public CompletableFuture> notifyList() { + throw new IllegalCallerException("Not implemented yet"); + } + + @Override + public CompletableFuture notifyDelete(String notificationId) { + throw new IllegalCallerException("Not implemented yet"); + } + + @Override + public CompletableFuture notifyDeleteAll() { + throw new IllegalCallerException("Not implemented yet"); + } + +}