/** * Uninstall a book. * * @param book * the book to delete * @throws BookException */ public void deleteBook(Book book) throws BookException { // Actually do the delete // This should be a call on installer. // This will also remove the book from the list of installed books. book.getDriver().delete(book); }
public void deleteDocument(Book document) throws BookException { // make sure we have the correct Book and not just a copy e.g. one from a Download Manager Book realDocument = getDocumentByInitials(document.getInitials()); // delete index first if it exists but wrap in try to ensure an attempt is made to delete the document try { IndexManager imanager = IndexManagerFactory.getIndexManager(); if (imanager.isIndexed(realDocument)) { imanager.deleteIndex(realDocument); } } catch (Exception e) { // just log index delete error, deleting doc is the important thing log.error("Error deleting document index", e); } document.getDriver().delete(realDocument); }
book.getDriver().delete(book);