public class DefaultPropagationHandler extends Object implements PropagationHandler
PropagationHandler
. Represents simple propagation behavior in a
sparse override hierarchy.Constructor and Description |
---|
DefaultPropagationHandler(WorkflowMapper mapper,
com.broadleafcommerce.common.messaging.notification.NotificationStateService notificationStateService,
com.broadleafcommerce.common.messaging.notification.NotificationManager notificationManager) |
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(Trackable incoming,
String incomingCatalog,
String parentCatalog,
Trackable candidate,
OperationType changeType)
Is this handler capable of handling the propagation process given the contextual information.
|
Trackable |
handleCreate(Trackable incoming,
String incomingCatalog,
String parentCatalog,
String propagationId,
TrackableRepository<Trackable> repository) |
Trackable |
handleDelete(Trackable incoming,
String incomingCatalog,
String parentCatalog,
String propagationId,
Trackable candidate,
TrackableRepository<Trackable> repository) |
protected Trackable |
handlePropagation(Trackable incoming,
String parentCatalog,
String propagationId,
Trackable candidate,
TrackableRepository<Trackable> repository,
boolean isDelete) |
Trackable |
handleUpdate(Trackable incoming,
String incomingCatalog,
String parentCatalog,
String propagationId,
Trackable candidate,
TrackableRepository<Trackable> repository) |
protected void |
notifyOfPersistence(Trackable domain,
TrackableRepository<Trackable> repository)
Inform the system via a message of type
PersistenceProducer.TYPE that an entity has
been persisted. |
protected void |
updatePersistenceState(Trackable trackable)
Setup the initial
NotificationState on a Trackable entity in regard to the
sending status of the PersistenceProducer.TYPE message for a persistence event. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOrder
public DefaultPropagationHandler(WorkflowMapper mapper, com.broadleafcommerce.common.messaging.notification.NotificationStateService notificationStateService, com.broadleafcommerce.common.messaging.notification.NotificationManager notificationManager)
public boolean canHandle(Trackable incoming, String incomingCatalog, String parentCatalog, @Nullable Trackable candidate, OperationType changeType)
PropagationHandler
canHandle
in interface PropagationHandler
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. See OperationType
.public Trackable handleDelete(Trackable incoming, String incomingCatalog, String parentCatalog, String propagationId, @Nullable Trackable candidate, TrackableRepository<Trackable> repository)
handleDelete
in interface PropagationAware
public Trackable handleCreate(Trackable incoming, String incomingCatalog, String parentCatalog, String propagationId, TrackableRepository<Trackable> repository)
handleCreate
in interface PropagationAware
public Trackable handleUpdate(Trackable incoming, String incomingCatalog, String parentCatalog, String propagationId, @Nullable Trackable candidate, TrackableRepository<Trackable> repository)
handleUpdate
in interface PropagationAware
protected Trackable handlePropagation(Trackable incoming, String parentCatalog, String propagationId, @Nullable Trackable candidate, TrackableRepository<Trackable> repository, boolean isDelete)
protected void updatePersistenceState(Trackable trackable)
NotificationState
on a Trackable
entity in regard to the
sending status of the PersistenceProducer.TYPE
message for a persistence event.trackable
- Trackable
the entity which experienced a persistence eventprotected void notifyOfPersistence(Trackable domain, TrackableRepository<Trackable> repository)
PersistenceProducer.TYPE
that an entity has
been persisted.domain
- the entity that was persistedCopyright © 2021. All rights reserved.