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)
  ActionDomainEvent(final S source)     (2)
  void setReturnValue(final Object returnValue)     (3)
  void setSemantics(SemanticsOf semantics)     (4)
  void setParameterNames(final List<String> parameterNames)     (5)
  void setParameterTypes(final List<Class<?>> parameterTypes)     (6)
  void setMixedIn(final Object mixedIn)     (7)
  String toString()
}
1 ActionDomainEvent()

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

2 ActionDomainEvent(S)

Subtypes can define a one-arg constructor (for nested non-static classes of nested non-static mixins); the framework sets state via (non-API) setters.

3 setReturnValue(Object)

Set by the framework.

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

Members

ActionDomainEvent()

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

ActionDomainEvent(S)

Subtypes can define a one-arg constructor (for nested non-static classes of nested non-static mixins); 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)