@Entity public class InventoryNotificationImpl extends Object implements InventoryNotification
| Modifier and Type | Field and Description |
|---|---|
protected Date |
date |
protected String |
emailAddress |
protected Long |
id |
protected FulfillmentLocation |
location |
protected Boolean |
processed |
protected org.broadleafcommerce.core.catalog.domain.Sku |
sku |
| Constructor and Description |
|---|
InventoryNotificationImpl() |
| 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. |
protected Long id
protected org.broadleafcommerce.core.catalog.domain.Sku sku
protected FulfillmentLocation location
protected String emailAddress
protected Date date
protected Boolean processed
public void setId(Long id)
InventoryNotificationsetId in interface InventoryNotificationpublic Long getId()
InventoryNotificationgetId in interface InventoryNotificationpublic void setSku(org.broadleafcommerce.core.catalog.domain.Sku sku)
InventoryNotificationSku 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 inventorysetSku in interface InventoryNotificationsku - the Sku from the Broadleaf catalog that the user is subscribing topublic org.broadleafcommerce.core.catalog.domain.Sku getSku()
InventoryNotificationSku that a user has subscribed to receive notifications forgetSku in interface InventoryNotificationSku that the user has requested to receive notifications forpublic FulfillmentLocation getLocation()
InventoryNotificationgetLocation in interface InventoryNotificationpublic void setLocation(FulfillmentLocation location)
InventoryNotificationFulfillmentLocationsetLocation in interface InventoryNotificationlocation - the FulfillmentLocation that the user has specified to receive inventory notifications forpublic String getEmailAddress()
InventoryNotificationSku.
If this is a non-anonymous customer, this will have usually been set to Customer.getEmailAddress()getEmailAddress in interface InventoryNotificationpublic void setEmailAddress(String emailAddress)
InventoryNotificationThe email address used to notify the user that there is inventory available for the given Sku. This is
usually Customer.getEmailAddress()
setEmailAddress in interface InventoryNotificationemailAddress - the address that should be notified that there is new inventorypublic void setDate(Date date)
InventoryNotificationnew Date();setDate in interface InventoryNotificationpublic Date getDate()
InventoryNotificationgetDate in interface InventoryNotificationpublic void setProcessed(boolean processed)
InventoryNotificationWhether 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 InventoryNotification.isProcessed() is true) then this notification should be
to be deleted
setProcessed in interface InventoryNotificationprocessed - if the notification has been processed by the system (which usually means that an email has been
sent out)public boolean isProcessed()
InventoryNotificationisProcessed in interface InventoryNotificationCustomer or {InventoryNotification.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.