MountedCommand

annotation class MountedCommand(val aggregate: String, val transformsTo: Array<KClass<*>> = [])

A command mounted under an aggregate's routes that no aggregate decides: it has no @OnCommand, and exactly one CommandTransformer of the service claims it, turning it into a command an aggregate decides, such as an import that becomes the aggregate's creation command or an external callback in a provider's shape. The Manifest lists it under aggregate as a mounted command, with its routes (with and without an aggregate id), and the service refuses to start when no transformer, or more than one, claims it.

The model processor finds mounted commands among the classes of the module it compiles, so a mounted command lives in the domain module of its aggregate. Its @Name names it within its aggregate, as it names a command.

Parameters

aggregate

the name of the aggregate, in the module's bounded context, whose routes the command is mounted under.

transformsTo

the commands the transformer turns it into, by their classes, which the Manifest lists as the command's transformsTo, by full type name. Empty, the default, declares none.

Properties

Link copied to clipboard
Link copied to clipboard