Class NotificationEndpoint
java.lang.Object
com.broadleafcommerce.notification.web.endpoint.NotificationEndpoint
@FrameworkRestController
@FrameworkMapping("/notifications")
public class NotificationEndpoint
extends Object
- Author:
- BroadleafCommerce
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateNewNotification
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, Notification notification) Creates a brand newNotification
.void
deleteNotification
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id) Deletes or archives an existingNotification
.protected NotificationService<Notification>
readNotificationByContextId
(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Reads anNotification
by context ID.sendNotification
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, Notification notification) updateNotification
(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, Notification notification) Updates an existingNotification
.
-
Field Details
-
NOTIFICATION_LOCATION_URI
- See Also:
-
-
Constructor Details
-
NotificationEndpoint
-
-
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 newNotification
.- 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 anNotification
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 existingNotification
.- 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 existingNotification
.- Parameters:
context
-id
-
-
getNotificationService
-