|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.eventsourcing.AbstractAggregateFactory<T>
org.axonframework.eventsourcing.SpringPrototypeAggregateFactory<T>
T - The type of aggregate generated by this aggregate factorypublic class SpringPrototypeAggregateFactory<T extends EventSourcedAggregateRoot>
AggregateFactory implementation that uses Spring prototype beans to create new uninitialized instances of Aggregates.
| Constructor Summary | |
|---|---|
SpringPrototypeAggregateFactory()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
T |
doCreateAggregate(Object aggregateIdentifier,
DomainEventMessage firstEvent)
Create an uninitialized Aggregate instance with the given aggregateIdentifier. |
Class<T> |
getAggregateType()
Returns the type of aggregate this factory creates. |
String |
getTypeIdentifier()
Returns the type identifier for this aggregate factory. |
protected T |
postProcessInstance(T aggregate)
Perform any processing that must be done on an aggregate instance that was reconstructed from a Snapshot Event. |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
|
void |
setBeanName(String beanName)
|
void |
setParameterResolverFactory(ParameterResolverFactory parameterResolverFactory)
Sets the parameter resolver with which parameters of annotated event handlers in the aggregae are resolved. |
void |
setPrototypeBeanName(String prototypeBeanName)
Sets the name of the prototype bean this repository serves. |
void |
setTypeIdentifier(String typeIdentifier)
Sets the type identifier of the aggregate served by this repository. |
| Methods inherited from class org.axonframework.eventsourcing.AbstractAggregateFactory |
|---|
createAggregate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpringPrototypeAggregateFactory()
| Method Detail |
|---|
public T doCreateAggregate(Object aggregateIdentifier,
DomainEventMessage firstEvent)
AbstractAggregateFactoryaggregateIdentifier. The given
firstEvent can be used to define the requirements of the aggregate to create.
The given firstEvent is never a snapshot event.
doCreateAggregate in class AbstractAggregateFactory<T extends EventSourcedAggregateRoot>aggregateIdentifier - The identifier of the aggregate to createfirstEvent - The first event in the Event Stream of the Aggregate
protected T postProcessInstance(T aggregate)
AbstractAggregateFactory
postProcessInstance in class AbstractAggregateFactory<T extends EventSourcedAggregateRoot>aggregate - The aggregate to post-process.
public String getTypeIdentifier()
AggregateFactory
getTypeIdentifier in interface AggregateFactory<T extends EventSourcedAggregateRoot>public Class<T> getAggregateType()
AggregateFactoryinstanceOf this type.
getAggregateType in interface AggregateFactory<T extends EventSourcedAggregateRoot>public void setPrototypeBeanName(String prototypeBeanName)
prototypeBeanName - the name of the prototype bean this repository serves.public void setTypeIdentifier(String typeIdentifier)
typeIdentifier - the type identifier of the aggregate served by this repository.public void setParameterResolverFactory(ParameterResolverFactory parameterResolverFactory)
parameterResolverFactory - the factory that provides resolver for parameters.public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext in interface org.springframework.context.ApplicationContextAwarepublic void setBeanName(String beanName)
setBeanName in interface org.springframework.beans.factory.BeanNameAware
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||