@Override public void execute() { Host result; try { result = _resourceService.updateHost(this); if(getAnnotation() != null) { annotationService.addAnnotation(getAnnotation(), AnnotationService.EntityType.HOST, result.getUuid()); } HostResponse hostResponse = _responseGenerator.createHostResponse(result); hostResponse.setResponseName(getCommandName()); this.setResponseObject(hostResponse); } catch (Exception e) { s_logger.debug("Failed to update host:" + getId(), e); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update host:" + getId() + "," + e.getMessage()); } } }