this.context.authenticatedUser();
this.moneyTransferCommandFromApiJsonDeserializer.validateOfficeTransfer(command.json());
Long officeId = null;
Office fromOffice = null;
final Long fromOfficeId = command.longValueOfParameterNamed("fromOfficeId");
if (fromOfficeId != null) {
fromOffice = this.officeRepository.findOne(fromOfficeId);
officeId = fromOffice.getId();
}
Office toOffice = null;
final Long toOfficeId = command.longValueOfParameterNamed("toOfficeId");
if (toOfficeId != null) {
toOffice = this.officeRepository.findOne(toOfficeId);
officeId = toOffice.getId();
}
if (fromOffice == null && toOffice == null) { throw new OfficeNotFoundException(toOfficeId); }
final String currencyCode = command.stringValueOfParameterNamed("currencyCode");