diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-02-13 11:44:35 -0500 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-02-13 11:44:35 -0500 |
commit | 8d18569284ac43ef315b41c628872e0de0bbb57a (patch) | |
tree | b21e967d388e01b125decd0ee8e0d0e803500c06 /bpmn/so-bpmn-tasks/src/main/java/org/onap | |
parent | 641d9e6b68a964dc69dbec7c63f82e73b61433e2 (diff) |
fixed CandidateType json serialization
fixed CandidateType json serialization
Change-Id: Icafa5884db5424167c7fac08ad6aae5781bdafa5
Issue-ID: SO-1503
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main/java/org/onap')
3 files changed, 4 insertions, 49 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java index 92b4e211d5..cb893ce950 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java @@ -403,9 +403,7 @@ public class SniroHomingV2 { List<org.onap.so.client.sniro.beans.Candidate> cans = new ArrayList<org.onap.so.client.sniro.beans.Candidate>(); for(Candidate c:required){ org.onap.so.client.sniro.beans.Candidate can = new org.onap.so.client.sniro.beans.Candidate(); - org.onap.so.client.sniro.beans.CandidateType type = new org.onap.so.client.sniro.beans.CandidateType(); - type.setName(c.getIdentifierType().getName()); - can.setIdentifierType(type); + can.setIdentifierType(c.getIdentifierType()); can.setIdentifiers(c.getIdentifiers()); can.setCloudOwner(c.getCloudOwner()); cans.add(can); @@ -416,9 +414,7 @@ public class SniroHomingV2 { List<org.onap.so.client.sniro.beans.Candidate> cans = new ArrayList<org.onap.so.client.sniro.beans.Candidate>(); for(Candidate c:excluded){ org.onap.so.client.sniro.beans.Candidate can = new org.onap.so.client.sniro.beans.Candidate(); - org.onap.so.client.sniro.beans.CandidateType type = new org.onap.so.client.sniro.beans.CandidateType(); - type.setName(c.getIdentifierType().getName()); - can.setIdentifierType(type); + can.setIdentifierType(c.getIdentifierType()); can.setIdentifiers(c.getIdentifiers()); can.setCloudOwner(c.getCloudOwner()); cans.add(can); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Candidate.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Candidate.java index 1f8c56e727..3b7e509752 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Candidate.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Candidate.java @@ -23,6 +23,8 @@ package org.onap.so.client.sniro.beans; import java.io.Serializable; import java.util.List; +import org.onap.so.bpmn.servicedecomposition.homingobjects.CandidateType; + import com.fasterxml.jackson.annotation.JsonProperty; public class Candidate implements Serializable{ diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/CandidateType.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/CandidateType.java deleted file mode 100644 index d8984c0b83..0000000000 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/CandidateType.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.client.sniro.beans; - -import java.io.Serializable; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class CandidateType implements Serializable{ - - private static final long serialVersionUID = 2273215496314532173L; - - @JsonProperty("name") - private String name; - - - public String getName(){ - return name; - } - - public void setName(String name){ - this.name = name; - } - -} |