tmf.core: Introduce arbitrary/abstract data provider #258
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What it does
This is the first step in having arbitrary data providers. With this PR arbitrary data providers that are not instances of
ITmfTreeDataProvidercan be created byIDataProviderFactoryimplementations and through theDataProviderManager. This helps with project such as report and other timeless or non-tree based views.This PR adds new methods to
IDataProviderFactoryto create provider returning only this newITmfDataProviderinterface. It deprecate existingcreateProvidermethods inIDataProviderFactoryin favour of the new interfaces. The default implementations make sure that existing implementations will still work until they are migrated to the new methods.It also add new methods to fetch and create data providers implementing
ITmfDataProviderinterface to theDataProviderManager. Deprecate existing get and create methods for data providers inDataProviderManagerin favour of the new APIs.ITmfDataProviderinterfaceIDataProviderFactory.createDataProvider(ITmfTrace)andIDataProviderFactory.createDataProvider(ITmfTrace, String)DataProviderManager.fetchExistingDataProvider(ITmfTrace, String, Class)andDataProviderManager.fetchOrCreateDataProvider(ITmfTrace, String, Class)IDataProviderFactory.createProvider(ITmfTrace)andIDataProviderFactory.createProvider(ITmfTrace, String)DataProviderManager.getExistingDataProvider(ITmfTrace, String, Class)andDataProviderManager.getOrCreateDataProvider(ITmfTrace, String, Class)How to test
All CI needs to run successful which will verify that existing data provider factory implementation work without changing to the new APIs, because every data provider is based on this.
For reports, a patch needs to be based on it and designed for reports at the moment, but other views can use it.
Follow-ups
Base other views on this patch #242 , for example.
Review checklist
Signed-off-by: Matthew Khouzam matthew.khouzam@ericsson.com
Signed-off-by: Bernd Hufmann bernd.hufmann@ericsson.com