[[BackLinksMenu]]

[[TicketQuery(summary=S2S_WEB_BOOK_MANAGEMENT_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|)]]



= Analysis =

== Overview ==
Book management means the ability to list, add, removes and search books by various fields. 

== Task requirements ==
 * The logged in user should be able to:
  * view lists of all the available books in the database.
  * search the books by some criteria based on their fields(author, title, version, date uploaded...)
  * add new books to the database.
  * remove his/her own books.
 * All of these must happen through web interface.

== Task result ==
 * pages providing book management.

== Implementation idea ==
 * Use [source:trunk/sophie2-platform/modules/org.sophie2.server/src/main/java/org/sophie2/server/service/BookService.java BookService] class and its methods.
 * Create two jsps - to list and to add books(with form).

== Related ==
[wiki:S2S_WEB_COMMONS_R1][[BR]]
[wiki:S2S_WEB_USER_RELATED_R0][[BR]]
[wiki:S2S_CORE_MODEL_R0]

== How to demo ==
Show the new created pages.

= Design =
Create a "books.jsp" file, which lists all the persisted books on the server:
 * Use the BookService class to retrieve a list with the books, and the Book class to iterate through the list, displaying each book in appropriate format. These two require importing the classes in the jsp (use <%@page import=".."%>).
 * Keep in mind that the list can be very long. This means we have to display a certain number of books per page (for example 10), a link to the previous/next page. It will be best to be done using the GET method (this way copying/saving the URL will be easy).
 * Access for non-logged users must be denied ( using response.sendRedirect(..); return;).
Create "search_books.jsp" file:
 * Make a simple search form (like [http://sophiebooks.org/s4bookstorage.html?view=search], for example), which posts the entered data to a servlet. The servlet outputs the result, using the BookManager class.
 



= Implementation =
^(Implementation results should be described and linked here (from the wiki or the repository))^

= Testing =

= Comments =
^(Write comments for this or later revisions here.)