DSpace Service Manager
The DSpace Service Manager is an abstraction layer that can make development easier, but also obscures the flow of control.
When a class is needed to perform a particular service (e.g., writing content into a search index), it may be called from the ServiceManager. The call will look something like this:
The confusing thing is that the class mentioned here (IndexingService.class) is an interface, and there is no indication of which implementation of the interface is being used. This is useful because developers can swap the implementation class on the fly. But when debugging, it can be problematic because the code does not indicate which implementation will be used. Luckily, the number of implementing classes is usually low. It is easiest to ensure that all implementations have proper logging defined, so you can tell which class was being used for a given run of the code.
Candidate locations for finding the binding between an interface and its implementing class:
- within the implementing class?
For more information about the Service Manager, see the DSpace documentation on the Services Framework.