public class BookInstaller extends Object
The GNU Lesser General Public License for details.| Modifier and Type | Field and Description |
|---|---|
private InstallManager |
installManager |
| Constructor and Description |
|---|
BookInstaller() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteBook(Book book)
Uninstall a book.
|
Book |
getBook(String repositoryName,
String bookName)
Get a Book from the repository.
|
static Book |
getInstalledBook(String bookInitials)
Get a particular installed book by initials.
|
static List<Book> |
getInstalledBooks()
Get a list of all installed books.
|
static List<Book> |
getInstalledBooks(BookFilter filter)
Get a list of installed books by BookFilter.
|
static List<Book> |
getInstalledBooks(String filterSpec)
Get a list of books by CustomFilter specification
|
Map<String,Installer> |
getInstallers()
Get a list of all known installers.
|
Book |
getRepositoryBook(String repositoryName,
String bookInitials)
Get a particular installed book by initials.
|
List<Book> |
getRepositoryBooks(String repositoryName)
Get a list of all known books for an installer.
|
List<Book> |
getRepositoryBooks(String repositoryName,
BookFilter filter)
Get a list of books in a repository by BookFilter.
|
List<Book> |
getRepositoryBooks(String repositoryName,
String filterSpec)
Get a list of books in a repository by CustomFilter specification
|
void |
installBook(String repositoryName,
Book book)
Install a book, overwriting it if the book to be installed is newer.
|
static void |
main(String[] args)
BookInstaller can manage the installation of books with the following
capabilities.
|
void |
reloadBookList(String repositoryName)
Reload the local cache for a remote repository.
|
static void |
usage() |
private InstallManager installManager
public void deleteBook(Book book) throws BookException
book - the book to deleteBookExceptionpublic Map<String,Installer> getInstallers()
public static List<Book> getInstalledBooks()
public static List<Book> getInstalledBooks(BookFilter filter)
filter - The book filterBookFilter,
Bookspublic static List<Book> getInstalledBooks(String filterSpec)
filterSpec - The filter stringBookFilters.getCustom(java.lang.String),
Bookspublic static Book getInstalledBook(String bookInitials)
bookInitials - The book name to search forpublic List<Book> getRepositoryBooks(String repositoryName)
repositoryName - public List<Book> getRepositoryBooks(String repositoryName, BookFilter filter)
repositoryName - The name of the repositoryfilter - The book filterBookFilter,
Bookspublic List<Book> getRepositoryBooks(String repositoryName, String filterSpec)
repositoryName - the name of the repositoryfilterSpec - The filter stringBookFilters.getCustom(java.lang.String),
Bookspublic Book getRepositoryBook(String repositoryName, String bookInitials)
repositoryName - the name of the repositorybookInitials - The book name to search forpublic void reloadBookList(String repositoryName) throws InstallException
repositoryName - InstallExceptionpublic Book getBook(String repositoryName, String bookName)
repositoryName - the repository from which to get the bookbookName - the name of the book to getpublic void installBook(String repositoryName, Book book) throws BookException, InstallException
repositoryName - the name of the repository from which to get the bookbook - the book to getBookExceptionInstallExceptionpublic static void main(String[] args)
Usage: BookInstaller [option]
| uninstall | bookName | Uninstall book |
| sources | List source repositories | |
| list | List installed books | |
| list | repositoryName | list available books from a repository |
| reload | repositoryName | Reload the local cache for a repository |
| install | repositoryName bookName | Install a book from a repository |
args - public static void usage()