@Override
public void execute() {
try {
CallContext.current().setEventDetails(getEventDescription());
final String uploadUrl = _templateService.extract(this);
if (uploadUrl != null) {
final ExtractResponse response = _responseGenerator.createExtractResponse(id, zoneId, getEntityOwnerId(), mode, uploadUrl);
response.setResponseName(getCommandName());
response.setObjectName("iso");
this.setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to extract ISO");
}
} catch (final InternalErrorException ex) {
s_logger.warn("Exception: ", ex);
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage());
}
}