Class DefaultPropagationHandler
java.lang.Object
com.broadleafcommerce.data.tracking.core.transition.DefaultPropagationHandler
- All Implemented Interfaces:
PropagationAware,PropagationHandler,org.springframework.core.Ordered
Default instance of
PropagationHandler. Represents simple propagation behavior in a
sparse override hierarchy.- Author:
- Jeff Fischer
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionDefaultPropagationHandler(WorkflowMapper mapper, com.broadleafcommerce.common.messaging.notification.NotificationStateService notificationStateService, com.broadleafcommerce.common.messaging.notification.NotificationManager notificationManager) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(Trackable incoming, String incomingCatalog, String parentCatalog, Trackable candidate, OperationType changeType) Is this handler capable of handling the propagation process given the contextual information.protected DefaultPropagationHandlerPropertieshandleCreate(Trackable incoming, String incomingCatalog, String parentCatalog, String propagationId, TrackableRepository<Trackable> repository) handleDelete(Trackable incoming, String incomingCatalog, String parentCatalog, String propagationId, Trackable candidate, TrackableRepository<Trackable> repository) protected TrackablehandlePropagation(Trackable incoming, String parentCatalog, String propagationId, Trackable candidate, TrackableRepository<Trackable> repository, boolean isDelete) handleUpdate(Trackable incoming, String incomingCatalog, String parentCatalog, String propagationId, Trackable candidate, TrackableRepository<Trackable> repository) protected booleanprotected voidnotifyOfPersistence(Trackable domain, TrackableRepository<Trackable> repository) Inform the system via a message of typePersistenceProducer.TYPEthat an entity has been persisted.voidsetProperties(DefaultPropagationHandlerProperties properties) protected voidupdatePersistenceState(Trackable trackable) Setup the initialNotificationStateon aTrackableentity in regard to the sending status of thePersistenceProducer.TYPEmessage for a persistence event.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.data.tracking.core.transition.PropagationHandler
getOrder
-
Constructor Details
-
DefaultPropagationHandler
public DefaultPropagationHandler(WorkflowMapper mapper, com.broadleafcommerce.common.messaging.notification.NotificationStateService notificationStateService, com.broadleafcommerce.common.messaging.notification.NotificationManager notificationManager)
-
-
Method Details
-
canHandle
public boolean canHandle(Trackable incoming, String incomingCatalog, String parentCatalog, @Nullable Trackable candidate, OperationType changeType) Description copied from interface:PropagationHandlerIs this handler capable of handling the propagation process given the contextual information.- Specified by:
canHandlein interfacePropagationHandler- Parameters:
incoming- The Trackable instance that contains the change information to propagateincomingCatalog- The current catalog in which the propagation is occuringparentCatalog- The parent catalog up one levelcandidate- The candidate, if available, representing a catalog override already existing in the incomingCatalog.changeType- The type of change requested. SeeOperationType.- Returns:
- Is this handler capable of handling the propagation process
-
handleDelete
public Trackable handleDelete(Trackable incoming, String incomingCatalog, String parentCatalog, String propagationId, @Nullable Trackable candidate, TrackableRepository<Trackable> repository) - Specified by:
handleDeletein interfacePropagationAware
-
handleCreate
public Trackable handleCreate(Trackable incoming, String incomingCatalog, String parentCatalog, String propagationId, TrackableRepository<Trackable> repository) - Specified by:
handleCreatein interfacePropagationAware
-
handleUpdate
public Trackable handleUpdate(Trackable incoming, String incomingCatalog, String parentCatalog, String propagationId, @Nullable Trackable candidate, TrackableRepository<Trackable> repository) - Specified by:
handleUpdatein interfacePropagationAware
-
handlePropagation
-
isEmitPersistenceMessageOnAppliedPropagation
protected boolean isEmitPersistenceMessageOnAppliedPropagation() -
updatePersistenceState
Setup the initialNotificationStateon aTrackableentity in regard to the sending status of thePersistenceProducer.TYPEmessage for a persistence event.- Parameters:
trackable-Trackablethe entity which experienced a persistence event
-
notifyOfPersistence
Inform the system via a message of typePersistenceProducer.TYPEthat an entity has been persisted.- Parameters:
domain- the entity that was persisted
-
getProperties
-
setProperties
@Autowired(required=false) public void setProperties(@Nullable DefaultPropagationHandlerProperties properties)
-