eiffel-community/eiffel-intelligence

Use subscription object instead of passing around string and json

Opened this issue · 0 comments

Description

com.ericsson.ei.services.SubscriptionService.getSubscription(String) should be used every time a subscription is retrieved from the database.

There might be a need to add functionality to subscription class to fetch additional data (e.g. getConditions etc.).

The current subscription model is generated by RAML (see issue #394 ) this might need to be changed.

Motivation

Avoid using stings or Json but use the real subscription object instead. This reduces the risk for bugs.

Exemplification

  • com.ericsson.ei.subscription.RunSubscription.runSubscriptionOnObject(String, Iterator, JsonNode, String) uses JsonNode instead of a subscription object.

  • there are other places as well...

Benefits

Cleaner code and fewer bugs.

Possible Drawbacks