Package org.axonframework.spring.config
Class SpringAggregateConfigurer<T>
java.lang.Object
org.axonframework.spring.config.SpringAggregateConfigurer<T>
- Type Parameters:
T- The type of Aggregate to configure
- All Implemented Interfaces:
ConfigurerModule,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class SpringAggregateConfigurer<T>
extends Object
implements ConfigurerModule, org.springframework.context.ApplicationContextAware
A
ConfigurerModule implementation that will configure an Aggregate with the Axon Configuration.- Since:
- 4.6.0
- Author:
- Allard Buijze
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureModule(Configurer configurer) Configure this module to the given globalConfigurer.voidsetAggregateFactory(String aggregateFactory) Sets the bean name of theAggregateFactoryto use for this Aggregate.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidSets the bean name of theCacheto use for this Aggregate.voidsetCommandTargetResolver(String commandTargetResolver) Sets the bean name of theCommandTargetResolverto use for this Aggregate.voidsetFilterEventsByType(boolean filterEventsByType) Indicates whether to enable "filter events by type" for this Aggregate.voidsetLockFactory(String lockFactory) Sets the bean name of theLockFactoryto use for this Aggregate.voidsetRepository(String aggregateRepository) Sets the bean name of theRepositoryto configure for this Aggregate.voidsetSnapshotFilter(String snapshotFilter) Sets the bean name of theSnapshotFilterto configure for this Aggregate.voidsetSnapshotTriggerDefinition(String snapshotTriggerDefinition) Sets the bean name of theSnapshotTriggerDefinitionto use for this Aggregate.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.axonframework.config.ConfigurerModule
order
-
Constructor Details
-
SpringAggregateConfigurer
- Parameters:
aggregateType- The declared type of the aggregate.subTypes- The possible subtypes of this aggregate.
-
-
Method Details
-
setRepository
Sets the bean name of theRepositoryto configure for this Aggregate.- Parameters:
aggregateRepository- The bean name of theRepositoryfor this Aggregate.
-
setSnapshotFilter
Sets the bean name of theSnapshotFilterto configure for this Aggregate.- Parameters:
snapshotFilter- The bean name of theSnapshotFilterto configure for this Aggregate.
-
setSnapshotTriggerDefinition
Sets the bean name of theSnapshotTriggerDefinitionto use for this Aggregate.- Parameters:
snapshotTriggerDefinition- The bean name of theSnapshotTriggerDefinitionto use for this Aggregate.
-
setCommandTargetResolver
Sets the bean name of theCommandTargetResolverto use for this Aggregate.- Parameters:
commandTargetResolver- The bean name of theCommandTargetResolverto use for this Aggregate.
-
setFilterEventsByType
public void setFilterEventsByType(boolean filterEventsByType) Indicates whether to enable "filter events by type" for this Aggregate. Whentrue, only Domain Event Messages with a "type" that match the Aggregate type will be read. This is useful when multiple aggregates with different types but equal identifiers share the same event store. Will be ignored if a Repository is also configured.- Parameters:
filterEventsByType- Whether to enable "filter events by type" for this Aggregate.
-
setCache
Sets the bean name of theCacheto use for this Aggregate. Will be ignored if aRepositoryis also configured.- Parameters:
cache- The bean name of theCacheto use for this Aggregate.
-
setLockFactory
Sets the bean name of theLockFactoryto use for this Aggregate. Will be ignored if aRepositoryis also configured.- Parameters:
lockFactory- The bean name of theLockFactoryto use for this Aggregate.
-
setAggregateFactory
Sets the bean name of theAggregateFactoryto use for this Aggregate. Will be ignored if aRepositoryis also configured.- Parameters:
aggregateFactory- The bean name of the AggregateFactory to use for this Aggregate.
-
configureModule
Description copied from interface:ConfigurerModuleConfigure this module to the given globalConfigurer.- Specified by:
configureModulein interfaceConfigurerModule- Parameters:
configurer- aConfigurerinstance to configure this module with
-
setApplicationContext
public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-