Class ChangeDetailPruningPersistenceMessageAckedHandler
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.core.messaging.ChangeDetailPruningPersistenceMessageAckedHandler
-
- All Implemented Interfaces:
com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
,com.broadleafcommerce.common.messaging.PersistenceMessageAckedHandler
,org.springframework.core.Ordered
public class ChangeDetailPruningPersistenceMessageAckedHandler extends Object implements com.broadleafcommerce.common.messaging.PersistenceMessageAckedHandler
This component prunes the change details from production-levelTrackable
entities following successful acknowledgement of thePersistenceMessage
's notification state.For sandboxable entities, the
Tracking.getLevel()
must beTrackingLevel.PRODUCTION
. All non-sandboxable entities are implicitly considered production-level.- Author:
- Samarth Dhruva (samarthd)
-
-
Constructor Summary
Constructors Constructor Description ChangeDetailPruningPersistenceMessageAckedHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterSuccessfulAcknowledgement(Object nativeId, com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware notificationStateAware, com.broadleafcommerce.common.messaging.notification.NotificationStateRepository repository)
String
getDataRoutePartition()
protected boolean
isProductionLevel(Trackable trackable)
protected boolean
isSandboxableEntity(Trackable trackable, TrackableBehaviorUtil trackableBehaviorUtil)
protected boolean
isTrackable(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware notificationStateAware)
protected boolean
isTrackableRepository(com.broadleafcommerce.common.messaging.notification.NotificationStateRepository repository)
protected void
pruneChangeDetails(Object nativeEntityId, TrackableRepository<Trackable> repository)
-
-
-
Method Detail
-
afterSuccessfulAcknowledgement
public void afterSuccessfulAcknowledgement(@NonNull Object nativeId, @NonNull com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware notificationStateAware, @NonNull com.broadleafcommerce.common.messaging.notification.NotificationStateRepository repository)
- Specified by:
afterSuccessfulAcknowledgement
in interfacecom.broadleafcommerce.common.messaging.PersistenceMessageAckedHandler
-
isTrackable
protected boolean isTrackable(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware notificationStateAware)
-
isTrackableRepository
protected boolean isTrackableRepository(com.broadleafcommerce.common.messaging.notification.NotificationStateRepository repository)
-
isSandboxableEntity
protected boolean isSandboxableEntity(Trackable trackable, TrackableBehaviorUtil trackableBehaviorUtil)
-
isProductionLevel
protected boolean isProductionLevel(Trackable trackable)
-
pruneChangeDetails
protected void pruneChangeDetails(Object nativeEntityId, TrackableRepository<Trackable> repository)
-
getDataRoutePartition
public String getDataRoutePartition()
- Specified by:
getDataRoutePartition
in interfacecom.broadleafcommerce.common.extension.data.DataRoutePartitionAware
-
-