aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapActivityLogEntityToDto.java23
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapItemToDto.java26
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapRevisionToDto.java20
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapVersionToDto.java30
4 files changed, 48 insertions, 51 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapActivityLogEntityToDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapActivityLogEntityToDto.java
index 307b555720..633da0a92a 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapActivityLogEntityToDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapActivityLogEntityToDto.java
@@ -17,7 +17,6 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.sdcrests.item.rest.mapping;
import org.openecomp.sdc.activitylog.dao.type.ActivityLogEntity;
@@ -25,17 +24,15 @@ import org.openecomp.sdcrests.item.types.ActivityLogDto;
import org.openecomp.sdcrests.item.types.ActivityStatus;
import org.openecomp.sdcrests.mapping.MappingBase;
-public class MapActivityLogEntityToDto
- extends MappingBase<ActivityLogEntity, ActivityLogDto> {
-
+public class MapActivityLogEntityToDto extends MappingBase<ActivityLogEntity, ActivityLogDto> {
- @Override
- public void doMapping(ActivityLogEntity source, ActivityLogDto target) {
- target.setId(source.getId());
- target.setTimestamp(source.getTimestamp());
- target.setType(source.getType().name());
- target.setComment(source.getComment());
- target.setUser(source.getUser());
- target.setStatus(new ActivityStatus(source.isSuccess(), source.getMessage()));
- }
+ @Override
+ public void doMapping(ActivityLogEntity source, ActivityLogDto target) {
+ target.setId(source.getId());
+ target.setTimestamp(source.getTimestamp());
+ target.setType(source.getType().name());
+ target.setComment(source.getComment());
+ target.setUser(source.getUser());
+ target.setStatus(new ActivityStatus(source.isSuccess(), source.getMessage()));
+ }
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapItemToDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapItemToDto.java
index 68bd9a51fb..3bd8a7fe9f 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapItemToDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapItemToDto.java
@@ -7,9 +7,9 @@
* 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.
@@ -17,7 +17,6 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.sdcrests.item.rest.mapping;
import org.openecomp.sdc.versioning.types.Item;
@@ -25,14 +24,15 @@ import org.openecomp.sdcrests.item.types.ItemDto;
import org.openecomp.sdcrests.mapping.MappingBase;
public class MapItemToDto extends MappingBase<Item, ItemDto> {
- @Override
- public void doMapping(Item source, ItemDto target) {
- target.setId(source.getId());
- target.setType(source.getType());
- target.setName(source.getName());
- target.setDescription(source.getDescription());
- target.setOwner(source.getOwner());
- target.setStatus(source.getStatus().name());
- target.setProperties(source.getProperties());
- }
+
+ @Override
+ public void doMapping(Item source, ItemDto target) {
+ target.setId(source.getId());
+ target.setType(source.getType());
+ target.setName(source.getName());
+ target.setDescription(source.getDescription());
+ target.setOwner(source.getOwner());
+ target.setStatus(source.getStatus().name());
+ target.setProperties(source.getProperties());
+ }
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapRevisionToDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapRevisionToDto.java
index b66b289ce9..13838f794b 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapRevisionToDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapRevisionToDto.java
@@ -7,9 +7,9 @@
* 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.
@@ -17,7 +17,6 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.sdcrests.item.rest.mapping;
import org.openecomp.sdc.versioning.dao.types.Revision;
@@ -25,11 +24,12 @@ import org.openecomp.sdcrests.item.types.RevisionDto;
import org.openecomp.sdcrests.mapping.MappingBase;
public class MapRevisionToDto extends MappingBase<Revision, RevisionDto> {
- @Override
- public void doMapping(Revision source, RevisionDto target) {
- target.setId(source.getId());
- target.setMessage(source.getMessage());
- target.setUser(source.getUser());
- target.setTime(source.getTime());
- }
+
+ @Override
+ public void doMapping(Revision source, RevisionDto target) {
+ target.setId(source.getId());
+ target.setMessage(source.getMessage());
+ target.setUser(source.getUser());
+ target.setTime(source.getTime());
+ }
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapVersionToDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapVersionToDto.java
index a29ac8acf6..382b85a761 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapVersionToDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/mapping/MapVersionToDto.java
@@ -7,9 +7,9 @@
* 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.
@@ -17,7 +17,6 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.sdcrests.item.rest.mapping;
import org.openecomp.sdc.versioning.dao.types.Version;
@@ -25,16 +24,17 @@ import org.openecomp.sdcrests.item.types.VersionDto;
import org.openecomp.sdcrests.mapping.MappingBase;
public class MapVersionToDto extends MappingBase<Version, VersionDto> {
- @Override
- public void doMapping(Version source, VersionDto target) {
- target.setId(source.getId());
- target.setName(source.getName());
- target.setDescription(source.getDescription());
- target.setBaseId(source.getBaseId());
- target.setStatus(source.getStatus());
- target.setState(source.getState());
- target.setCreationTime(source.getCreationTime());
- target.setModificationTime(source.getModificationTime());
- target.setAdditionalInfo(source.getAdditionalInfo());
- }
+
+ @Override
+ public void doMapping(Version source, VersionDto target) {
+ target.setId(source.getId());
+ target.setName(source.getName());
+ target.setDescription(source.getDescription());
+ target.setBaseId(source.getBaseId());
+ target.setStatus(source.getStatus());
+ target.setState(source.getState());
+ target.setCreationTime(source.getCreationTime());
+ target.setModificationTime(source.getModificationTime());
+ target.setAdditionalInfo(source.getAdditionalInfo());
+ }
}