import { getQualifiedClassName } from "../../../framework/impl/getQualifiedClassName" ; import { IClass } from "../../matching/IClass" ; import { ICommand } from "../api/ICommand" ; import { ICommandMapping } from "../api/ICommandMapping" ; private export class CommandMapping implements ICommandMapping { inheritDoc public get commandClass ( ) : IClass < ICommand > { return this . _commandClass ; } inheritDoc public get guards ( ) : any [ ] { return this . _guards ; } inheritDoc public get hooks ( ) : any [ ] { return this . _hooks ; } inheritDoc public get fireOnce ( ) : boolean { return this . _fireOnce ; } inheritDoc public get payloadInjectionEnabled ( ) : boolean { return this . _payloadInjectionEnabled ; } private _commandClass : IClass < ICommand > ; private _guards : any [ ] = [ ] ; private _hooks : any [ ] = [ ] ; private _fireOnce : boolean = false ; private _payloadInjectionEnabled : boolean = true ; param commandClass constructor ( commandClass ) { this . _commandClass = commandClass ; } inheritDoc public addGuards ( ... guards ) { this . _guards = this . _guards . concat . apply ( this . _guards , guards ) ; return this ; } inheritDoc public addHooks ( ... hooks ) { this . _hooks = this . _hooks . concat . apply ( this . _hooks , hooks ) ; return this ; } inheritDoc public setFireOnce ( value ) { this . _fireOnce = value ; return this ; } inheritDoc public setPayloadInjectionEnabled ( value ) { this . _payloadInjectionEnabled = value ; return this ; } /**
     *
     */ public toString ( ) { return "Command " + getQualifiedClassName ( this . _commandClass ) ; } }