createBasedOnContext

public Command createBasedOnContext(CommandMessage message, CommandContext context)

Creates new Command with the passed message using the existing context.

The produced command is created with a CommandContext instance, copied from the given one, but with the current time set as a context timestamp.

Return

new command instance

Parameters

message

the command message

context

the command context to use as a base for the new command

Throws

ValidationException

if the passed message does not satisfy the constraints set for it in its Protobuf definition