public class TransitionHandlerFactory extends Object implements TransitionHandlerCustomizer
TransitionHandlers
for sandboxable entities and delegate
to them when a sandbox message is received. Sandboxable entities are marked with
@TrackableExtension(TrackableBehavior.SANDBOX)
. Transition handlers are created in the
following way:
DefaultTransitionHandler
for this entity.Constructor and Description |
---|
TransitionHandlerFactory(com.broadleafcommerce.common.extension.data.DataRouteReference routeReference,
org.springframework.data.mapping.context.MappingContext<?,?> mappingContext,
TrackableBehaviorUtil behaviorUtil,
WorkflowMapper workflowMapper,
org.springframework.context.ApplicationContext applicationContext,
DomainMapperManager domainMapper,
com.broadleafcommerce.common.messaging.repository.ResourceLockRepository<?,?> resourceLockRepository,
com.broadleafcommerce.common.messaging.notification.NotificationManager notificationManager,
WorkflowRequestCompletionNotifier completionNotifier,
com.broadleafcommerce.common.extension.TypeFactory factory,
com.broadleafcommerce.common.messaging.notification.NotificationStateService notificationStateService,
com.broadleafcommerce.common.messaging.notification.MessageSerializationHelper helper,
RepositoryUtility repositories,
CommonCatalogService<Catalog> commonCatalogService,
SingleIndexRequestMessageFactory singleIndexRequestMessageFactory,
PropagationManager propagationManager,
com.broadleafcommerce.common.extension.TypeFactory typeFactory) |
TransitionHandlerFactory(com.broadleafcommerce.common.extension.data.DataRouteReference routeReference,
org.springframework.data.mapping.context.MappingContext<?,?> mappingContext,
TrackableBehaviorUtil behaviorUtil,
WorkflowMapper workflowMapper,
org.springframework.context.ApplicationContext applicationContext,
DomainMapperManager domainMapper,
com.broadleafcommerce.common.messaging.repository.ResourceLockRepository<?,?> resourceLockRepository,
com.broadleafcommerce.common.messaging.notification.NotificationManager notificationManager,
WorkflowRequestCompletionNotifier completionNotifier,
com.broadleafcommerce.common.extension.TypeFactory factory,
com.broadleafcommerce.common.messaging.notification.NotificationStateService notificationStateService,
com.broadleafcommerce.common.messaging.notification.MessageSerializationHelper helper,
RepositoryUtility repositories,
SingleIndexRequestMessageFactory singleIndexRequestMessageFactory) |
Modifier and Type | Method and Description |
---|---|
List<TransitionHandler> |
customizeHandlers(List<TransitionHandler> handlers) |
protected org.springframework.context.ApplicationContext |
getApplicationContext() |
protected TrackableBehaviorUtil |
getBehaviorUtil() |
protected Optional<Class<?>> |
getBusinessDomain(org.springframework.data.mapping.PersistentEntity<?,?> entity,
Class<?> type) |
protected CommonCatalogService<Catalog> |
getCommonCatalogService() |
protected WorkflowRequestCompletionNotifier |
getCompletionNotifier() |
protected DomainMapperManager |
getDomainMapper() |
protected List<org.springframework.data.mapping.PersistentEntity<?,?>> |
getEligiblePersistentEntities()
We only want to have
TransitionHandler instances for most-derived persisted domain
types. |
protected com.broadleafcommerce.common.extension.TypeFactory |
getFactory() |
protected com.broadleafcommerce.common.messaging.notification.MessageSerializationHelper |
getHelper() |
protected org.springframework.data.mapping.context.MappingContext<?,?> |
getMappingContext() |
protected com.broadleafcommerce.common.messaging.notification.NotificationManager |
getNotificationManager() |
protected Optional<TransitionHandler> |
getOrCreateTransitionHandler(Class<?> type,
Class<?> businessDomain) |
protected PropagationManager |
getPropagationManager() |
protected RepositoryUtility |
getRepositories() |
protected com.broadleafcommerce.common.messaging.repository.ResourceLockRepository<?,?> |
getResourceLockRepository() |
protected com.broadleafcommerce.common.extension.data.DataRouteReference |
getRouteReference() |
protected SingleIndexRequestMessageFactory |
getSingleIndexRequestMessageFactory() |
protected Optional<TransitionHandler> |
getTransitionHandler(org.springframework.data.mapping.PersistentEntity<?,?> entity) |
protected com.broadleafcommerce.common.extension.TypeFactory |
getTypeFactory() |
protected WorkflowMapper |
getWorkflowMapper() |
void |
setCatalogService(CommonCatalogService<Catalog> commonCatalogService) |
void |
setPropagationManager(PropagationManager propagationManager) |
void |
setTypeFactory(com.broadleafcommerce.common.extension.TypeFactory typeFactory) |
public TransitionHandlerFactory(com.broadleafcommerce.common.extension.data.DataRouteReference routeReference, org.springframework.data.mapping.context.MappingContext<?,?> mappingContext, TrackableBehaviorUtil behaviorUtil, WorkflowMapper workflowMapper, org.springframework.context.ApplicationContext applicationContext, DomainMapperManager domainMapper, com.broadleafcommerce.common.messaging.repository.ResourceLockRepository<?,?> resourceLockRepository, com.broadleafcommerce.common.messaging.notification.NotificationManager notificationManager, WorkflowRequestCompletionNotifier completionNotifier, com.broadleafcommerce.common.extension.TypeFactory factory, com.broadleafcommerce.common.messaging.notification.NotificationStateService notificationStateService, com.broadleafcommerce.common.messaging.notification.MessageSerializationHelper helper, RepositoryUtility repositories, CommonCatalogService<Catalog> commonCatalogService, SingleIndexRequestMessageFactory singleIndexRequestMessageFactory, PropagationManager propagationManager, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
public TransitionHandlerFactory(com.broadleafcommerce.common.extension.data.DataRouteReference routeReference, org.springframework.data.mapping.context.MappingContext<?,?> mappingContext, TrackableBehaviorUtil behaviorUtil, WorkflowMapper workflowMapper, org.springframework.context.ApplicationContext applicationContext, DomainMapperManager domainMapper, com.broadleafcommerce.common.messaging.repository.ResourceLockRepository<?,?> resourceLockRepository, com.broadleafcommerce.common.messaging.notification.NotificationManager notificationManager, WorkflowRequestCompletionNotifier completionNotifier, com.broadleafcommerce.common.extension.TypeFactory factory, com.broadleafcommerce.common.messaging.notification.NotificationStateService notificationStateService, com.broadleafcommerce.common.messaging.notification.MessageSerializationHelper helper, RepositoryUtility repositories, SingleIndexRequestMessageFactory singleIndexRequestMessageFactory)
@Autowired(required=false) public void setCatalogService(CommonCatalogService<Catalog> commonCatalogService)
public List<TransitionHandler> customizeHandlers(List<TransitionHandler> handlers)
customizeHandlers
in interface TransitionHandlerCustomizer
protected List<org.springframework.data.mapping.PersistentEntity<?,?>> getEligiblePersistentEntities()
TransitionHandler
instances for most-derived persisted domain
types. If an entity is extended, we want to create a handler for the extended domain, not the
base class.
By default, this method will obtain all persistent entities from the MappingContext
and subsequently filter to only the most-derived types. For example, if the base type
JpaSomething has an extension JpaExtendedSomething, only JpaExtendedSomething will have a
handler created.
protected Optional<TransitionHandler> getTransitionHandler(org.springframework.data.mapping.PersistentEntity<?,?> entity)
protected Optional<Class<?>> getBusinessDomain(org.springframework.data.mapping.PersistentEntity<?,?> entity, Class<?> type)
protected Optional<TransitionHandler> getOrCreateTransitionHandler(Class<?> type, Class<?> businessDomain)
protected com.broadleafcommerce.common.extension.data.DataRouteReference getRouteReference()
protected org.springframework.data.mapping.context.MappingContext<?,?> getMappingContext()
protected TrackableBehaviorUtil getBehaviorUtil()
protected WorkflowMapper getWorkflowMapper()
protected org.springframework.context.ApplicationContext getApplicationContext()
protected DomainMapperManager getDomainMapper()
protected com.broadleafcommerce.common.messaging.repository.ResourceLockRepository<?,?> getResourceLockRepository()
protected com.broadleafcommerce.common.messaging.notification.NotificationManager getNotificationManager()
protected WorkflowRequestCompletionNotifier getCompletionNotifier()
protected com.broadleafcommerce.common.extension.TypeFactory getFactory()
protected com.broadleafcommerce.common.messaging.notification.MessageSerializationHelper getHelper()
protected RepositoryUtility getRepositories()
protected CommonCatalogService<Catalog> getCommonCatalogService()
protected SingleIndexRequestMessageFactory getSingleIndexRequestMessageFactory()
protected PropagationManager getPropagationManager()
@Autowired public void setPropagationManager(@Nullable PropagationManager propagationManager)
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
@Autowired public void setTypeFactory(@Nullable com.broadleafcommerce.common.extension.TypeFactory typeFactory)
Copyright © 2021. All rights reserved.