public APIResult submit(HttpServletRequest request, String type, String colo) {
checkColo(colo);
try {
audit(request, "STREAMED_DATA", type, "SUBMIT");
Entity entity = submitInternal(request, type);
return new APIResult(APIResult.Status.SUCCEEDED, "Submit successful (" + type + ") " + entity.getName());
} catch (Throwable e) {
LOG.error("Unable to persist entity object", e);
throw IvoryWebException.newException(e, Response.Status.BAD_REQUEST);
}
}