Class DefaultNotificationStateService
- java.lang.Object
-
- com.broadleafcommerce.common.messaging.notification.DefaultNotificationStateService
-
- All Implemented Interfaces:
NotificationStateService
public class DefaultNotificationStateService extends Object implements NotificationStateService
Default implementation ofNotificationStateService.- Author:
- Dima Myroniuk (dmyroniuk)
-
-
Constructor Summary
Constructors Constructor Description DefaultNotificationStateService(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NotificationStategetOrInitializeNotificationState(NotificationStateAware stateAware, String name)Search theNotificationStateon theNotificationStateAwareby its name.
-
-
-
Method Detail
-
getOrInitializeNotificationState
public NotificationState getOrInitializeNotificationState(NotificationStateAware stateAware, String name)
Description copied from interface:NotificationStateServiceSearch theNotificationStateon theNotificationStateAwareby its name. If it was not found, a new notification will be created and added toNotificationStateAware.- Specified by:
getOrInitializeNotificationStatein interfaceNotificationStateService- Parameters:
stateAware- a domain that keeps track ofNotificationStatename- the notification name- Returns:
- the notification from the
NotificationStateAwareif found or the new one otherwise
-
-