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 NotificationState
getOrInitializeNotificationState(NotificationStateAware stateAware, String name)
Search theNotificationState
on theNotificationStateAware
by its name.
-
-
-
Method Detail
-
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
-
-