summaryrefslogtreecommitdiffstats
path: root/services/activity-spec/activity-spec-web/activity-spec-service/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'services/activity-spec/activity-spec-web/activity-spec-service/src/main')
-rw-r--r--services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/mapping/MapActivitySpecRequestDtoToActivitySpecEntity.java10
-rw-r--r--services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/mapping/MapActivitySpecToActivitySpecGetResponse.java10
-rw-r--r--services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/types/ActivitySpecGetResponse.java6
-rw-r--r--services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/types/ActivitySpecRequestDto.java6
-rw-r--r--services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/dao/impl/ActivitySpecDaoZusammenImpl.java12
-rw-r--r--services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/dao/types/ActivitySpecEntity.java6
-rw-r--r--services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/datatypes/ActivitySpecData.java6
7 files changed, 36 insertions, 20 deletions
diff --git a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/mapping/MapActivitySpecRequestDtoToActivitySpecEntity.java b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/mapping/MapActivitySpecRequestDtoToActivitySpecEntity.java
index 2062fe273b..2364d59629 100644
--- a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/mapping/MapActivitySpecRequestDtoToActivitySpecEntity.java
+++ b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/mapping/MapActivitySpecRequestDtoToActivitySpecEntity.java
@@ -35,17 +35,19 @@ public class MapActivitySpecRequestDtoToActivitySpecEntity
target.setDescription(source.getDescription());
target.setCategoryList(source.getCategoryList() == null ? new ArrayList<String>()
: source.getCategoryList());
- if (Objects.nonNull(source.getInputParameters())) {
- target.setInputParameters(source.getInputParameters().stream()
+ if (Objects.nonNull(source.getInputs())) {
+ target.setInputs(source.getInputs().stream()
.map(activitySpecParameterDto -> new MapDtoToActivityParameter()
.applyMapping(activitySpecParameterDto, ActivitySpecParameter.class))
.collect(Collectors.toList()));
}
- if (Objects.nonNull(source.getOutputParameters())) {
- target.setOutputParameters(source.getOutputParameters().stream()
+ if (Objects.nonNull(source.getOutputs())) {
+ target.setOutputs(source.getOutputs().stream()
.map(activitySpecParameterDto -> new MapDtoToActivityParameter()
.applyMapping(activitySpecParameterDto, ActivitySpecParameter.class))
.collect(Collectors.toList()));
}
+ target.setType(source.getType());
+ target.setContent(source.getContent());
}
}
diff --git a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/mapping/MapActivitySpecToActivitySpecGetResponse.java b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/mapping/MapActivitySpecToActivitySpecGetResponse.java
index 25e0f6e9c4..697e1bd667 100644
--- a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/mapping/MapActivitySpecToActivitySpecGetResponse.java
+++ b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/mapping/MapActivitySpecToActivitySpecGetResponse.java
@@ -32,18 +32,20 @@ public class MapActivitySpecToActivitySpecGetResponse extends MappingBase<Activi
target.setName(source.getName());
target.setDescription(source.getDescription());
target.setCategoryList(source.getCategoryList());
- if (Objects.nonNull(source.getInputParameters())) {
- target.setInputParameters(source.getInputParameters().stream().map(
+ if (Objects.nonNull(source.getInputs())) {
+ target.setInputs(source.getInputs().stream().map(
activitySpecParameter -> new MapActivityParameterToDto()
.applyMapping(activitySpecParameter, ActivitySpecParameterDto
.class)).collect(Collectors.toList()));
}
- if (Objects.nonNull(source.getOutputParameters())) {
- target.setOutputParameters(source.getOutputParameters().stream().map(
+ if (Objects.nonNull(source.getOutputs())) {
+ target.setOutputs(source.getOutputs().stream().map(
activitySpecParameter -> new MapActivityParameterToDto()
.applyMapping(activitySpecParameter, ActivitySpecParameterDto
.class)).collect(Collectors.toList()));
}
target.setStatus(source.getStatus());
+ target.setType(source.getType());
+ target.setContent(source.getContent());
}
}
diff --git a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/types/ActivitySpecGetResponse.java b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/types/ActivitySpecGetResponse.java
index cf3fa969fa..9453935559 100644
--- a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/types/ActivitySpecGetResponse.java
+++ b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/types/ActivitySpecGetResponse.java
@@ -23,7 +23,9 @@ public class ActivitySpecGetResponse {
private String name;
private String description;
private List<String> categoryList;
- private List<ActivitySpecParameterDto> inputParameters;
- private List<ActivitySpecParameterDto> outputParameters;
+ private List<ActivitySpecParameterDto> inputs;
+ private List<ActivitySpecParameterDto> outputs;
private String status;
+ private String type;
+ private String content;
}
diff --git a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/types/ActivitySpecRequestDto.java b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/types/ActivitySpecRequestDto.java
index 77ea393ce3..67455f9c9e 100644
--- a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/types/ActivitySpecRequestDto.java
+++ b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/api/rest/types/ActivitySpecRequestDto.java
@@ -32,6 +32,8 @@ public class ActivitySpecRequestDto {
private String description;
private List<String> categoryList;
- private List<ActivitySpecParameterDto> inputParameters;
- private List<ActivitySpecParameterDto> outputParameters;
+ private List<ActivitySpecParameterDto> inputs;
+ private List<ActivitySpecParameterDto> outputs;
+ private String type;
+ private String content;
}
diff --git a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/dao/impl/ActivitySpecDaoZusammenImpl.java b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/dao/impl/ActivitySpecDaoZusammenImpl.java
index d9d495a01a..0dabcca984 100644
--- a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/dao/impl/ActivitySpecDaoZusammenImpl.java
+++ b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/dao/impl/ActivitySpecDaoZusammenImpl.java
@@ -112,8 +112,10 @@ public class ActivitySpecDaoZusammenImpl implements ActivitySpecDao {
private void enrichEntityFromElementData(ActivitySpecEntity entity, InputStream data) {
ActivitySpecData activitySpecData = JsonUtil.json2Object(data, ActivitySpecData.class);
if (Objects.nonNull(activitySpecData)) {
- entity.setInputParameters(activitySpecData.getInputParameters());
- entity.setOutputParameters(activitySpecData.getOutputParameters());
+ entity.setInputs(activitySpecData.getInputs());
+ entity.setOutputs(activitySpecData.getOutputs());
+ entity.setType(activitySpecData.getType());
+ entity.setContent(activitySpecData.getContent());
}
}
@@ -127,8 +129,10 @@ public class ActivitySpecDaoZusammenImpl implements ActivitySpecDao {
private void enrichElementDataFromEntity(ZusammenElement element, ActivitySpecEntity entity) {
ActivitySpecData activitySpecData = new ActivitySpecData();
- activitySpecData.setInputParameters(entity.getInputParameters());
- activitySpecData.setOutputParameters(entity.getOutputParameters());
+ activitySpecData.setInputs(entity.getInputs());
+ activitySpecData.setOutputs(entity.getOutputs());
+ activitySpecData.setType(entity.getType());
+ activitySpecData.setContent(entity.getContent());
element.setData(new ByteArrayInputStream(JsonUtil.object2Json(activitySpecData).getBytes()));
}
diff --git a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/dao/types/ActivitySpecEntity.java b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/dao/types/ActivitySpecEntity.java
index b21e424a2f..2f261f8fa9 100644
--- a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/dao/types/ActivitySpecEntity.java
+++ b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/dao/types/ActivitySpecEntity.java
@@ -29,8 +29,10 @@ public class ActivitySpecEntity {
private String description;
private List<String> categoryList;
- private List<ActivitySpecParameter> inputParameters;
- private List<ActivitySpecParameter> outputParameters;
+ private List<ActivitySpecParameter> inputs;
+ private List<ActivitySpecParameter> outputs;
+ private String type;
+ private String content;
//Not to be maintained in activityspec element
private String status;
diff --git a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/datatypes/ActivitySpecData.java b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/datatypes/ActivitySpecData.java
index e884bfc784..ad70376aa2 100644
--- a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/datatypes/ActivitySpecData.java
+++ b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/datatypes/ActivitySpecData.java
@@ -21,7 +21,9 @@ import java.util.List;
@lombok.Data
public class ActivitySpecData {
- private List<ActivitySpecParameter> inputParameters = Collections.emptyList();
- private List<ActivitySpecParameter> outputParameters = Collections.emptyList();
+ private List<ActivitySpecParameter> inputs = Collections.emptyList();
+ private List<ActivitySpecParameter> outputs = Collections.emptyList();
+ private String type;
+ private String content;
}