Class NotificationEndpoint

java.lang.Object
com.broadleafcommerce.notification.web.endpoint.NotificationEndpoint

@FrameworkRestController @FrameworkMapping("/notifications") public class NotificationEndpoint extends Object
Author:
BroadleafCommerce
  • Field Details

  • Constructor Details

  • Method Details

    • sendNotification

      @Policy(permissionRoots="SEND_NOTIFICATION") @FrameworkPostMapping(value="/sendNotification", consumes="application/json") public NotificationResponse sendNotification(@ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @RequestBody Notification notification)
      Parameters:
      notification -
      contextInfo -
      Returns:
    • createNewNotification

      @Policy(permissionRoots="NOTIFICATION") @FrameworkPostMapping(consumes="application/json") public Notification createNewNotification(@ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestBody Notification notification)
      Creates a brand new Notification.
      Parameters:
      context -
      notification -
      Returns:
    • readNotificationByContextId

      @Policy(permissionRoots="NOTIFICATION") @FrameworkGetMapping("/{id}") public Notification readNotificationByContextId(@PathVariable("id") String id, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Reads an Notification by context ID.
      Parameters:
      id -
      context -
      Returns:
    • updateNotification

      @Policy(permissionRoots="NOTIFICATION") @FrameworkPatchMapping(value="/{id}", consumes="application/json") public Notification updateNotification(@PathVariable("id") String id, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestBody Notification notification)
      Updates an existing Notification.
      Parameters:
      id -
      context -
      notification -
      Returns:
    • deleteNotification

      @Policy(permissionRoots="NOTIFICATION") @FrameworkDeleteMapping("/{id}") public void deleteNotification(@ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id)
      Deletes or archives an existing Notification.
      Parameters:
      context -
      id -
    • getNotificationService

      @NonNull protected NotificationService<Notification> getNotificationService()