-
Bug
-
Resolution: Fixed
-
Neutral
-
5.3
-
-
Empty show more show less
-
5.3 Sprint 4, 5.3 Sprint 5, 5.3 Sprint 6
Currently ImageProvider has:
- a type-mapping for ImageProviderDefinition (for n2b)
- an 'admincentral' component mapping for ImageProvider to DefaultImageProvider
- an 'admincentral' component mapping for an ImageProviderDefinition
BrowserPresenter is then creating a separate instance of imageProvider based on the ImageProviderDefinition#imageProviderClass configured under the subApp.
WorkbenchPresenter is yet even creating another imageProvider instance to pass along with instantiation of content presenters!
There are two issues with this:
- One cannot inject current ImageProvider in another subapp component (e.g. thumbnail view) because then we get the 'admincentral' imageProvider, which has null definition and contentConnector.
- One cannot reuse the imageProvider configured for this subApp.
We should use a Guice Provider here, similarly as for ContentConnector:
- we keep the definition type-mapping but replace component mappings with a provider mapping, under 'subapp' container, not 'admincentral'.
- we inject it directly in BrowserPresenter - we can then even remove injection of componentProvider from there.
- we drop DefaultImageProvider's no-arg constructor and annotate the other one with @Inject
Acceptance criteria