...
- Prefer constructor injection to setter injection
- Minimize coupling of code with DI framework
- Minimize changes to existing runtime Fedora functionality
Implementation Plan
Phase I -
...
Prepare
- List all dependents of existing module interfaces.
- Identify and remove unused modules and classes with module dependencies.
- Identify and address circular module dependencies. Refactor if possible; otherwise prepare to use setter injection in these cases.
Phase II
- Profit
Current Inter-Module Dependencies
...
Module Interface
...
Implementation(s)
...
Depends-on
...
...
...
Authorization
DOManager
DynamicAccess
ExternalContentManager
OAIProvider
...
...
...
DOManager
...
...
...
- none -
...
...
...
- none -
...
...
DefaultDOManager
GSearchDOManager
RebuildDOManager
...
ConnectionPoolManager
DOTranslator
DOValidator
ExternalContentManager
FieldSearch
ILowlevelStorage
Management
PIDGenerator
ResourceIndex
...
...
DOTranslatorImpl
DOTranslatorModule
...
- none -
...
...
DOValidatorImpl
DOValidatorModule
...
- none -
...
DynamicAccess
...
DynamicAccessImpl
DynamicAccessModule
...
Access
DOManager
...
...
...
Authorization
BackendSecurity
...
...
FieldSearchSQLImpl
FieldSearchSQLModule
...
ConnectionPoolManager
DOManager
...
...
AkubraLowlevelStorage
AkubraLowlevelStorageModule
DefaultLowlevelStorage
DefaultLowlevelStorageModule
Third-Party...
...
ConnectionPoolManager (only used by DefaultLowlevelStorage)
...
...
- Decouple module impls from Module abstract class (as is already done with ResourceIndexImpl/Module and others)
Phase II - Swap
- Decide on DI framework
- Convert fcfg to DI configuration
- Trigger initialization of module singletons via DI framework in context initialization
- Avoid use of Module and Server at runtime
Phase III - Cleanup
- Get rid of Module and Server classes
...
Authorization
DOManager
ExternalContentManager
...
...
...
- none -
...
...
FedoraOAIProvider
FedoraOAIProviderModule
SampleOAIProvider
...
DOManager
FieldSearch
...
...
DBPIDGenerator
BasicPIDGenerator
...
ConnectionPoolManager
...
...
ResourceIndexImpl
ResourceIndexModule
...
- none -
...
...
ThreadMonitorImpl
ThreadMonitorModule
...