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 Details

    • SpringAggregateConfigurer

      public SpringAggregateConfigurer(Class<T> aggregateType, Set<Class<? extends T>> subTypes)
      Initializes a ConfigurerModule for given aggregateType and possible subTypes.
      Parameters:
      aggregateType - The declared type of the aggregate.
      subTypes - The possible subtypes of this aggregate.
  • Method Details

    • setRepository

      public void setRepository(String aggregateRepository)
      Sets the bean name of the Repository to configure for this Aggregate.
      Parameters:
      aggregateRepository - The bean name of the Repository for this Aggregate.
    • setSnapshotFilter

      public void setSnapshotFilter(String snapshotFilter)
      Sets the bean name of the SnapshotFilter to configure for this Aggregate.
      Parameters:
      snapshotFilter - The bean name of the SnapshotFilter to configure for this Aggregate.
    • setSnapshotTriggerDefinition

      public void setSnapshotTriggerDefinition(String snapshotTriggerDefinition)
      Sets the bean name of the SnapshotTriggerDefinition to use for this Aggregate.
      Parameters:
      snapshotTriggerDefinition - The bean name of the SnapshotTriggerDefinition to use for this Aggregate.
    • setCommandTargetResolver

      public void setCommandTargetResolver(String commandTargetResolver)
      Sets the bean name of the CommandTargetResolver to use for this Aggregate.
      Parameters:
      commandTargetResolver - The bean name of the CommandTargetResolver to use for this Aggregate.
    • setFilterEventsByType

      public void setFilterEventsByType(boolean filterEventsByType)
      Indicates whether to enable "filter events by type" for this Aggregate. When true, 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

      public void setCache(String cache)
      Sets the bean name of the Cache to use for this Aggregate. Will be ignored if a Repository is also configured.
      Parameters:
      cache - The bean name of the Cache to use for this Aggregate.
    • setLockFactory

      public void setLockFactory(String lockFactory)
      Sets the bean name of the LockFactory to use for this Aggregate. Will be ignored if a Repository is also configured.
      Parameters:
      lockFactory - The bean name of the LockFactory to use for this Aggregate.
    • setAggregateFactory

      public void setAggregateFactory(String aggregateFactory)
      Sets the bean name of the AggregateFactory to use for this Aggregate. Will be ignored if a Repository is also configured.
      Parameters:
      aggregateFactory - The bean name of the AggregateFactory to use for this Aggregate.
    • configureModule

      public void configureModule(@Nonnull Configurer configurer)
      Description copied from interface: ConfigurerModule
      Configure this module to the given global Configurer.
      Specified by:
      configureModule in interface ConfigurerModule
      Parameters:
      configurer - a Configurer instance to configure this module with
    • setApplicationContext

      public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException