Search in sources :

Example 1 with AddNotificationRequest

use of com.cmput301w18t05.taskzilla.request.command.AddNotificationRequest in project Taskzilla by CMPUT301W18T05.

the class NotificationManager method sendNotification.

/**
 *  This method invokes a request to the requestmanager which inserts the notification to the
 *  elasticsearch server
 *
 * @param notification  Notification to be inserted
 * @see   AddNotificationRequest
 */
public void sendNotification(Notification notification) {
    AddNotificationRequest task = new AddNotificationRequest(notification);
    RequestManager.getInstance().invokeRequest(task);
}
Also used : AddNotificationRequest(com.cmput301w18t05.taskzilla.request.command.AddNotificationRequest)

Example 2 with AddNotificationRequest

use of com.cmput301w18t05.taskzilla.request.command.AddNotificationRequest in project Taskzilla by CMPUT301W18T05.

the class Notification method acknowledge.

/**
 *  If the notification is new, it is set to acknowledge to next time there wont be a
 *  heads up notification shown.
 *
 *  @see NotificationManager
 */
public void acknowledge() {
    if (id == null)
        return;
    this.acknowledged = true;
    AddNotificationRequest task = new AddNotificationRequest(this);
    RequestManager.getInstance().invokeRequest(task);
}
Also used : AddNotificationRequest(com.cmput301w18t05.taskzilla.request.command.AddNotificationRequest)

Aggregations

AddNotificationRequest (com.cmput301w18t05.taskzilla.request.command.AddNotificationRequest)2