public class LibraryApp
extends java.lang.Object
Constructor and Description |
---|
LibraryApp() |
Modifier and Type | Method and Description |
---|---|
void |
addBook(Book book)
Adds a book to the library, so that it can be searched and borrowed.
|
boolean |
adminLoggedIn() |
boolean |
adminLogin(java.lang.String password)
Logs in the administrator provided that the correct password is supplied.
|
void |
adminLogout()
Logs out the administrator.
|
java.util.List<Book> |
getBooks() |
java.util.List<Book> |
search(java.lang.String searchText)
Search for a set of books by text.
|
public boolean adminLoggedIn()
public boolean adminLogin(java.lang.String password)
password
- public void addBook(Book book) throws OperationNotAllowedException
book,
- the book to be addedOperationNotAllowedException
- if the administrator is not logged inpublic java.util.List<Book> getBooks()
public java.util.List<Book> search(java.lang.String searchText)
searchText
- public void adminLogout()