Class DefaultPropagationManager
java.lang.Object
com.broadleafcommerce.data.tracking.core.transition.DefaultPropagationManager
- All Implemented Interfaces:
PropagationManager
Default version of
PropagationManager
- Author:
- Jeff Fischer
-
Constructor Summary
ConstructorDescriptionDefaultPropagationManager
(CommonCatalogService<? extends Catalog> catalogService, List<PropagationHandler> handlers) -
Method Summary
Modifier and TypeMethodDescriptionprotected Trackable
handleCreate
(Trackable incoming, String incomingCatalog, String parentCatalog, String propagationId, TrackableRepository<Trackable> repository) protected Trackable
handleDelete
(Trackable incoming, String incomingCatalog, String parentCatalog, String propagationId, Trackable candidate, TrackableRepository<Trackable> repository) protected Trackable
handleUpdate
(Trackable incoming, String incomingCatalog, String parentCatalog, String propagationId, Trackable candidate, TrackableRepository<Trackable> repository) void
propagate
(Trackable deployed, String parentCatalog, OperationType changeType, String propagationId, TrackableRepository<Trackable> repository) Given a deployed catalog discriminated change, recurse through versions of the entity in child catalogs and transfer the deployed changes using the process defined implementations ofPropagationHandler
.
-
Constructor Details
-
DefaultPropagationManager
public DefaultPropagationManager(CommonCatalogService<? extends Catalog> catalogService, List<PropagationHandler> handlers)
-
-
Method Details
-
propagate
@SuppressNotification("SINGLE_INDEX_REQUEST") public void propagate(Trackable deployed, String parentCatalog, OperationType changeType, String propagationId, TrackableRepository<Trackable> repository) Description copied from interface:PropagationManager
Given a deployed catalog discriminated change, recurse through versions of the entity in child catalogs and transfer the deployed changes using the process defined implementations ofPropagationHandler
.PropagationHandler
instances are registered with Spring and ordered. The first instance capable of handling is used and others are ignored.- Specified by:
propagate
in interfacePropagationManager
- Parameters:
deployed
- The deployed item containing changes to propagateparentCatalog
- The catalog whose children will be checked for propagation itemschangeType
- The type of operation to be propagated (CREATE,UPDATE,DELETE)propagationId
- An id that identifies changes as part of this propagation. SeeChangeDetail.getPropagationId()
.repository
- The repository responsible for persistence of the entity type
-
handleDelete
-
handleCreate
-
handleUpdate
-