Skip to content

Abstract commonly used functionality from EntitySource #981

Closed
@sebastian-peter

Description

@sebastian-peter

Especially with #926 it became apparent that some sources re-implement functionality that already exists in EntitySource.
This functionality includes (but might not be limited to) methods

public abstract void validate() throws ValidationException;
<C extends UniqueEntity> Try<Void, ValidationException> validate(Class<? extends C>, SourceValidator<C>)

, which could be reused by classes

  • *WeatherSource (CsvWeatherSource might be a bit more difficult)
  • *IdCoordinateSource
  • *TimeSeriesSource

where * can be multiple of Sql, Csv, Couchbase, InfluxDb.

Probably the methods above have to be adapted to abstract the functionality properly.

In the end, we'll probably have AssetEntitySource, which takes over most of the current EntitySource implementation, and a new EntitySource which will be extended by AssetEntitySource and by the classes mentioned above.

Metadata

Metadata

Assignees

Labels

code qualityCode readability or structure is improvedioIssues relating to input/output

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions