aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/tools/migration
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-06-17 22:40:44 +0300
committerMichael Lando <ml636r@att.com>2017-06-18 07:20:49 +0300
commit4d97d5fac309ce0d66938e5ccd0349e2660d4e23 (patch)
tree3f921054f997d1962fa6f9db9a0119e31a851eea /openecomp-be/tools/migration
parent89786d31f266a205857cae0177904c249ac6a512 (diff)
[sdc] update code of sdc
Change-Id: If9f37c80b659cb67b34d18e6c019defecca58b9a Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'openecomp-be/tools/migration')
-rw-r--r--openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VspInformationConvertor.java37
1 files changed, 29 insertions, 8 deletions
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VspInformationConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VspInformationConvertor.java
index b7a1d42386..59fba5f066 100644
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VspInformationConvertor.java
+++ b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VspInformationConvertor.java
@@ -55,13 +55,21 @@ public class VspInformationConvertor {
public static CollaborationElement[] convertVspToElement(VspInformation vspInformation) {
- CollaborationElement[] vspElements = new CollaborationElement[4];
+ CollaborationElement[] vspElements;
+ if(vspInformation.getQuestionnaireData() == null){
+ vspElements = new CollaborationElement[4];
+ }else{
+ vspElements = new CollaborationElement[5];
+ }
+
+ int index=0;
+
List<String> vspNamespace = getVspNamespace(vspInformation);
String vspEntityId = StructureElement.General.name();
- vspElements[0] = ElementHandler.getElementEntity(
+ vspElements[index] = ElementHandler.getElementEntity(
vspInformation.getId(), vspInformation.getVersion().toString(),
vspEntityId,
vspNamespace,
@@ -70,8 +78,9 @@ public class VspInformationConvertor {
null,
null);
+ index++;
String vspOrchestrationTemplateEntityId = StructureElement.OrchestrationTemplate.name();
- vspElements[1] = ElementHandler.getElementEntity(
+ vspElements[index] = ElementHandler.getElementEntity(
vspInformation.getId(), vspInformation.getVersion().toString(),
vspOrchestrationTemplateEntityId,
vspNamespace,
@@ -80,11 +89,23 @@ public class VspInformationConvertor {
null,
null);
-
+ if(vspInformation.getQuestionnaireData()!= null) {
+ index++;
+ String vspQuestionnaireEntityId = StructureElement.Questionnaire.name();
+ vspElements[index] = ElementHandler.getElementEntity(
+ vspInformation.getId(), vspInformation.getVersion().toString(),
+ vspQuestionnaireEntityId,
+ vspNamespace,
+ ElementHandler.getStructuralElementInfo(vspQuestionnaireEntityId),
+ null,
+ null,
+ vspInformation.getQuestionnaireData().getBytes() != null ? vspInformation
+ .getQuestionnaireData().getBytes() : null);
+ }
vspNamespace.add(vspOrchestrationTemplateEntityId);
-
+ index++;
String vspOrchestrationTemplateValidationDataEntityId = StructureElement.OrchestrationTemplateValidationData.name();
- vspElements[2] = ElementHandler.getElementEntity(
+ vspElements[index] = ElementHandler.getElementEntity(
vspInformation.getId(), vspInformation.getVersion().toString(),
vspOrchestrationTemplateValidationDataEntityId,
vspNamespace,
@@ -93,9 +114,9 @@ public class VspInformationConvertor {
null,
vspInformation.getValidationData()!= null?vspInformation.getValidationData().getBytes()
:null);
-
+ index++;
String vspOrchestrationTemplateContentEntityId = StructureElement.OrchestrationTemplateContent.name();
- vspElements[3] = ElementHandler.getElementEntity(
+ vspElements[index] = ElementHandler.getElementEntity(
vspInformation.getId(), vspInformation.getVersion().toString(),
vspOrchestrationTemplateContentEntityId,
vspNamespace,