[jsword-devel] Changes to Books

Joe Walker jsword-devel@crosswire.org
Wed, 31 Mar 2004 17:50:46 +0100


DM Smith wrote:

> Joe,
> I noticed you changed Books to implement BookList rather than extending 
> AbstractBookList.

Yes. JDepend was going nuts complaining about circular deps. This seemed 
like the simplest fix. I was half tempted to move Books into install, 
but that didn't seem right, and having AbstractBookList up a level 
confuses the current situation where all the default and abstract impls 
are together.


 > In looking at AbstractBookList I could only find one
> class that extends it: SwordInstaller. I only found that Books called 
> fireBooksChanged. Is AbstractBookList needed? Or should SwordInstaller 
> directly implement BookList?

The installation system is supposed to not be tied to Crosswire, but 
allow future Book implementations to define their own download system, 
the next one of these would extend AbstractBookList.


 > Should addBook and removeBook be added to
> BookList? (So that BookList is an interface for the whole of list 
> management of BookMetaData)

What would SwordInstaller.addBook() do?
I agree that currently it seems a bit non-obvious but I've batted 
solutions around and not come up with a more obvious solution.

Joe.