summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/RestConstants.java18
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/mapping/MapErrorCodeToDto.java18
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/mapping/MapErrorMessageToDto.java16
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/types/ErrorCodeDto.java48
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/types/ErrorMessageDto.java34
5 files changed, 65 insertions, 69 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 230d1610eb..3f7dd523f9 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
@@ -13,20 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.openecomp.sdcrests.common;
public class RestConstants {
- // 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";
- private RestConstants() {
+ // 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";
- }
+ private RestConstants() {
+ }
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/mapping/MapErrorCodeToDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/mapping/MapErrorCodeToDto.java
index cad5c69899..558d2e7c22 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/mapping/MapErrorCodeToDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/mapping/MapErrorCodeToDto.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.common.mapping;
import org.openecomp.sdc.common.errors.ErrorCode;
@@ -25,10 +24,11 @@ import org.openecomp.sdcrests.common.types.ErrorCodeDto;
import org.openecomp.sdcrests.mapping.MappingBase;
public class MapErrorCodeToDto extends MappingBase<ErrorCode, ErrorCodeDto> {
- @Override
- public void doMapping(ErrorCode source, ErrorCodeDto target) {
- target.setId(source.id());
- target.setCategory(source.category());
- target.setMessage(source.message());
- }
+
+ @Override
+ public void doMapping(ErrorCode source, ErrorCodeDto target) {
+ target.setId(source.id());
+ target.setCategory(source.category());
+ target.setMessage(source.message());
+ }
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/mapping/MapErrorMessageToDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/mapping/MapErrorMessageToDto.java
index 83c7b15980..78262b8c30 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/mapping/MapErrorMessageToDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/mapping/MapErrorMessageToDto.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.common.mapping;
import org.openecomp.sdc.datatypes.error.ErrorMessage;
@@ -25,9 +24,10 @@ import org.openecomp.sdcrests.common.types.ErrorMessageDto;
import org.openecomp.sdcrests.mapping.MappingBase;
public class MapErrorMessageToDto extends MappingBase<ErrorMessage, ErrorMessageDto> {
- @Override
- public void doMapping(ErrorMessage source, ErrorMessageDto target) {
- target.setMessage(source.getMessage());
- target.setLevel(source.getLevel());
- }
+
+ @Override
+ public void doMapping(ErrorMessage source, ErrorMessageDto target) {
+ target.setMessage(source.getMessage());
+ target.setLevel(source.getLevel());
+ }
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/types/ErrorCodeDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/types/ErrorCodeDto.java
index 3615f89afc..f70d863653 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/types/ErrorCodeDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/types/ErrorCodeDto.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,37 +17,37 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.sdcrests.common.types;
import org.openecomp.sdc.common.errors.ErrorCategory;
public class ErrorCodeDto {
- private String id;
- private String message;
- private ErrorCategory category;
- public String getId() {
- return id;
- }
+ private String id;
+ private String message;
+ private ErrorCategory category;
+
+ public String getId() {
+ return id;
+ }
- public void setId(String id) {
- this.id = id;
- }
+ public void setId(String id) {
+ this.id = id;
+ }
- public String getMessage() {
- return message;
- }
+ public String getMessage() {
+ return message;
+ }
- public void setMessage(String message) {
- this.message = message;
- }
+ public void setMessage(String message) {
+ this.message = message;
+ }
- public ErrorCategory getCategory() {
- return category;
- }
+ public ErrorCategory getCategory() {
+ return category;
+ }
- public void setCategory(ErrorCategory category) {
- this.category = category;
- }
+ public void setCategory(ErrorCategory category) {
+ this.category = category;
+ }
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/types/ErrorMessageDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/types/ErrorMessageDto.java
index f63a9b0ced..9bac491ed1 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/types/ErrorMessageDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/common/types/ErrorMessageDto.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,28 +17,28 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.sdcrests.common.types;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
public class ErrorMessageDto {
- private ErrorLevel level;
- private String message;
- public ErrorLevel getLevel() {
- return level;
- }
+ private ErrorLevel level;
+ private String message;
+
+ public ErrorLevel getLevel() {
+ return level;
+ }
- public void setLevel(ErrorLevel level) {
- this.level = level;
- }
+ public void setLevel(ErrorLevel level) {
+ this.level = level;
+ }
- public String getMessage() {
- return message;
- }
+ public String getMessage() {
+ return message;
+ }
- public void setMessage(String message) {
- this.message = message;
- }
+ public void setMessage(String message) {
+ this.message = message;
+ }
}