if (com != null) {
Bitstream bitstream = com.setLogo((InputStream) inputVar);
com.update();
return String.valueOf(bitstream.getID());
} else {
throw new EntityException("Not found", "Entity not found", 404);
}
} catch (SQLException ex) {
throw new EntityException("Internal server error", "SQL error", 500);
} catch (AuthorizeException ex) {
throw new EntityException("Forbidden", "Forbidden", 403);
} catch (IOException ie) {
throw new EntityException("Internal server error", "SQL error, cannot create logo", 500);
} catch (NumberFormatException ex) {
throw new EntityException("Bad request", "Could not parse input", 400);
}
}