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-level Trackable entities following successful acknowledgement of the PersistenceMessage's notification state.

For sandboxable entities, the Tracking.getLevel() must be TrackingLevel.PRODUCTION. All non-sandboxable entities are implicitly considered production-level.

Author:
Samarth Dhruva (samarthd)
  • Constructor Details

    • ChangeDetailPruningPersistenceMessageAckedHandler

      public ChangeDetailPruningPersistenceMessageAckedHandler()
  • Method Details

    • 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 interface com.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 interface com.broadleafcommerce.common.extension.data.DataRoutePartitionAware