ActionDomainEvent

Fired whenever the framework interacts with a domain object’s action.

This is the specialization of AbstractDomainEvent , for actions, which should then be further subclassed by domain application.

The class has a number of responsibilities (in addition to those it inherits):

  • capture the arguments for each of the action’s parameters

  • provide selected metadata about the action parameters from the metamodel (names, types)

The class itself is instantiated automatically by the framework using a no-arg constructor; fields are set reflectively.

API

ActionDomainEvent.java
class ActionDomainEvent<S> {
  ActionDomainEvent()     (1)
  void setReturnValue(final Object returnValue)     (2)
  void setSemantics(SemanticsOf semantics)     (3)
  void setParameterNames(final List<String> parameterNames)     (4)
  void setParameterTypes(final List<Class<?>> parameterTypes)     (5)
  void setMixedIn(final Object mixedIn)     (6)
  String toString()
}
1 ActionDomainEvent()

Subtypes can define a no-arg constructor; the framework sets state via (non-API) setters.

2 setReturnValue(Object)

Set by the framework.

3 setSemantics(SemanticsOf)
4 setParameterNames(List)
5 setParameterTypes(List)
6 setMixedIn(Object)

Members

ActionDomainEvent()

Subtypes can define a no-arg constructor; the framework sets state via (non-API) setters.

setReturnValue(Object)

Set by the framework.

Event subscribers can replace the value with some other value if they wish, though only in the AbstractDomainEvent.Phase#EXECUTED phase.

setSemantics(SemanticsOf)

setParameterNames(List)

setParameterTypes(List)

setMixedIn(Object)