public interface InventoryNotification
Customer (or just an anonymous email address) to subscribe to receive notifications
about an out of stock item being back in stock. These records can be queried by a background process that reads these
notifications from the database, checks if there is available inventory and then notifies the subscribing user.| Modifier and Type | Method and Description |
|---|---|
Date |
getDate()
The date in which this notification was created
|
String |
getEmailAddress()
The email address to be used for notifying the user that there is now inventory available for the given
Sku. |
Long |
getId()
Gets the primary key for this entity
|
FulfillmentLocation |
getLocation()
Optional, could return null if this was not set on the original notification request
|
org.broadleafcommerce.core.catalog.domain.Sku |
getSku()
Gets the
Sku that a user has subscribed to receive notifications for |
boolean |
isProcessed()
Whether or not this notification has been sent out to the user.
|
void |
setDate(Date date)
When the user actually subscribed to this notification.
|
void |
setEmailAddress(String emailAddress)
The email address used to notify the user that there is inventory available for the given
Sku. |
void |
setId(Long id)
Sets the primary key for this entity
|
void |
setLocation(FulfillmentLocation location)
Optional, allows the user to further narrow down the criteria for when they want to receive inventory in stock
notifications.
|
void |
setProcessed(boolean processed)
Whether or not this notification was actually sent to the subscribing user.
|
void |
setSku(org.broadleafcommerce.core.catalog.domain.Sku sku)
Required, sets the
Sku from the Broadleaf catalog that the user has requested to listen for inventory
notifications for. |
void setId(Long id)
id - Long getId()
void setSku(org.broadleafcommerce.core.catalog.domain.Sku sku)
Sku from the Broadleaf catalog that the user has requested to listen for inventory
notifications for. This Sku can be used in the email to distinguish to the user which Sku now has
available inventorysku - the Sku from the Broadleaf catalog that the user is subscribing toorg.broadleafcommerce.core.catalog.domain.Sku getSku()
Sku that a user has subscribed to receive notifications forSku that the user has requested to receive notifications forvoid setLocation(FulfillmentLocation location)
FulfillmentLocationlocation - the FulfillmentLocation that the user has specified to receive inventory notifications forFulfillmentLocation getLocation()
void setDate(Date date)
new Date();date - Date getDate()
String getEmailAddress()
Sku.
If this is a non-anonymous customer, this will have usually been set to Customer.getEmailAddress()void setEmailAddress(String emailAddress)
The email address used to notify the user that there is inventory available for the given Sku. This is
usually Customer.getEmailAddress()
emailAddress - the address that should be notified that there is new inventoryvoid setProcessed(boolean processed)
Whether or not this notification was actually sent to the subscribing user. This should be set to true and saved immediately after processing the notification. At time of instantiation this defaults to false.
Once a notification has been sent (and isProcessed() is true) then this notification should be
to be deleted
processed - if the notification has been processed by the system (which usually means that an email has been
sent out)boolean isProcessed()
Customer or {getEmailAddress() has been processed as a result of
processing this notification. If this returns
true then this notification should be deleted so as to not cause notifications to be sent multiple timesCopyright © 2020. All rights reserved.