Class ModuleServiceImpl
java.lang.Object
com.tyndalehouse.step.core.service.impl.ModuleServiceImpl
- All Implemented Interfaces:
ModuleService
Looks up module information, for example lexicon definitions for particular references
-
Constructor Summary
ConstructorsConstructorDescriptionModuleServiceImpl(JSwordModuleService jswordModuleService, javax.inject.Provider<ClientSession> clientSession, VersionResolver resolver) constructs a service to give module information and content. -
Method Summary
Modifier and TypeMethodDescriptiongetAllInstallableModules(int installerIndex, org.crosswire.jsword.book.BookCategory... categories) static Collection<org.crosswire.jsword.book.Book>subtract(List<org.crosswire.jsword.book.Book> originalBooks, List<org.crosswire.jsword.book.Book> booksToRemove)
-
Constructor Details
-
ModuleServiceImpl
@Inject public ModuleServiceImpl(JSwordModuleService jswordModuleService, javax.inject.Provider<ClientSession> clientSession, VersionResolver resolver) constructs a service to give module information and content.- Parameters:
jswordModuleService- the service to register and manipulate modulesclientSession- the client session to validate security
-
-
Method Details
-
getAvailableModules
- Specified by:
getAvailableModulesin interfaceModuleService- Returns:
- all installed modules
-
getAllInstallableModules
public List<BibleVersion> getAllInstallableModules(int installerIndex, org.crosswire.jsword.book.BookCategory... categories) - Specified by:
getAllInstallableModulesin interfaceModuleService- Parameters:
installerIndex- installer index to look up modules fromcategories- the types of modules to include- Returns:
- a list of all modules that could be installed
-
subtract
public static Collection<org.crosswire.jsword.book.Book> subtract(List<org.crosswire.jsword.book.Book> originalBooks, List<org.crosswire.jsword.book.Book> booksToRemove) - Parameters:
originalBooks- list a the master listbooksToRemove- list b the list of items to take out- Returns:
- the trimmed list
-