Annotation Type Supply


  • @Target(METHOD)
    @Retention(RUNTIME)
    public @interface Supply
    Annotation for methods on commands or events that are able to supply child entities or other context before event sourcing or command validation etc. Those child entities can then be used as input parameters in e.g. AssertLegal and Apply methods.

    Annotated methods should contain at least one parameter. It is possible to define the aggregate or other child entities as parameter so long as these have been supplied elsewhere. Visibility level of methods is not important, i.e. supply methods may be private.