class OrganizationService extends Service {

  @POST
  @Path("/{id}")
  @Consumes(APPLICATION_JSON)
  @Produces(APPLICATION_JSON)
  @ApiOperation(value = "Update organization", response = OrganizationDto.class)
  @ApiResponses({
    @ApiResponse(code = 200, message = "The organization successfully updated"),
    @ApiResponse(code = 400, message = "Missed required parameters, parameters are not valid"),
    @ApiResponse(code = 404, message = "The organization with given id was not found"),
    @ApiResponse(
        code = 409,
        message =
            "Conflict error occurred during the organization creation"
                + "(e.g. The organization with such name already exists)"),
    @ApiResponse(code = 500, message = "Internal server error occurred")
  })
  public OrganizationDto update(
      @ApiParam("Organization id") @PathParam("id") String organizationId,
      @ApiParam(value = "Organization to update", required = true) OrganizationDto organization)
      throws BadRequestException, ConflictException, NotFoundException, ServerException {
    organizationValidator.checkOrganization(organization);
    return linksInjector.injectLinks(
        asDto(organizationManager.update(organizationId, organization)), getServiceContext());
  }

  @Inject public  OrganizationService(
      OrganizationManager organizationManager,
      OrganizationLinksInjector linksInjector,
      OrganizationValidator organizationValidator);

}