Class DefaultPropagationManager
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.core.transition.DefaultPropagationManager
-
- All Implemented Interfaces:
PropagationManager
public class DefaultPropagationManager extends Object implements PropagationManager
Default version ofPropagationManager
- Author:
- Jeff Fischer
-
-
Constructor Summary
Constructors Constructor Description DefaultPropagationManager(CommonCatalogService<? extends Catalog> catalogService, List<PropagationHandler> handlers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 Detail
-
DefaultPropagationManager
public DefaultPropagationManager(CommonCatalogService<? extends Catalog> catalogService, List<PropagationHandler> handlers)
-
-
Method Detail
-
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
protected Trackable handleDelete(Trackable incoming, String incomingCatalog, String parentCatalog, String propagationId, @Nullable Trackable candidate, TrackableRepository<Trackable> repository)
-
handleCreate
protected Trackable handleCreate(Trackable incoming, String incomingCatalog, String parentCatalog, String propagationId, TrackableRepository<Trackable> repository)
-
-