diff options
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest')
5 files changed, 25 insertions, 41 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/RestConstants.java b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/RestConstants.java index 7bc1082ebe..302af10dc2 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/RestConstants.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/RestConstants.java @@ -21,10 +21,12 @@ package org.openecomp.sdcrests.common; public class RestConstants { - public static final String USER_ID_HEADER_PARAM = "USER_ID"; // value Should be equal to com.tlv.sdc.common.api.Constants#USER_ID_HEADER + public static final String USER_ID_HEADER_PARAM = "USER_ID"; + public static final String LAST_DELIVERED_QUERY_PARAM = "LAST_DELIVERED_EVENT_ID"; public static final String USER_MISSING_ERROR_MSG = "Field does not conform to predefined criteria : user : may not be null"; + public static final String INVALID_JSON_ERROR_MESSAGE = "Field does not conform to predefined criteria : body :must be in JSON format"; } diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/types/VersionDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/types/VersionDto.java deleted file mode 100644 index b5b86c65a2..0000000000 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/types/VersionDto.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.openecomp.sdcrests.common.types; - -/** - * Created by SVISHNEV on 3/5/2017. - */ -public class VersionDto { - String id; - String label; - - public VersionDto(){ - - } - - public VersionDto(String id, String label) { - this.id = id; - this.label = label; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } -} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/mapping/EchoMapMapping.java b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/mapping/EchoMapMapping.java new file mode 100644 index 0000000000..81c2f37a66 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/mapping/EchoMapMapping.java @@ -0,0 +1,14 @@ +package org.openecomp.sdcrests.mapping; + +import java.util.HashMap; + +/** + * Created by ayalaben on 9/12/2017 + */ +public class EchoMapMapping extends MappingBase<HashMap<String,String>,HashMap<String,String>> { + + @Override +public void doMapping(HashMap<String,String> source, HashMap<String, String> target) { + target.putAll(source); + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/mapping/EchoMapping.java b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/mapping/EchoMapping.java new file mode 100644 index 0000000000..4e5a22e3c7 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/mapping/EchoMapping.java @@ -0,0 +1,8 @@ +package org.openecomp.sdcrests.mapping; + +public class EchoMapping extends MappingBase <Object,Object>{ + @Override + public void doMapping(Object source, Object target) { + target = source; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/mapping/MappingBase.java b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/mapping/MappingBase.java index 2310c0f6ce..25c2be9158 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/mapping/MappingBase.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/mapping/MappingBase.java @@ -23,15 +23,11 @@ package org.openecomp.sdcrests.mapping; import org.openecomp.sdc.common.errors.CoreException; import org.openecomp.sdc.common.errors.ErrorCategory; import org.openecomp.sdc.common.errors.ErrorCode; -import org.openecomp.sdc.common.errors.Messages; import org.openecomp.sdc.datatypes.error.ErrorLevel; import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage; import org.openecomp.sdc.logging.types.LoggerConstants; import org.openecomp.sdc.logging.types.LoggerServiceName; -import org.openecomp.sdc.logging.api.Logger; -import org.openecomp.sdc.logging.api.LoggerFactory; - /** * Base class for all mapping classes. Mapping classes will perform data mapping from source object * to target object Base class provides following<br> <ol> <li>provides life cycle of @@ -55,8 +51,6 @@ public abstract class MappingBase<S, T> { * @return <code>T</code> - instance of type <code>T</code> */ - private final Logger logger = (Logger) LoggerFactory.getLogger(this.getClass().getName()); - public final T applyMapping(final S source, Class<T> clazz) { T target = (T) instantiateTarget(clazz); if (source == null || target == null) { |