Package net.pterodactylus.util.notify

Examples of net.pterodactylus.util.notify.Notification.dismiss()


  protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
    super.processTemplate(request, templateContext);
    String notificationId = request.getHttpRequest().getPartAsStringFailsafe("notification", 36);
    Notification notification = webInterface.getNotifications().getNotification(notificationId);
    if ((notification != null) && notification.isDismissable()) {
      notification.dismiss();
    }
    String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256);
    throw new RedirectException(returnPage);
  }
View Full Code Here


      return createErrorJsonObject("invalid-notification-id");
    }
    if (!notification.isDismissable()) {
      return createErrorJsonObject("not-dismissable");
    }
    notification.dismiss();
    return createSuccessJsonObject();
  }

  /**
   * {@inheritDoc}
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.