diff options
Diffstat (limited to 'vid-app-common/src/main')
5 files changed, 35 insertions, 12 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/AaiGetVnfResponse.java b/vid-app-common/src/main/java/org/onap/vid/aai/AaiGetVnfResponse.java index 3938b164c..a62076073 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/AaiGetVnfResponse.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/AaiGetVnfResponse.java @@ -48,6 +48,14 @@ public class AaiGetVnfResponse { this.additionalProperties.put(name, value); } + public List<VnfResult> getResults() { + return results; + } + + public void setResults(List<VnfResult> results) { + this.results = results; + } + @Override public String toString() { return MoreObjects.toStringHelper(this) diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java index 6059eec74..d03362ba8 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java @@ -34,7 +34,7 @@ public class SubscriberListWithFilterData { public SubscriberListWithFilterData(SubscriberList subscriberList, RoleValidator roleValidator){ List<Subscriber> subscribers = subscriberList != null ? subscriberList.customer : new ArrayList<>(); - List<SubscriberWithFilter> subscribersWithFilter = new ArrayList<>(); + customer = new ArrayList<>(); for (Subscriber subscriber :subscribers){ SubscriberWithFilter subscriberWithFilter = new SubscriberWithFilter(); subscriberWithFilter.setIsPermitted(roleValidator.isSubscriberPermitted(subscriber.globalCustomerId)); @@ -42,10 +42,9 @@ public class SubscriberListWithFilterData { subscriberWithFilter.resourceVersion = subscriber.resourceVersion; subscriberWithFilter.subscriberName = subscriber.subscriberName; subscriberWithFilter.globalCustomerId = subscriber.globalCustomerId; - subscribersWithFilter.add(subscriberWithFilter); + customer.add(subscriberWithFilter); } - this.customer = subscribersWithFilter; - } + } public List<SubscriberWithFilter> customer; } diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/RelationshipList.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/RelationshipList.java index c30570d22..d6eb0526f 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/model/RelationshipList.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/RelationshipList.java @@ -27,20 +27,17 @@ import java.util.List; @JsonIgnoreProperties(ignoreUnknown = true) public class RelationshipList { - + + public List<Relationship> relationship; + @JsonProperty("relationship") public List<Relationship> getRelationship() { return relationship; } - + @JsonProperty("relationship") public void setRelationship(List<Relationship> relationship) { this.relationship = relationship; } - public List<Relationship> relationship; - - - - } diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/VnfResult.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/VnfResult.java index 677602be1..6cbd8cdbf 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/model/VnfResult.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/VnfResult.java @@ -25,6 +25,7 @@ import com.fasterxml.jackson.annotation.*; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_NULL) @@ -83,4 +84,22 @@ public class VnfResult { public void setJsonAdditionalProperty(String name, Object value) { this.additionalProperties.put(name, value); } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + VnfResult vnfResult = (VnfResult) o; + return Objects.equals(id, vnfResult.id) && + Objects.equals(nodeType, vnfResult.nodeType) && + Objects.equals(url, vnfResult.url) && + Objects.equals(properties, vnfResult.properties) && + Objects.equals(relatedTo, vnfResult.relatedTo) && + Objects.equals(additionalProperties, vnfResult.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, nodeType, url, properties, relatedTo, additionalProperties); + } } diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java index 8f53fcdbf..92d8de757 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java @@ -133,7 +133,7 @@ public class AAIRestInterface { * * @param baseURL the base URL */ - public void SetRestSrvrBaseURL(String baseURL) + public void setRestSrvrBaseURL(String baseURL) { if (baseURL == null) { logger.info(EELFLoggerDelegate.errorLogger, "REST Server base URL cannot be null."); |