public class SwordBookDriver extends AbstractBookDriver
The GNU Lesser General Public License for details.
The copyright to this program is held by its authors.| Modifier and Type | Field and Description |
|---|---|
private static BookDriver |
INSTANCE
A shared instance of this driver.
|
private static org.slf4j.Logger |
LOGGER
The log stream
|
| Constructor and Description |
|---|
SwordBookDriver()
Some basic name initialization
|
| Modifier and Type | Method and Description |
|---|---|
private Book |
createBook(SwordBookMetaData sbmd)
Create a Book appropriate for the BookMetaData
|
void |
delete(Book dead)
Delete this Book from the system.
|
Book[] |
getBooks()
Provide books.
|
private void |
getBooks(Set<Book> valid,
File bookDir) |
String |
getDriverName()
A short name for this BookDriver
|
static BookDriver |
instance()
Get the singleton instance of this driver.
|
boolean |
isDeletable(Book dead)
Is this book able to be deleted.
|
static void |
registerNewBook(SwordBookMetaData sbmd)
A helper class for the SwordInstaller to tell us that it has copied a new
Book into our install directory
|
create, getFirstBook, isWritableprivate static final BookDriver INSTANCE
private static final org.slf4j.Logger LOGGER
public String getDriverName()
BookDriverpublic Book[] getBooks()
BookProviderpublic boolean isDeletable(Book dead)
BookDriverisDeletable in interface BookDriverisDeletable in class AbstractBookDriverdead - the book to be deletedpublic void delete(Book dead) throws BookException
BookDriverdelete in interface BookDriverdelete in class AbstractBookDriverdead - the book to be deletedBookException - If the Book can't be deleted.public static BookDriver instance()
public static void registerNewBook(SwordBookMetaData sbmd) throws BookException
sbmd - The SwordBookMetaData object for the new BookBookExceptionprivate Book createBook(SwordBookMetaData sbmd) throws BookException
BookException