Class DefaultNotificationStateService
java.lang.Object
com.broadleafcommerce.common.messaging.notification.DefaultNotificationStateService
- All Implemented Interfaces:
NotificationStateService
Default implementation of
NotificationStateService
.- Author:
- Dima Myroniuk (dmyroniuk)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultNotificationStateService
(com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptiongetOrInitializeNotificationState
(NotificationStateAware stateAware, String name) Search theNotificationState
on theNotificationStateAware
by its name.
-
Constructor Details
-
DefaultNotificationStateService
public DefaultNotificationStateService(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
getOrInitializeNotificationState
public NotificationState getOrInitializeNotificationState(NotificationStateAware stateAware, String name) Description copied from interface:NotificationStateService
Search theNotificationState
on theNotificationStateAware
by its name. If it was not found, a new notification will be created and added toNotificationStateAware
.- Specified by:
getOrInitializeNotificationState
in interfaceNotificationStateService
- Parameters:
stateAware
- a domain that keeps track ofNotificationState
name
- the notification name- Returns:
- the notification from the
NotificationStateAware
if found or the new one otherwise
-