uk.org.ury.library.viewer
Class LibraryViewer

java.lang.Object
  extended by uk.org.ury.frontend.AbstractFrontendModule
      extended by uk.org.ury.library.viewer.LibraryViewer
All Implemented Interfaces:
FrontendModule

public class LibraryViewer
extends AbstractFrontendModule

Module for investigating the track library. The LibraryViewer and its corresponding user interface, LibraryViewerPanel, provide a user interface for querying the server's library services for track information. Subclasses of this module provide editing features for the track library.

Author:
Matt Windsor

Constructor Summary
LibraryViewer()
          Constructs a new LibraryViewer as a frontend object.
 
Method Summary
 void doSearch(java.lang.String search)
          Does a library search.
 java.util.List<LibraryItem> getLibraryList()
           
 FrontendModulePanel runFrontend(FrontendMaster master)
          Runs the library viewer frontend.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LibraryViewer

public LibraryViewer()
Constructs a new LibraryViewer as a frontend object.

Method Detail

runFrontend

public FrontendModulePanel runFrontend(FrontendMaster master)
Runs the library viewer frontend.

Parameters:
master - The FrontendMaster driving the frontend.
Returns:
the frontend panel to insert into the FrontendMaster.

doSearch

public void doSearch(java.lang.String search)
              throws EmptySearchException,
                     InvalidMessageException
Does a library search. This will update the library list to reflect the results of the search.

Parameters:
search - The string fragment to use in searches. Cannot be empty or null.
Throws:
EmptySearchException - if the search string is empty or null (from LibraryUtils.search).
InvalidMessageException - if the response from the server is invalid.

getLibraryList

public java.util.List<LibraryItem> getLibraryList()
Returns:
the current library list.