Skip to content

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

Open
@henning-roos

Description

@henning-roos

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    code improvementsImprovements to make the code base more readable and manageable.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions