contract.setTitle(contractData.getTitle());
contract.setOwner(userReader.getUser(authorizedUserService.getCurrentUserId()));
contract = contractWriter.save(contract);
eventsDispatcher.publishEvent(new ContractCreated(contract));
setResponsePage(CreateResource.class,
new PageParameters().
add(CreateResource.PARAM_CONTRACT_ID, contract.getId()));
}