Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use subscription object instead of passing around string and json #421

Open
henning-roos opened this issue Jan 15, 2020 · 0 comments
Open
Labels
code improvements Improvements to make the code base more readable and manageable.

Comments

@henning-roos
Copy link
Member

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

@henning-roos henning-roos added the code improvements Improvements to make the code base more readable and manageable. label Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code improvements Improvements to make the code base more readable and manageable.
Projects
None yet
Development

No branches or pull requests

1 participant