summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/api')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml.versionsBackup143
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/services/ActionsImpl.java279
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/pom.xml.versionsBackup36
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/pom.xml.versionsBackup22
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml.versionsBackup63
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/pom.xml.versionsBackup18
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/pom.xml.versionsBackup24
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml.versionsBackup226
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/DefaultOutput.java17
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/webapp/WEB-INF/beans-services.xml1
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml6
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml.versionsBackup44
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/errors/DefaultExceptionMapper.java25
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/mapping/MappingBase.java22
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/wrappers/GenericCollectionWrapper.java2
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/pom.xml.versionsBackup28
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/sequence-rest/pom.xml.versionsBackup15
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/pom.xml.versionsBackup21
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml.versionsBackup152
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-types/pom.xml.versionsBackup30
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/pom.xml.versionsBackup23
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/pom.xml.versionsBackup135
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolEntityToEntitlementPoolEntityDto.java8
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolRequestDtoToEntitlementPoolEntity.java9
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupEntityToLicenseKeyGroupEntityDto.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLimitEntityToLimitDto.java4
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLimitRequestDtoToLimitEntity.java97
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolLimitsImpl.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java6
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseAgreementsImpl.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupLimitsImpl.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupsImpl.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java9
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/pom.xml.versionsBackup29
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java46
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupDescriptorDto.java2
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseKeyGroupRequestDto.java51
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitEntityDto.java12
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitRequestDto.java16
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/pom.xml.versionsBackup21
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml.versionsBackup153
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapComponentDependencyModelRequestToEntity.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java8
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java31
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/pom.xml.versionsBackup30
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeDetailsDto.java1
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorRequestDto.java1
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ImageRequestDto.java1
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/NicRequestDto.java1
-rw-r--r--openecomp-be/api/pom.xml.versionsBackup21
52 files changed, 333 insertions, 1596 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml.versionsBackup
deleted file mode 100644
index 47b9bdde7b..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml.versionsBackup
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>action-library-rest-services</artifactId>
- <parent>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>action-library-rest</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
-
- <properties>
- <errorcode.dir>${project.build.directory}/generated-sources/error-codes</errorcode.dir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>action-library-rest-types</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <!-- Spring -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context-support</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
-
- <!-- CXF -->
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxrs</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>${http.client.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpcore</artifactId>
- <version>${http.client.version}</version>
- </dependency>
-
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- <version>${ws.rs.version}</version>
- </dependency>
-
- <!-- Other Stuff-->
- <!--dependency>
- <groupId>cglib</groupId>
- <artifactId>cglib-nodep</artifactId>
- <version>${cglib.nodep.version}</version>
- <scope>runtime</scope>
- </dependency-->
-
- <!-- Java Stuff -->
- <dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>${javax.inject.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-action-manager</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-action-api</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-logging-api</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.7.21</version>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey.contribs</groupId>
- <artifactId>jersey-multipart</artifactId>
- <version>1.18.1</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>test/core/unittest/offline/**</include>
- </includes>
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
- <!-- Error codes generator plugin -->
- <!--plugin>
- <groupId>org.openecomp.nfv.tools</groupId>
- <artifactId>error-codes-maven-plugin</artifactId>
- </plugin-->
- </plugins>
- </build>
-
-
-
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/services/ActionsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/services/ActionsImpl.java
index 2ed5235867..e6f5e6b1a3 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/services/ActionsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/services/ActionsImpl.java
@@ -20,86 +20,9 @@
package org.openecomp.sdcrests.action.rest.services;
-import static org.openecomp.sdc.action.ActionConstants.ACTION_REQUEST_PARAM_NAME;
-import static org.openecomp.sdc.action.ActionConstants.ACTION_REQUEST_PARAM_SUPPORTED_COMPONENTS;
-import static org.openecomp.sdc.action.ActionConstants.ACTION_REQUEST_PARAM_SUPPORTED_MODELS;
-import static org.openecomp.sdc.action.ActionConstants.ARTIFACT_FILE;
-import static org.openecomp.sdc.action.ActionConstants.ARTIFACT_NAME;
-import static org.openecomp.sdc.action.ActionConstants.BE_FQDN;
-import static org.openecomp.sdc.action.ActionConstants.CATEGORY_LOG_LEVEL;
-import static org.openecomp.sdc.action.ActionConstants.CLIENT_IP;
-import static org.openecomp.sdc.action.ActionConstants.ERROR_DESCRIPTION;
-import static org.openecomp.sdc.action.ActionConstants.FILTER_TYPE_CATEGORY;
-import static org.openecomp.sdc.action.ActionConstants.FILTER_TYPE_OPEN_ECOMP_COMPONENT;
-import static org.openecomp.sdc.action.ActionConstants.FILTER_TYPE_MODEL;
-import static org.openecomp.sdc.action.ActionConstants.FILTER_TYPE_NAME;
-import static org.openecomp.sdc.action.ActionConstants.FILTER_TYPE_NONE;
-import static org.openecomp.sdc.action.ActionConstants.FILTER_TYPE_VENDOR;
-import static org.openecomp.sdc.action.ActionConstants.INSTANCE_UUID;
-import static org.openecomp.sdc.action.ActionConstants.LOCAL_ADDR;
-import static org.openecomp.sdc.action.ActionConstants.MAX_ACTION_ARTIFACT_SIZE;
-import static org.openecomp.sdc.action.ActionConstants.MDC_ASDC_INSTANCE_UUID;
-import static org.openecomp.sdc.action.ActionConstants.PARTNER_NAME;
-import static org.openecomp.sdc.action.ActionConstants.REMOTE_HOST;
-import static org.openecomp.sdc.action.ActionConstants.REQUEST_EMPTY_BODY;
-import static org.openecomp.sdc.action.ActionConstants.REQUEST_ID;
-import static org.openecomp.sdc.action.ActionConstants.REQUEST_TYPE_CREATE_ACTION;
-import static org.openecomp.sdc.action.ActionConstants.REQUEST_TYPE_UPDATE_ACTION;
-import static org.openecomp.sdc.action.ActionConstants.REQUEST_TYPE_VERSION_ACTION;
-import static org.openecomp.sdc.action.ActionConstants.SERVICE_INSTANCE_ID;
-import static org.openecomp.sdc.action.ActionConstants.SERVICE_METRIC_BEGIN_TIMESTAMP;
-import static org.openecomp.sdc.action.ActionConstants.SERVICE_NAME;
-import static org.openecomp.sdc.action.ActionConstants.STATUS;
-import static org.openecomp.sdc.action.ActionConstants.STATUS_CODE;
-import static org.openecomp.sdc.action.ActionConstants.SUPPORTED_COMPONENTS_ID;
-import static org.openecomp.sdc.action.ActionConstants.SUPPORTED_MODELS_VERSION_ID;
-import static org.openecomp.sdc.action.ActionConstants.TARGET_ENTITY;
-import static org.openecomp.sdc.action.ActionConstants.TARGET_ENTITY_API;
-import static org.openecomp.sdc.action.ActionConstants.TARGET_SERVICE_NAME;
-import static org.openecomp.sdc.action.ActionConstants.TIMESTAMP;
-import static org.openecomp.sdc.action.ActionConstants.UPDATED_BY;
-import static org.openecomp.sdc.action.ActionConstants.X_OPEN_ECOMP_INSTANCE_ID_HEADER_PARAM;
-import static org.openecomp.sdc.action.ActionConstants.X_OPEN_ECOMP_REQUEST_ID_HEADER_PARAM;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_CHECKSUM_ERROR_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_INVALID_NAME;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_INVALID_NAME_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_INVALID_PROTECTION_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_READ_FILE_ERROR;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_TOO_BIG_ERROR;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_TOO_BIG_ERROR_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ENTITY_NOT_EXIST;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ENTITY_NOT_EXIST_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_FILTER_MULTIPLE_QUERY_PARAM_NOT_SUPPORTED;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_INTERNAL_SERVER_ERR_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_INVALID_INSTANCE_ID_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_INVALID_PARAM_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_INVALID_REQUEST_BODY_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_INVALID_REQUEST_ID_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_INVALID_SEARCH_CRITERIA;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_MULT_SEARCH_CRITERIA;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_REQUEST_ARTIFACT_CHECKSUM_ERROR;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_REQUEST_ARTIFACT_INVALID_PROTECTION_VALUE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_REQUEST_ARTIFACT_OPERATION_ALLOWED;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_REQUEST_BODY_EMPTY;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_REQUEST_CONTENT_TYPE_INVALID;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_REQUEST_OPEN_ECOMP_INSTANCE_ID_INVALID;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_REQUEST_OPEN_ECOMP_REQUEST_ID_INVALID;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_REQUEST_FILTER_PARAM_INVALID;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_REQUEST_INVALID_GENERIC_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_REQUEST_INVALID_NAME;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_REQUEST_MISSING_MANDATORY_PARAM;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UNSUPPORTED_OPERATION;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UPDATE_NOT_ALLOWED_CODE;
-import static org.openecomp.sdc.action.util.ActionUtil.actionErrorLogProcessor;
-import static org.openecomp.sdc.action.util.ActionUtil.actionLogPostProcessor;
-import static org.openecomp.sdc.action.util.ActionUtil.getUtcDateStringFromTimestamp;
-
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.core.utilities.file.FileUtils;
import org.openecomp.core.utilities.json.JsonUtil;
import org.openecomp.sdc.action.ActionConstants;
@@ -108,11 +31,9 @@ import org.openecomp.sdc.action.errors.ActionErrorConstants;
import org.openecomp.sdc.action.errors.ActionException;
import org.openecomp.sdc.action.logging.CategoryLogLevel;
import org.openecomp.sdc.action.logging.StatusCode;
-import org.openecomp.sdc.action.types.Action;
-import org.openecomp.sdc.action.types.ActionArtifact;
-import org.openecomp.sdc.action.types.ActionArtifactProtection;
-import org.openecomp.sdc.action.types.ActionRequest;
-import org.openecomp.sdc.action.types.OpenEcompComponent;
+import org.openecomp.sdc.action.types.*;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdcrests.action.rest.Actions;
import org.openecomp.sdcrests.action.rest.mapping.MapActionToActionResponseDto;
import org.openecomp.sdcrests.action.types.ActionResponseDto;
@@ -125,18 +46,18 @@ import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
+import javax.inject.Named;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import javax.inject.Named;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Response;
+import java.util.*;
+
+import static org.openecomp.sdc.action.ActionConstants.*;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.*;
+import static org.openecomp.sdc.action.util.ActionUtil.*;
/**
* Implements various CRUD API that can be performed on Action
@@ -148,7 +69,7 @@ import javax.ws.rs.core.Response;
@Validated
public class ActionsImpl implements Actions {
- private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName());
+ private static final Logger LOGGER = (Logger) LoggerFactory.getLogger(ActionsImpl.class);
@Autowired
private ActionManager actionManager;
private String whitespaceCharacters = "\\s" /* dummy empty string for homogeneity */
@@ -203,7 +124,7 @@ public class ActionsImpl implements Actions {
ListResponseWrapper responseList = new ListResponseWrapper();
try {
- log.debug(" entering getActionsByActionInvariantUuId ");
+ LOGGER.debug(" entering getActionsByActionInvariantUuId ");
initializeRequestMDC(servletRequest, invariantID, ActionRequest.GET_ACTIONS_INVARIANT_ID);
MDC.put(SERVICE_INSTANCE_ID, invariantID);
@@ -217,26 +138,26 @@ public class ActionsImpl implements Actions {
} catch (ActionException exception) {
actionLogPostProcessor(StatusCode.ERROR, exception.getErrorCode(), exception.getDescription(), true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, exception.getErrorCode(), exception.getDescription());
- log.error("");
+ LOGGER.error("");
throw exception;
} catch (Exception exception) {
actionLogPostProcessor(StatusCode.ERROR, true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, ACTION_INTERNAL_SERVER_ERR_CODE,
ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
- log.error("");
+ LOGGER.error("");
throw exception;
} finally {
finalAuditMetricsLogProcessor(ActionRequest.GET_ACTIONS_INVARIANT_ID.name());
}
- log.debug(" exit getActionsByActionInvariantUuId ");
+ LOGGER.debug(" exit getActionsByActionInvariantUuId ");
actionLogPostProcessor(StatusCode.COMPLETE, true);
return Response.ok(responseList).build();
}
private ListResponseWrapper getActionsByInvId(HttpServletRequest servletRequest,
String invariantID) {
- log.debug(" entering getActionsByInvId with invariantID= " + invariantID);
+ LOGGER.debug(" entering getActionsByInvId with invariantID= " + invariantID);
ListResponseWrapper responseList = new ListResponseWrapper();
if (StringUtils.isEmpty(servletRequest.getQueryString())) {
Map<String, String> errorMap = validateRequestHeaders(servletRequest);
@@ -244,7 +165,7 @@ public class ActionsImpl implements Actions {
errorMap.putAll(queryParamErrors);
if (errorMap.isEmpty()) {
List<Action> actions = actionManager.getActionsByActionInvariantUuId(invariantID);
- List<ActionResponseDto> versionList = new ArrayList<ActionResponseDto>();
+ List<ActionResponseDto> versionList = new ArrayList<>();
for (Action action : actions) {
ActionResponseDto responseDTO = createResponseDTO(action);
versionList.add(responseDTO);
@@ -256,7 +177,7 @@ public class ActionsImpl implements Actions {
checkAndThrowError(errorMap);
}
}
- log.debug(" exit getActionsByInvId with invariantID= " + invariantID);
+ LOGGER.debug(" exit getActionsByInvId with invariantID= " + invariantID);
return responseList;
}
@@ -264,7 +185,7 @@ public class ActionsImpl implements Actions {
String actionUUID) throws ActionException {
int noOfFilterParams = 0;
Response response = null;
- log.debug(" entering getActionByUUID with invariantID= " + invariantID + " and actionUUID= " +
+ LOGGER.debug(" entering getActionByUUID with invariantID= " + invariantID + " and actionUUID= " +
actionUUID);
if (!StringUtils.isEmpty(actionUUID)) {
noOfFilterParams++;
@@ -275,7 +196,7 @@ public class ActionsImpl implements Actions {
ACTION_REQUEST_FILTER_PARAM_INVALID);
}
- log.debug(" exit getActionByUUID with invariantID= " + invariantID + " and actionUUID= " +
+ LOGGER.debug(" exit getActionByUUID with invariantID= " + invariantID + " and actionUUID= " +
actionUUID);
return response;
}
@@ -283,7 +204,7 @@ public class ActionsImpl implements Actions {
@Override
public Response getOpenEcompComponents(HttpServletRequest servletRequest) {
try {
- log.debug(" entering getOpenEcompComponents ");
+ LOGGER.debug(" entering getEcompComponents ");
initializeRequestMDC(servletRequest, "", ActionRequest.GET_OPEN_ECOMP_COMPONENTS);
//Validate request syntax before passing to the manager
Map<String, String> errorMap = validateRequestHeaders(servletRequest);
@@ -292,19 +213,19 @@ public class ActionsImpl implements Actions {
List<OpenEcompComponent> openEcompComponents = actionManager.getOpenEcompComponents();
response.setActionList(null);
response.setComponentList(openEcompComponents);
- log.debug(" exit getOpenEcompComponents ");
+ LOGGER.debug(" exit getEcompComponents ");
actionLogPostProcessor(StatusCode.COMPLETE, true);
return Response.ok(response).build();
} catch (ActionException exception) {
actionLogPostProcessor(StatusCode.ERROR, exception.getErrorCode(), exception.getDescription(), true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, exception.getErrorCode(), exception.getDescription());
- log.error("");
+ LOGGER.error("");
throw exception;
} catch (Exception exception) {
actionLogPostProcessor(StatusCode.ERROR, true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, ACTION_INTERNAL_SERVER_ERR_CODE,
ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
- log.error("");
+ LOGGER.error("");
throw exception;
} finally {
finalAuditMetricsLogProcessor(ActionRequest.GET_OPEN_ECOMP_COMPONENTS.name());
@@ -315,40 +236,17 @@ public class ActionsImpl implements Actions {
public Response getFilteredActions(String vendor, String category, String name, String modelID,
String componentID, HttpServletRequest servletRequest) {
try {
- log.debug(" entering getFilteredActions ");
- Response response = null;
+ LOGGER.debug(" entering getFilteredActions ");
+ Response response;
initializeRequestMDC(servletRequest, "", ActionRequest.GET_FILTERED_ACTIONS);
- int noOfFilterParams = 0;
- if (!StringUtils.isEmpty(vendor)) {
- noOfFilterParams++;
- }
- if (!StringUtils.isEmpty(category)) {
- noOfFilterParams++;
- }
- if (!StringUtils.isEmpty(name)) {
- noOfFilterParams++;
- }
- if (!StringUtils.isEmpty(modelID)) {
- noOfFilterParams++;
- }
- if (!StringUtils.isEmpty(componentID)) {
- noOfFilterParams++;
- }
+ int noOfFilterParams = getNoOfFilterParams(vendor, category, name, modelID, componentID);
if (StringUtils.isEmpty(servletRequest.getQueryString())) {
response = getAllActions(servletRequest);
- log.debug(" exit getFilteredActions ");
+ LOGGER.debug(" exit getFilteredActions ");
actionLogPostProcessor(StatusCode.COMPLETE, true);
return response;
}
- if (noOfFilterParams > 1) {
- throw new ActionException(ACTION_MULT_SEARCH_CRITERIA,
- ACTION_FILTER_MULTIPLE_QUERY_PARAM_NOT_SUPPORTED);
- }
- if (noOfFilterParams == 0) {
- throw new ActionException(ACTION_INVALID_SEARCH_CRITERIA,
- ACTION_REQUEST_FILTER_PARAM_INVALID);
- }
- ListResponseWrapper responseList = null;
+ validateNoOfFilterParamsExactly1(noOfFilterParams);
if (!StringUtils.isEmpty(vendor)) {
response = getActionsByVendor(vendor, servletRequest);
} else if (!StringUtils.isEmpty(category)) {
@@ -363,30 +261,61 @@ public class ActionsImpl implements Actions {
throw new ActionException(ACTION_INVALID_PARAM_CODE, ACTION_REQUEST_FILTER_PARAM_INVALID);
}
- log.debug(" exit getFilteredActions ");
+ LOGGER.debug(" exit getFilteredActions ");
actionLogPostProcessor(StatusCode.COMPLETE, true);
return response;
} catch (ActionException exception) {
actionLogPostProcessor(StatusCode.ERROR, exception.getErrorCode(), exception.getDescription(), true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, exception.getErrorCode(), exception.getDescription());
- log.error("");
+ LOGGER.error("");
throw exception;
} catch (Exception exception) {
actionLogPostProcessor(StatusCode.ERROR, true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, ACTION_INTERNAL_SERVER_ERR_CODE,
ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
- log.error("");
+ LOGGER.error("");
throw exception;
} finally {
finalAuditMetricsLogProcessor(ActionRequest.GET_FILTERED_ACTIONS.name());
}
}
+ private void validateNoOfFilterParamsExactly1(int noOfFilterParams) {
+ if (noOfFilterParams > 1) {
+ throw new ActionException(ACTION_MULT_SEARCH_CRITERIA,
+ ACTION_FILTER_MULTIPLE_QUERY_PARAM_NOT_SUPPORTED);
+ }
+ if (noOfFilterParams == 0) {
+ throw new ActionException(ACTION_INVALID_SEARCH_CRITERIA,
+ ACTION_REQUEST_FILTER_PARAM_INVALID);
+ }
+ }
+
+ private int getNoOfFilterParams(String vendor, String category, String name, String modelID, String componentID) {
+ int noOfFilterParams = 0;
+ if (!StringUtils.isEmpty(vendor)) {
+ noOfFilterParams++;
+ }
+ if (!StringUtils.isEmpty(category)) {
+ noOfFilterParams++;
+ }
+ if (!StringUtils.isEmpty(name)) {
+ noOfFilterParams++;
+ }
+ if (!StringUtils.isEmpty(modelID)) {
+ noOfFilterParams++;
+ }
+ if (!StringUtils.isEmpty(componentID)) {
+ noOfFilterParams++;
+ }
+ return noOfFilterParams;
+ }
+
@Override
public Response createAction(String requestJSON, HttpServletRequest servletRequest) {
try {
initializeRequestMDC(servletRequest, null, ActionRequest.CREATE_ACTION);
- log.debug(" entering API createAction ");
+ LOGGER.debug(" entering API createAction ");
Map<String, String> errorMap = validateRequestHeaders(servletRequest);
Map<String, String> requestBodyErrors =
validateRequestBody(REQUEST_TYPE_CREATE_ACTION, requestJSON);
@@ -403,18 +332,18 @@ public class ActionsImpl implements Actions {
checkAndThrowError(errorMap);
}
actionLogPostProcessor(StatusCode.COMPLETE, true);
- log.debug(" exit API createAction with ActionInvariantUUID= " + MDC.get(SERVICE_INSTANCE_ID));
+ LOGGER.debug(" exit API createAction with ActionInvariantUUID= " + MDC.get(SERVICE_INSTANCE_ID));
return Response.ok(actionResponseDTO).build();
} catch (ActionException exception) {
actionLogPostProcessor(StatusCode.ERROR, exception.getErrorCode(), exception.getDescription(), true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, exception.getErrorCode(), exception.getDescription());
- log.error("");
+ LOGGER.error("");
throw exception;
} catch (Exception exception) {
actionLogPostProcessor(StatusCode.ERROR, true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, ACTION_INTERNAL_SERVER_ERR_CODE,
ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
- log.error(exception.getMessage());
+ LOGGER.error(exception.getMessage());
throw exception;
} finally {
finalAuditMetricsLogProcessor(ActionRequest.CREATE_ACTION.name());
@@ -447,13 +376,13 @@ public class ActionsImpl implements Actions {
} catch (ActionException exception) {
actionLogPostProcessor(StatusCode.ERROR, exception.getErrorCode(), exception.getDescription(), true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, exception.getErrorCode(), exception.getDescription());
- log.error("");
+ LOGGER.error("");
throw exception;
} catch (Exception exception) {
actionLogPostProcessor(StatusCode.ERROR, true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, ACTION_INTERNAL_SERVER_ERR_CODE,
ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
- log.error(exception.getMessage());
+ LOGGER.error(exception.getMessage());
throw exception;
} finally {
finalAuditMetricsLogProcessor(ActionRequest.UPDATE_ACTION.name());
@@ -479,13 +408,13 @@ public class ActionsImpl implements Actions {
} catch (ActionException exception) {
actionLogPostProcessor(StatusCode.ERROR, exception.getErrorCode(), exception.getDescription(), true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, exception.getErrorCode(), exception.getDescription());
- log.error(MDC.get(ERROR_DESCRIPTION));
+ LOGGER.error(MDC.get(ERROR_DESCRIPTION));
throw exception;
} catch (Exception exception) {
actionLogPostProcessor(StatusCode.ERROR, true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, ACTION_INTERNAL_SERVER_ERR_CODE,
ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
- log.error(exception.getMessage());
+ LOGGER.error(exception.getMessage());
throw exception;
} finally {
finalAuditMetricsLogProcessor(ActionRequest.DELETE_ACTION.name());
@@ -498,7 +427,7 @@ public class ActionsImpl implements Actions {
Response response = null;
try {
initializeRequestMDC(servletRequest, invariantUUID, ActionRequest.ACTION_VERSIONING);
- log.debug("entering actOnAction with invariantUUID= " + invariantUUID + " and requestJSON= " +
+ LOGGER.debug("entering actOnAction with invariantUUID= " + invariantUUID + " and requestJSON= " +
requestJSON);
Map<String, String> errorMap = validateRequestHeaders(servletRequest);
Map<String, String> requestBodyErrors =
@@ -542,17 +471,17 @@ public class ActionsImpl implements Actions {
} catch (ActionException exception) {
actionLogPostProcessor(StatusCode.ERROR, exception.getErrorCode(), exception.getDescription(), true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, exception.getErrorCode(), exception.getDescription());
- log.error(MDC.get(ERROR_DESCRIPTION));
+ LOGGER.error(MDC.get(ERROR_DESCRIPTION));
throw exception;
} catch (Exception exception) {
actionLogPostProcessor(StatusCode.ERROR, true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, ACTION_INTERNAL_SERVER_ERR_CODE,
ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
- log.error(exception.getMessage());
+ LOGGER.error(exception.getMessage());
throw exception;
} finally {
finalAuditMetricsLogProcessor(ActionRequest.ACTION_VERSIONING.name());
- log.debug("exit actOnAction with invariantUUID= " + invariantUUID + " and requestJSON= " +
+ LOGGER.debug("exit actOnAction with invariantUUID= " + invariantUUID + " and requestJSON= " +
requestJSON);
}
return response;
@@ -571,29 +500,29 @@ public class ActionsImpl implements Actions {
Response response = null;
try {
initializeRequestMDC(servletRequest, actionInvariantUUID, ActionRequest.UPLOAD_ARTIFACT);
- log.debug("entering uploadArtifact with actionInvariantUuId= " + actionInvariantUUID +
+ LOGGER.debug("entering uploadArtifact with actionInvariantUuId= " + actionInvariantUUID +
"artifactName= " + artifactName);
response =
uploadArtifactInternal(actionInvariantUUID, artifactName, artifactLabel, artifactCategory,
artifactDescription, artifactProtection, checksum, artifactToUpload, servletRequest);
actionLogPostProcessor(StatusCode.COMPLETE, true);
- log.debug("exiting uploadArtifact with actionInvariantUuId= " + actionInvariantUUID +
+ LOGGER.debug("exiting uploadArtifact with actionInvariantUuId= " + actionInvariantUUID +
"artifactName= " + artifactName);
} catch (ActionException exception) {
actionLogPostProcessor(StatusCode.ERROR, exception.getErrorCode(), exception.getDescription(), true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, exception.getErrorCode(), exception.getDescription());
- log.error(MDC.get(ERROR_DESCRIPTION));
+ LOGGER.error(MDC.get(ERROR_DESCRIPTION));
throw exception;
} catch (Exception exception) {
actionLogPostProcessor(StatusCode.ERROR, true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, ACTION_INTERNAL_SERVER_ERR_CODE,
ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
- log.error(exception.getMessage());
+ LOGGER.error(exception.getMessage());
throw exception;
} finally {
finalAuditMetricsLogProcessor(ActionRequest.UPLOAD_ARTIFACT.name());
}
- log.debug("exiting uploadArtifact with actionInvariantUuId= " + actionInvariantUUID +
+ LOGGER.debug("exiting uploadArtifact with actionInvariantUuId= " + actionInvariantUUID +
"artifactName= " + artifactName);
return response;
}
@@ -632,6 +561,7 @@ public class ActionsImpl implements Actions {
try {
artifactInputStream = artifactToUpload.getDataHandler().getInputStream();
} catch (IOException exception) {
+ LOGGER.error(ACTION_ARTIFACT_READ_FILE_ERROR, exception);
throw new ActionException(ACTION_INTERNAL_SERVER_ERR_CODE, ACTION_ARTIFACT_READ_FILE_ERROR);
}
@@ -680,7 +610,7 @@ public class ActionsImpl implements Actions {
Response response = null;
try {
initializeRequestMDC(servletRequest, "", ActionRequest.DOWNLOAD_ARTIFACT);
- log.debug(
+ LOGGER.debug(
" entering downloadArtifact with actionUUID= " + actionUUID + " and artifactUUID= " +
artifactUUID);
response = downloadArtifactInternal(actionUUID, artifactUUID, servletRequest);
@@ -688,18 +618,18 @@ public class ActionsImpl implements Actions {
} catch (ActionException exception) {
actionLogPostProcessor(StatusCode.ERROR, exception.getErrorCode(), exception.getDescription(), true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, exception.getErrorCode(), exception.getDescription());
- log.error(MDC.get(ERROR_DESCRIPTION));
+ LOGGER.error(MDC.get(ERROR_DESCRIPTION));
throw exception;
} catch (Exception exception) {
actionLogPostProcessor(StatusCode.ERROR, true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, ACTION_INTERNAL_SERVER_ERR_CODE,
ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
- log.error(exception.getMessage());
+ LOGGER.error(exception.getMessage());
throw exception;
} finally {
finalAuditMetricsLogProcessor(ActionRequest.DOWNLOAD_ARTIFACT.name());
}
- log.debug(" exit downloadArtifact with actionUUID= " + actionUUID + " and artifactUUID= " +
+ LOGGER.debug(" exit downloadArtifact with actionUUID= " + actionUUID + " and artifactUUID= " +
artifactUUID);
return response;
}
@@ -728,22 +658,22 @@ public class ActionsImpl implements Actions {
Response response = null;
try {
initializeRequestMDC(servletRequest, actionInvariantUUID, ActionRequest.DELETE_ARTIFACT);
- log.debug(" entering deleteArtifact with actionInvariantUuId= " + actionInvariantUUID +
+ LOGGER.debug(" entering deleteArtifact with actionInvariantUuId= " + actionInvariantUUID +
" and artifactUUID= " + artifactUUID);
response = deleteArtifactInternal(actionInvariantUUID, artifactUUID, servletRequest);
- log.debug(" exit deleteArtifact with actionInvariantUuId= " + actionInvariantUUID +
+ LOGGER.debug(" exit deleteArtifact with actionInvariantUuId= " + actionInvariantUUID +
" and artifactUUID= " + artifactUUID);
actionLogPostProcessor(StatusCode.COMPLETE, true);
} catch (ActionException exception) {
actionLogPostProcessor(StatusCode.ERROR, exception.getErrorCode(), exception.getDescription(), true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, exception.getErrorCode(), exception.getDescription());
- log.error(MDC.get(ERROR_DESCRIPTION));
+ LOGGER.error(MDC.get(ERROR_DESCRIPTION));
throw exception;
} catch (Exception exception) {
actionLogPostProcessor(StatusCode.ERROR, true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, ACTION_INTERNAL_SERVER_ERR_CODE,
ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
- log.error(exception.getMessage());
+ LOGGER.error(exception.getMessage());
throw exception;
} finally {
finalAuditMetricsLogProcessor(ActionRequest.DELETE_ARTIFACT.name());
@@ -774,7 +704,7 @@ public class ActionsImpl implements Actions {
String checksum, Attachment artifactToUpdate,
HttpServletRequest servletRequest) {
Response response = null;
- log.debug(" entering updateArtifact with actionInvariantUuId= " + actionInvariantUUID +
+ LOGGER.debug(" entering updateArtifact with actionInvariantUuId= " + actionInvariantUUID +
" and artifactUUID= " + artifactUUID + " and artifactName= " + artifactName +
" and artifactLabel= " + artifactLabel + " and artifactCategory= " + artifactCategory +
" and artifactDescription= " + artifactDescription + " and artifactProtection= " +
@@ -789,18 +719,18 @@ public class ActionsImpl implements Actions {
} catch (ActionException exception) {
actionLogPostProcessor(StatusCode.ERROR, exception.getErrorCode(), exception.getDescription(), true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, exception.getErrorCode(), exception.getDescription());
- log.error(MDC.get(ERROR_DESCRIPTION));
+ LOGGER.error(MDC.get(ERROR_DESCRIPTION));
throw exception;
} catch (Exception exception) {
actionLogPostProcessor(StatusCode.ERROR, true);
actionErrorLogProcessor(CategoryLogLevel.ERROR, ACTION_INTERNAL_SERVER_ERR_CODE,
ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
- log.error(exception.getMessage());
+ LOGGER.error(exception.getMessage());
throw exception;
} finally {
finalAuditMetricsLogProcessor(ActionRequest.UPDATE_ARTIFACT.name());
}
- log.debug(" exit updateArtifact with actionInvariantUuId= " + actionInvariantUUID +
+ LOGGER.debug(" exit updateArtifact with actionInvariantUuId= " + actionInvariantUUID +
" and artifactUUID= " + artifactUUID + " and artifactName= " + artifactName +
" and artifactLabel= " + artifactLabel + " and artifactCategory= " + artifactCategory +
" and artifactDescription= " + artifactDescription + " and artifactProtection= " +
@@ -811,8 +741,8 @@ public class ActionsImpl implements Actions {
private void finalAuditMetricsLogProcessor(String targetServiceName) {
MDC.put(TARGET_SERVICE_NAME, targetServiceName);
MDC.put(TARGET_ENTITY, TARGET_ENTITY_API);
- log.metrics("");
- log.audit("");
+ LOGGER.metrics("");
+ LOGGER.audit("");
}
private Response updateArtifactInternal(String actionInvariantUUID, String artifactUUID,
@@ -835,6 +765,7 @@ public class ActionsImpl implements Actions {
try {
artifactInputStream = artifactToUpdate.getDataHandler().getInputStream();
} catch (IOException exception) {
+ LOGGER.error(ACTION_ARTIFACT_READ_FILE_ERROR, exception);
throw new ActionException(ACTION_INTERNAL_SERVER_ERR_CODE, ACTION_ARTIFACT_READ_FILE_ERROR);
}
@@ -951,7 +882,7 @@ public class ActionsImpl implements Actions {
*/
private Response getActionsByUniqueID(String actionUUID, HttpServletRequest servletRequest,
String actionInvariantUUID) {
- log.debug(
+ LOGGER.debug(
" entering getActionByUUID with invariantID= " + actionInvariantUUID + " and actionUUID= " +
actionUUID);
Map<String, Object> responseDTO = new LinkedHashMap<>();
@@ -972,7 +903,7 @@ public class ActionsImpl implements Actions {
} else {
checkAndThrowError(errorMap);
}
- log.debug(
+ LOGGER.debug(
" exit getActionByUUID with invariantID= " + actionInvariantUUID + " and actionUUID= " +
actionUUID);
return Response.ok(responseDTO).build();
@@ -1175,11 +1106,11 @@ public class ActionsImpl implements Actions {
if (actionartifact != null && actionartifact.getArtifact() != null) {
byte[] artifactsBytes = actionartifact.getArtifact();
File artifactFile = new File(actionartifact.getArtifactName());
- try {
- FileOutputStream fos = new FileOutputStream(artifactFile);
+ try (FileOutputStream fos = new FileOutputStream(artifactFile)) {
fos.write(artifactsBytes);
fos.close();
} catch (IOException exception) {
+ LOGGER.error(ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG, exception);
throw new ActionException(ActionErrorConstants.ACTION_INTERNAL_SERVER_ERR_CODE,
ActionErrorConstants.ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
}
@@ -1215,13 +1146,13 @@ public class ActionsImpl implements Actions {
MDC.put(LOCAL_ADDR, MDC.get("ServerIPAddress"));
MDC.put(BE_FQDN, MDC.get("ServerFQDN"));
- if (log.isDebugEnabled()) {
+ if (LOGGER.isDebugEnabled()) {
MDC.put(CATEGORY_LOG_LEVEL, CategoryLogLevel.DEBUG.name());
- } else if (log.isInfoEnabled()) {
+ } else if (LOGGER.isInfoEnabled()) {
MDC.put(CATEGORY_LOG_LEVEL, CategoryLogLevel.INFO.name());
- } else if (log.isWarnEnabled()) {
+ } else if (LOGGER.isWarnEnabled()) {
MDC.put(CATEGORY_LOG_LEVEL, CategoryLogLevel.WARN.name());
- } else if (log.isErrorEnabled()) {
+ } else if (LOGGER.isErrorEnabled()) {
MDC.put(CATEGORY_LOG_LEVEL, CategoryLogLevel.ERROR.name());
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/pom.xml.versionsBackup
deleted file mode 100644
index 4749ce7f8c..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/pom.xml.versionsBackup
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>action-library-rest-types</artifactId>
- <name>action-library-rest-types</name>
-
- <parent>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>action-library-rest</artifactId>
- <version>1.0-SNAPSHOT</version>
- <relativePath>../</relativePath>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-common-rest</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-action-api</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <!--<dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-vendor-license-manager</artifactId>
- <version>${project.version}</version>
- </dependency>-->
- </dependencies>
-
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/pom.xml.versionsBackup
deleted file mode 100644
index de6c4c6760..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/pom.xml.versionsBackup
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>action-library-rest</artifactId>
- <name>action-library-rest</name>
- <version>1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-rest-webapp</artifactId>
- <version>1.0-SNAPSHOT</version>
- <relativePath>../</relativePath>
- </parent>
- <modules>
- <module>/action-library-rest-services</module>
- <module>/action-library-rest-types</module>
- </modules>
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml.versionsBackup
deleted file mode 100644
index 9c3472a970..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml.versionsBackup
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>application-config-rest</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>application-config-rest-services</artifactId>
- <version>1.0-SNAPSHOT</version>
- <!--packaging>pom</packaging-->
-
- <dependencies>
-
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>1.5.3</version>
- </dependency>
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- <version>${ws.rs.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>1</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-application-config-manager</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>application-config-rest-types</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-common-rest</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <!-- CXF -->
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxrs</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- </dependencies>
-
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/pom.xml.versionsBackup
deleted file mode 100644
index a9c8bbaee5..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/pom.xml.versionsBackup
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>application-config-rest</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>application-config-rest-types</artifactId>
- <version>1.0-SNAPSHOT</version>
-
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/pom.xml.versionsBackup
deleted file mode 100644
index fd2e251fea..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/pom.xml.versionsBackup
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-rest-webapp</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>application-config-rest</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
-
- <modules>
- <module>application-config-rest-services</module>
- <module>application-config-rest-types</module>
- </modules>
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml.versionsBackup
deleted file mode 100644
index 983518fd29..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml.versionsBackup
+++ /dev/null
@@ -1,226 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>onboarding-be</artifactId>
- <name>onboarding-rest-war</name>
- <version>1.0-SNAPSHOT</version>
- <packaging>war</packaging>
-
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-rest-webapp</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>vendor-license-rest-services</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>vendor-software-products-rest-services</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>validation-rest-services</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!--dependency>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>application-config-rest-services</artifactId>
- <version>${project.version}</version>
- </dependency-->
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>application-config-rest-services</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>action-library-rest-services</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>${javax.servlet.version}</version>
- </dependency>
- <!-- JSON -->
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-jaxrs</artifactId>
- <version>${org.codehaus.jackson.version}</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-core-asl</artifactId>
- <version>${org.codehaus.jackson.version}</version>
- </dependency>
- <dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>1</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-vendor-software-product-manager</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-servlets</artifactId>
- <version>9.0.6.v20130930</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-application-config-manager</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy</artifactId>
- <version>${groovy.version}</version>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <version>${logback.version}</version>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- <version>${logback.version}</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.janino</groupId>
- <artifactId>janino</artifactId>
- <scope>compile</scope>
- </dependency>
- <!--dependency>
- <groupId>org.codehaus.janino</groupId>
- <artifactId>commons-compiler</artifactId>
- <version>3.0.6</version>
- <scope>compile</scope>
- </dependency-->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>4.1.3.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>4.1.3.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-aop</artifactId>
- <version>4.1.3.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-webmvc</artifactId>
- <version>4.1.3.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjweaver</artifactId>
- <version>1.8.9</version>
- </dependency>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- <version>1.8.9</version>
- </dependency>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjtools</artifactId>
- <version>1.8.9</version>
- </dependency>
-
- </dependencies>
-
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>test/core/unittest/offline/**</include>
- </includes>
- <skipTests>true</skipTests>
- <systemProperties>
- <property>
- <name>buildNumber</name>
- <value>${buildNumber}</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.1.1</version>
- <configuration>
- <attachClasses>true</attachClasses>
- <webResources>
- <resource>
- <!-- this is relative to the pom.xml directory -->
- <directory>${basedir}/target/generated/swagger-ui</directory>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- <plugin>
- <groupId>com.github.kongchen</groupId>
- <artifactId>swagger-maven-plugin</artifactId>
- <version>3.1.0</version>
- <configuration>
- <apiSources>
- <apiSource>
- <springmvc>false</springmvc>
- <locations>org.openecomp.sdcrests</locations>
- <schemes>http</schemes>
- <basePath>/onboarding-api</basePath>
- <info>
- <title>Rest API</title>
- <version>v1.0, build #${buildNumber}</version>
- <description>Rest API Documentation</description>
- <termsOfService>
- http://www.github.com/kongchen/swagger-maven-plugin
- </termsOfService>
- </info>
- <templatePath>${basedir}/templates/strapdown.html.hbs</templatePath>
- <outputPath>${basedir}/target/generated/api.html</outputPath>
- <swaggerDirectory>${basedir}/target/generated/swagger-ui
- </swaggerDirectory>
- </apiSource>
- </apiSources>
- </configuration>
- <executions>
- <execution>
- <phase>compile</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
-
- <!--finalName>onboarding-api</finalName-->
- </build>
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/DefaultOutput.java b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/DefaultOutput.java
index 991a286a48..271ff45097 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/DefaultOutput.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/DefaultOutput.java
@@ -21,14 +21,6 @@
package org.openecomp.server.interceptors;
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.net.URI;
-import java.util.Date;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
import javax.ws.rs.core.EntityTag;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Link;
@@ -36,13 +28,20 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.NewCookie;
import javax.ws.rs.core.Response;
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
+import java.net.URI;
+import java.util.Date;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
public class DefaultOutput extends Response implements Serializable {
private static final long serialVersionUID = 8061802931931401706L;
private final int status;
- private final Object entity;
+ private final transient Object entity;
private MultivaluedMap<String, Object> metadata;
public DefaultOutput(int s0, Object e0) {
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/webapp/WEB-INF/beans-services.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/webapp/WEB-INF/beans-services.xml
index c83ae4471a..126f7814d7 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/webapp/WEB-INF/beans-services.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/webapp/WEB-INF/beans-services.xml
@@ -30,7 +30,6 @@
<bean id="outEmptyResponseInterceptor" class="org.openecomp.server.interceptors.EmptyOutputOutInterceptor"/>
<!-- ASDC -->
- <bean id="vendorLicenseManager" class="org.openecomp.sdc.vendorlicense.impl.VendorLicenseManagerImpl"/>
<bean id="uploadValidationManager" class="org.openecomp.sdc.validation.impl.UploadValidationManagerImpl"/>
<bean id="actionManager" class="org.openecomp.sdc.action.impl.ActionManagerImpl"/>
<bean id="applicationConfigManager" class="org.openecomp.sdc.applicationconfig.impl.ApplicationConfigManagerImpl"/>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml
index 824c6775bc..70581079ff 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml
@@ -13,6 +13,12 @@
<dependencies>
<dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-logging-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.openecomp.sdc.core</groupId>
<artifactId>openecomp-utilities-lib</artifactId>
<version>${project.version}</version>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml.versionsBackup
deleted file mode 100644
index aaf3383c42..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml.versionsBackup
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>openecomp-sdc-common-rest</artifactId>
- <name>openecomp-sdc-common-rest</name>
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-rest-webapp</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>org.openecomp.core</groupId>
- <artifactId>openecomp-utilities-lib</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.core</groupId>
- <artifactId>openecomp-common-lib</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>${hibernate.validator.version}</version>
- </dependency>
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- <version>${ws.rs.version}</version>
- </dependency>
- <!-- Swagger -->
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-core</artifactId>
- <version>${swagger.version}</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/errors/DefaultExceptionMapper.java b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/errors/DefaultExceptionMapper.java
index e8a6c7e7db..d399469745 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/errors/DefaultExceptionMapper.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/errors/DefaultExceptionMapper.java
@@ -54,9 +54,10 @@ import javax.ws.rs.ext.ExceptionMapper;
public class DefaultExceptionMapper implements ExceptionMapper<Exception> {
private static final String ERROR_CODES_TO_RESPONSE_STATUS_MAPPING_FILE =
"errorCodesToResponseStatusMapping.json";
- private static Map<String, String> errorCodeToResponseStatus = JsonUtil
- .json2Object(FileUtils.getFileInputStream(ERROR_CODES_TO_RESPONSE_STATUS_MAPPING_FILE),
- Map.class);
+ @SuppressWarnings("unchecked")
+ private static Map<String, String> errorCodeToResponseStatus =
+ JsonUtil.json2Object(FileUtils
+ .getFileInputStream(ERROR_CODES_TO_RESPONSE_STATUS_MAPPING_FILE), Map.class);
private static Logger logger = (Logger) LoggerFactory.getLogger(DefaultExceptionMapper.class);
@Override
@@ -74,11 +75,6 @@ public class DefaultExceptionMapper implements ExceptionMapper<Exception> {
response = transform(exception);
}
- try {
- writeStackTraceToFile(exception);
- } catch (IOException ex) {
- ex.printStackTrace();
- }
List<Object> contentTypes = new ArrayList<>();
contentTypes.add(MediaType.APPLICATION_JSON);
response.getMetadata().put("Content-Type", contentTypes);
@@ -169,17 +165,4 @@ public class DefaultExceptionMapper implements ExceptionMapper<Exception> {
private Object toEntity(Response.Status status, ErrorCode code) {
return new ErrorCodeAndMessage(status, code);
}
-
- private void writeStackTraceToFile(Exception exception) throws IOException {
- File file = new File("stack_trace.txt");
- if (!file.exists()) {
- file.createNewFile();
- }
- OutputStream outputStream = new FileOutputStream(file);
- PrintWriter printWriter = new PrintWriter(file);
- exception.printStackTrace(printWriter);
- printWriter.close();
- outputStream.close();
- }
-
}
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 6573485db7..91f2656f16 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
@@ -20,6 +20,15 @@
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;
+
/**
* 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
@@ -93,8 +102,19 @@ public abstract class MappingBase<S, T> {
try {
object = clazz.newInstance();
- } catch (InstantiationException | IllegalAccessException exception) {
+ } catch (InstantiationException | IllegalAccessException exception ) {
//TODO: what what?
+ MdcDataErrorMessage.createErrorMessageAndUpdateMdc(
+ LoggerConstants.TARGET_ENTITY,
+ LoggerServiceName.Create_LIMIT.toString(), ErrorLevel.ERROR.name(),
+ exception.getMessage(), exception.getMessage());
+
+ throw new CoreException((new ErrorCode.ErrorCodeBuilder())
+ .withMessage(exception.getMessage())
+ .withId(exception.getMessage())
+ .withCategory(ErrorCategory.APPLICATION).build());
+
+
}
return object;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/wrappers/GenericCollectionWrapper.java b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/wrappers/GenericCollectionWrapper.java
index 22ce0a4e45..ea69249944 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/wrappers/GenericCollectionWrapper.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/wrappers/GenericCollectionWrapper.java
@@ -27,7 +27,7 @@ import java.util.List;
public class GenericCollectionWrapper<T> implements Serializable {
private static final long serialVersionUID = 1L;
- private List<T> results;
+ private transient List<T> results;
private int listCount;
public GenericCollectionWrapper() {
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/pom.xml.versionsBackup
deleted file mode 100644
index cd9b491c08..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/pom.xml.versionsBackup
+++ /dev/null
@@ -1,28 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>openecomp-sdc-rest-webapp</artifactId>
- <name>openecomp-sdc-rest-webapp</name>
- <version>1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-api</artifactId>
- <version>1.0-SNAPSHOT</version>
- <relativePath>../</relativePath>
- </parent>
-
- <modules>
- <module>/openecomp-sdc-common-rest</module>
- <module>/vendor-license-rest</module>
- <module>/onboarding-rest-war</module>
- <module>/vendor-software-products-rest</module>
- <module>/sequence-rest</module>
- <module>/validation-rest</module>
- <module>/action-library-rest</module>
- <module>/application-config-rest</module>
- </modules>
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/sequence-rest/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/sequence-rest/pom.xml.versionsBackup
deleted file mode 100644
index 313a50ca9d..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/sequence-rest/pom.xml.versionsBackup
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <artifactId>openecomp-sdc-rest-webapp</artifactId>
- <groupId>org.openecomp.sdc</groupId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>sequence-rest</artifactId>
-
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/pom.xml.versionsBackup
deleted file mode 100644
index 8bacd99f69..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/pom.xml.versionsBackup
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>validation-rest</artifactId>
- <name>validation-rest</name>
- <version>1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-rest-webapp</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <modules>
- <module>/validation-rest-services</module>
- <module>/validation-rest-types</module>
- </modules>
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml.versionsBackup
deleted file mode 100644
index ffc417313a..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml.versionsBackup
+++ /dev/null
@@ -1,152 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>validation-rest-services</artifactId>
- <parent>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>validation-rest</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context-support</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
-
- <!-- CXF -->
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxrs</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>${http.client.version}</version>
- </dependency>
-
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- <version>${ws.rs.version}</version>
- </dependency>
-
- <!-- Other Stuff-->
- <!--dependency>
- <groupId>cglib</groupId>
- <artifactId>cglib-nodep</artifactId>
- <version>${cglib.nodep.version}</version>
- <scope>runtime</scope>
- </dependency-->
-
- <!-- Java Stuff -->
- <dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>${javax.inject.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- <version>${ws.rs.version}</version>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-core</artifactId>
- <version>1.19.1</version>
- <exclusions>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>1.5.3</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>validation-rest-types</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-annotations</artifactId>
- <version>2.7.4</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.dataformat</groupId>
- <artifactId>jackson-dataformat-xml</artifactId>
- <version>2.7.4</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>woodstox-core-asl</artifactId>
- <version>4.4.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-vendor-software-product-manager</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey.contribs</groupId>
- <artifactId>jersey-multipart</artifactId>
- <version>1.18.1</version>
- <scope>provided</scope>
- </dependency>
-
-
- </dependencies>
-
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>test/core/unittest/offline/**</include>
- </includes>
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
- <!-- Error codes generator plugin -->
- <!--plugin>
- <groupId>org.openecomp.nfv.tools</groupId>
- <artifactId>error-codes-maven-plugin</artifactId>
- </plugin-->
- </plugins>
- </build>
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-types/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-types/pom.xml.versionsBackup
deleted file mode 100644
index 5cc8ee7c51..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-types/pom.xml.versionsBackup
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>validation-rest-types</artifactId>
- <name>validation-rest-types</name>
-
- <parent>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>validation-rest</artifactId>
- <version>1.0-SNAPSHOT</version>
- <relativePath>../</relativePath>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-common-rest</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-validation-manager</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/pom.xml.versionsBackup
deleted file mode 100644
index ae9c3063bc..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/pom.xml.versionsBackup
+++ /dev/null
@@ -1,23 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>vendor-license-rest</artifactId>
- <name>vendor-license-rest</name>
- <version>1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-rest-webapp</artifactId>
- <version>1.0-SNAPSHOT</version>
- <relativePath>../</relativePath>
- </parent>
-
- <modules>
- <module>/vendor-license-rest-services</module>
- <module>/vendor-license-rest-types</module>
- </modules>
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/pom.xml.versionsBackup
deleted file mode 100644
index 187135e1f4..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/pom.xml.versionsBackup
+++ /dev/null
@@ -1,135 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>vendor-license-rest-services</artifactId>
- <name>vendor-license-rest-services</name>
-
- <parent>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>vendor-license-rest</artifactId>
- <version>1.0-SNAPSHOT</version>
- <relativePath>../</relativePath>
- </parent>
-
-
- <properties>
- <errorcode.dir>${project.build.directory}/generated-sources/error-codes</errorcode.dir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>vendor-license-rest-types</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-vendor-license-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-vendor-license-manager</artifactId>
- <version>${project.version}</version>
- </dependency>
-
-
- <!-- Spring -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context-support</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
-
- <!-- CXF -->
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxrs</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>${http.client.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpcore</artifactId>
- <version>${http.client.version}</version>
- </dependency>
-
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- <version>${ws.rs.version}</version>
- </dependency>
-
- <!-- Other Stuff-->
- <!--dependency>
- <groupId>cglib</groupId>
- <artifactId>cglib-nodep</artifactId>
- <version>${cglib.nodep.version}</version>
- <scope>runtime</scope>
- </dependency-->
-
- <!-- Java Stuff -->
- <dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>${javax.inject.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-vendor-software-product-manager</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
-
- </dependencies>
-
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>test/core/unittest/offline/**</include>
- </includes>
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
- <!-- Error codes generator plugin -->
- <!--plugin>
- <groupId>org.openecomp.nfv.tools</groupId>
- <artifactId>error-codes-maven-plugin</artifactId>
- </plugin-->
- </plugins>
- </build>
-
-
-
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolEntityToEntitlementPoolEntityDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolEntityToEntitlementPoolEntityDto.java
index d35c06c30d..21293ab607 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolEntityToEntitlementPoolEntityDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolEntityToEntitlementPoolEntityDto.java
@@ -22,7 +22,6 @@ package org.openecomp.sdcrests.vendorlicense.rest.mapping;
import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
import org.openecomp.sdcrests.mapping.MappingBase;
-import org.openecomp.sdcrests.vendorlicense.types.ChoiceOrOtherDto;
import org.openecomp.sdcrests.vendorlicense.types.EntitlementPoolEntityDto;
import org.openecomp.sdcrests.vendorlicense.types.MultiChoiceOrOtherDto;
@@ -39,14 +38,9 @@ public class MapEntitlementPoolEntityToEntitlementPoolEntityDto
MapChoiceOrOtherToChoiceOrOtherDto choiceOrOtherMapper =
new MapChoiceOrOtherToChoiceOrOtherDto();
- target.setEntitlementMetric(
- choiceOrOtherMapper.applyMapping(source.getEntitlementMetric(), ChoiceOrOtherDto.class));
- target.setAggregationFunction(
- choiceOrOtherMapper.applyMapping(source.getAggregationFunction(), ChoiceOrOtherDto.class));
target.setOperationalScope(new MapMultiChoiceOrOtherToMultiChoiceOrOtherDto()
.applyMapping(source.getOperationalScope(), MultiChoiceOrOtherDto.class));
- target.setTime(choiceOrOtherMapper.applyMapping(source.getTime(), ChoiceOrOtherDto.class));
- target.setManufacturerReferenceNumber(source.getManufacturerReferenceNumber());
+
target.setReferencingFeatureGroups(source.getReferencingFeatureGroups());
target.setStartDate(source.getStartDate());
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolRequestDtoToEntitlementPoolEntity.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolRequestDtoToEntitlementPoolEntity.java
index 5442e1af61..9b215d69aa 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolRequestDtoToEntitlementPoolEntity.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolRequestDtoToEntitlementPoolEntity.java
@@ -20,7 +20,6 @@
package org.openecomp.sdcrests.vendorlicense.rest.mapping;
-import org.openecomp.sdc.vendorlicense.dao.types.ChoiceOrOther;
import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
import org.openecomp.sdc.vendorlicense.dao.types.MultiChoiceOrOther;
import org.openecomp.sdcrests.mapping.MappingBase;
@@ -35,17 +34,11 @@ public class MapEntitlementPoolRequestDtoToEntitlementPoolEntity
target.setThresholdValue(source.getThresholdValue());
target.setThresholdUnit(source.getThresholdUnits());
target.setIncrements(source.getIncrements());
-
MapChoiceOrOtherDtoToChoiceOrOther choiceOrOtherMapper =
new MapChoiceOrOtherDtoToChoiceOrOther();
- target.setEntitlementMetric(
- choiceOrOtherMapper.applyMapping(source.getEntitlementMetric(), ChoiceOrOther.class));
- target.setAggregationFunction(
- choiceOrOtherMapper.applyMapping(source.getAggregationFunction(), ChoiceOrOther.class));
target.setOperationalScope(new MapMultiChoiceOrOtherDtoToMultiChoiceOrOther()
.applyMapping(source.getOperationalScope(), MultiChoiceOrOther.class));
- target.setTime(choiceOrOtherMapper.applyMapping(source.getTime(), ChoiceOrOther.class));
- target.setManufacturerReferenceNumber(source.getManufacturerReferenceNumber());
+
target.setStartDate(source.getStartDate());
target.setExpiryDate(source.getExpiryDate());
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupEntityToLicenseKeyGroupEntityDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupEntityToLicenseKeyGroupEntityDto.java
index 38384711b1..66618e8fa7 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupEntityToLicenseKeyGroupEntityDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupEntityToLicenseKeyGroupEntityDto.java
@@ -36,5 +36,10 @@ public class MapLicenseKeyGroupEntityToLicenseKeyGroupEntityDto
target.setOperationalScope(new MapMultiChoiceOrOtherToMultiChoiceOrOtherDto()
.applyMapping(source.getOperationalScope(), MultiChoiceOrOtherDto.class));
target.setReferencingFeatureGroups(source.getReferencingFeatureGroups());
+ target.setStartDate(source.getStartDate());
+ target.setExpiryDate(source.getExpiryDate());
+ target.setThresholdUnits(source.getThresholdUnits());
+ target.setThresholdValue(source.getThresholdValue());
+ target.setIncrements(source.getIncrements());
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity.java
index aee27c8521..4682a46216 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity.java
@@ -34,5 +34,10 @@ public class MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity
target.setType(source.getType());
target.setOperationalScope(new MapMultiChoiceOrOtherDtoToMultiChoiceOrOther()
.applyMapping(source.getOperationalScope(), MultiChoiceOrOther.class));
+ target.setStartDate(source.getStartDate());
+ target.setExpiryDate(source.getExpiryDate());
+ target.setThresholdUnits(source.getThresholdUnits());
+ target.setThresholdValue(source.getThresholdValue());
+ target.setIncrements(source.getIncrements());
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLimitEntityToLimitDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLimitEntityToLimitDto.java
index 9678f927b0..1152cc1eb3 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLimitEntityToLimitDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLimitEntityToLimitDto.java
@@ -12,10 +12,10 @@ public class MapLimitEntityToLimitDto extends MappingBase<LimitEntity, LimitEnti
target.setId(source.getId());
target.setName(source.getName());
target.setDescription(source.getDescription());
- target.setMetric(source.getMetric() != null ? source.getMetric().name() : null);
+ target.setMetric(source.getMetric());
target.setAggregationFunction(source.getAggregationFunction() != null ? source
.getAggregationFunction().name() : null);
- target.setTime(source.getTime() != null ? source.getTime().name() : null);
+ target.setTime(source.getTime());
target.setType(source.getType() != null ? source.getType().name() : null);
target.setUnit(source.getUnit());
target.setValue(source.getValue());
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLimitRequestDtoToLimitEntity.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLimitRequestDtoToLimitEntity.java
index 7f48ece1cf..d123924ec3 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLimitRequestDtoToLimitEntity.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLimitRequestDtoToLimitEntity.java
@@ -3,73 +3,60 @@ package org.openecomp.sdcrests.vendorlicense.rest.mapping;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.common.errors.ErrorCode;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
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.types.LoggerTragetServiceName;
import org.openecomp.sdc.vendorlicense.dao.types.AggregationFunction;
-import org.openecomp.sdc.vendorlicense.dao.types.EntitlementMetric;
-import org.openecomp.sdc.vendorlicense.dao.types.EntitlementTime;
import org.openecomp.sdc.vendorlicense.dao.types.LimitEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.LimitType;
import org.openecomp.sdc.vendorlicense.errors.LimitErrorBuilder;
import org.openecomp.sdc.vendorlicense.errors.VendorLicenseErrorCodes;
-import org.openecomp.sdc.vendorsoftwareproduct.errors.ImageErrorBuilder;
import org.openecomp.sdcrests.mapping.MappingBase;
import org.openecomp.sdcrests.vendorlicense.types.LimitRequestDto;
-import org.openecomp.sdc.vendorlicense.dao.types.LimitType;
public class MapLimitRequestDtoToLimitEntity extends MappingBase<LimitRequestDto, LimitEntity> {
- @Override
- public void doMapping(LimitRequestDto source, LimitEntity target) {
- target.setName(source.getName());
- target.setDescription(source.getDescription());
- try {
- LimitType type = LimitType.valueOf(source.getType());
- target.setType(type);
- }
- catch (IllegalArgumentException exception) {
- throwInvalidValueError("type", VendorLicenseErrorCodes.LIMIT_INVALID_TYPE);
- }
-
- try {
- EntitlementMetric metric = EntitlementMetric.valueOf(source.getMetric());
- target.setMetric(metric);
- }
- catch (IllegalArgumentException exception) {
- throwInvalidValueError("metric", VendorLicenseErrorCodes.LIMIT_INVALID_METRIC);
- }
- try {
- AggregationFunction function = source.getAggregationFunction() != null ?
- AggregationFunction.valueOf(source.getAggregationFunction()) : null;
- target.setAggregationFunction(function);
+ private static final Logger logger =
+ LoggerFactory.getLogger(MapLimitRequestDtoToLimitEntity.class);
+
+ @Override
+ public void doMapping(LimitRequestDto source, LimitEntity target) {
+ target.setName(source.getName());
+ target.setDescription(source.getDescription());
+ try {
+ LimitType type = LimitType.valueOf(source.getType());
+ target.setType(type);
+ } catch (IllegalArgumentException exception) {
+ logger.error(exception.getMessage(), exception);
+ throwInvalidValueError("type", VendorLicenseErrorCodes.LIMIT_INVALID_TYPE);
+ }
+
+ try {
+ AggregationFunction function = source.getAggregationFunction() != null ?
+ AggregationFunction.valueOf(source.getAggregationFunction()) : null;
+ target.setAggregationFunction(function);
+ } catch (IllegalArgumentException exception) {
+ logger.error(exception.getMessage(), exception);
+ throwInvalidValueError("aggregationFunction",
+ VendorLicenseErrorCodes.LIMIT_INVALID_AGGREGATIONFUNCTION);
+ }
+
+ target.setTime(source.getTime());
+ target.setMetric(source.getMetric());
+ target.setValue(source.getValue());
+ target.setUnit(source.getUnit());
+
+ }
+
+ private void throwInvalidValueError(String attribute, String vendorLicenseErrorCode) {
+ ErrorCode errorCode = LimitErrorBuilder.getInvalidValueErrorBuilder(attribute,
+ vendorLicenseErrorCode);
+ MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+ LoggerServiceName.Create_LIMIT.toString(), ErrorLevel.ERROR.name(),
+ errorCode.id(), errorCode.message());
+ throw new CoreException(errorCode);
}
- catch (IllegalArgumentException exception) {
- throwInvalidValueError("aggregationFunction",
- VendorLicenseErrorCodes.LIMIT_INVALID_AGGREGATIONFUNCTION);
- }
-
- try {
- EntitlementTime time = source.getTime() != null ?
- EntitlementTime.valueOf(source.getTime()) : null;
- target.setTime(time);
- }
- catch (IllegalArgumentException exception) {
- throwInvalidValueError("time", VendorLicenseErrorCodes.LIMIT_INVALID_TIME);
- }
-
- target.setValue(source.getValue());
- target.setUnit(source.getUnit());
-
- }
-
- private void throwInvalidValueError(String attribute, String vendorLicenseErrorCode) {
- ErrorCode errorCode = LimitErrorBuilder.getInvalidValueErrorBuilder(attribute,
- vendorLicenseErrorCode);
- MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
- LoggerServiceName.Create_LIMIT.toString(), ErrorLevel.ERROR.name(),
- errorCode.id(), errorCode.message() );
- throw new CoreException(errorCode);
- }
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolLimitsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolLimitsImpl.java
index 3a08822048..36e25e0f2e 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolLimitsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolLimitsImpl.java
@@ -5,6 +5,7 @@ import org.openecomp.sdc.logging.context.MdcUtil;
import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
+import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
import org.openecomp.sdc.vendorlicense.dao.types.LimitEntity;
import org.openecomp.sdc.versioning.dao.types.Version;
@@ -30,8 +31,8 @@ import javax.ws.rs.core.Response;
@Scope(value = "prototype")
public class EntitlementPoolLimitsImpl implements EntitlementPoolLimits {
private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
- @Autowired
- private VendorLicenseManager vendorLicenseManager;
+ private VendorLicenseManager vendorLicenseManager =
+ VendorLicenseManagerFactory.getInstance().createInterface();
@Override
public Response createLimit(LimitRequestDto request,
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java
index 63576c95bd..120bb3d6a0 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java
@@ -24,6 +24,7 @@ import org.openecomp.sdc.logging.context.MdcUtil;
import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
+import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
import org.openecomp.sdc.versioning.dao.types.Version;
import org.openecomp.sdcrests.vendorlicense.rest.EntitlementPools;
@@ -47,8 +48,8 @@ import java.util.Collection;
public class EntitlementPoolsImpl implements EntitlementPools {
private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
- @Autowired
- private VendorLicenseManager vendorLicenseManager;
+ private VendorLicenseManager vendorLicenseManager =
+ VendorLicenseManagerFactory.getInstance().createInterface();
/**
* List entitlement pools response.
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java
index e41942d455..593ed1939f 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java
@@ -25,6 +25,7 @@ import org.openecomp.sdc.logging.context.MdcUtil;
import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
+import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupModel;
@@ -58,8 +59,8 @@ import java.util.HashSet;
public class FeatureGroupsImpl implements FeatureGroups {
private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
- @Autowired
- private VendorLicenseManager vendorLicenseManager;
+ private VendorLicenseManager vendorLicenseManager =
+ VendorLicenseManagerFactory.getInstance().createInterface();
@Override
public Response listFeatureGroups(String vlmId, String versionId, String user) {
@@ -80,6 +81,7 @@ public class FeatureGroupsImpl implements FeatureGroups {
fgDto.setLicenseKeyGroupsIds(fg.getLicenseKeyGroupIds());
fgDto.setEntitlementPoolsIds(fg.getEntitlementPoolIds());
fgDto.setReferencingLicenseAgreements(fg.getReferencingLicenseAgreements());
+ fgDto.setManufacturerReferenceNumber(fg.getManufacturerReferenceNumber());
outputMapper.doMapping(fg, fgDto);
results.add(fgDto);
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseAgreementsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseAgreementsImpl.java
index ac242422e4..60a2d684d2 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseAgreementsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseAgreementsImpl.java
@@ -25,6 +25,7 @@ import org.openecomp.sdc.logging.context.MdcUtil;
import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
+import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementEntity;
import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementModel;
@@ -55,8 +56,8 @@ import javax.ws.rs.core.Response;
public class LicenseAgreementsImpl implements LicenseAgreements {
private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
- @Autowired
- private VendorLicenseManager vendorLicenseManager;
+ private VendorLicenseManager vendorLicenseManager =
+ VendorLicenseManagerFactory.getInstance().createInterface();
/**
* List license agreements response.
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupLimitsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupLimitsImpl.java
index aabba71a5c..4c85cfa45f 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupLimitsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupLimitsImpl.java
@@ -4,6 +4,7 @@ import org.openecomp.sdc.logging.context.MdcUtil;
import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
+import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
import org.openecomp.sdc.vendorlicense.dao.types.LimitEntity;
import org.openecomp.sdc.versioning.dao.types.Version;
@@ -30,8 +31,8 @@ import javax.ws.rs.core.Response;
public class LicenseKeyGroupLimitsImpl implements LicenseKeyGroupLimits {
private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
- @Autowired
- private VendorLicenseManager vendorLicenseManager;
+ private VendorLicenseManager vendorLicenseManager =
+ VendorLicenseManagerFactory.getInstance().createInterface();
@Override
public Response createLimit(LimitRequestDto request,
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupsImpl.java
index 2aac474123..4c4bf134fd 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupsImpl.java
@@ -24,6 +24,7 @@ import org.openecomp.sdc.logging.context.MdcUtil;
import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
+import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
import org.openecomp.sdc.versioning.dao.types.Version;
import org.openecomp.sdcrests.vendorlicense.rest.LicenseKeyGroups;
@@ -49,8 +50,8 @@ import java.util.Collection;
public class LicenseKeyGroupsImpl implements LicenseKeyGroups {
private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
- @Autowired
- private VendorLicenseManager vendorLicenseManager;
+ private VendorLicenseManager vendorLicenseManager =
+ VendorLicenseManagerFactory.getInstance().createInterface();
/**
* List license key groups response.
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java
index 9e72170e04..6d88e4cacb 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java
@@ -28,8 +28,11 @@ import org.openecomp.sdc.logging.messages.AuditMessages;
import org.openecomp.sdc.logging.types.LoggerConstants;
import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
+import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
import org.openecomp.sdc.vendorlicense.types.VersionedVendorLicenseModel;
+import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductManager;
+import org.openecomp.sdc.vendorsoftwareproduct.VspManagerFactory;
import org.openecomp.sdc.versioning.dao.types.Version;
import org.openecomp.sdcrests.vendorlicense.rest.VendorLicenseModels;
import org.openecomp.sdcrests.vendorlicense.rest.mapping.MapVendorLicenseModelRequestDtoToVendorLicenseModelEntity;
@@ -56,8 +59,10 @@ import java.util.Collection;
public class VendorLicenseModelsImpl implements VendorLicenseModels {
private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
- @Autowired
- private VendorLicenseManager vendorLicenseManager;
+
+ private VendorLicenseManager vendorLicenseManager =
+ VendorLicenseManagerFactory.getInstance().createInterface();
+
private static final Logger logger =
LoggerFactory.getLogger(VendorLicenseModelsImpl.class);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/pom.xml.versionsBackup
deleted file mode 100644
index d24c315f39..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/pom.xml.versionsBackup
+++ /dev/null
@@ -1,29 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>vendor-license-rest-types</artifactId>
- <name>vendor-license-rest-types</name>
- <version>1.0-SNAPSHOT</version>
-
- <parent>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>vendor-license-rest</artifactId>
- <version>1.0-SNAPSHOT</version>
- <relativePath>../</relativePath>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-common-rest</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-vendor-license-manager</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java
index b49a138a09..79cf750f74 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java
@@ -33,7 +33,7 @@ import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
@ApiModel(value = "EntitlementPoolRequest")
-//@JsonIgnoreProperties(value = {"manufacturerReferenceNumber"})
+@JsonIgnoreProperties({"manufacturerReferenceNumber", "time", "aggregationFunction", "entitlementMetric"})
public class EntitlementPoolRequestDto {
@NotNull
@@ -46,23 +46,11 @@ public class EntitlementPoolRequestDto {
private Integer thresholdValue;
private ThresholdUnit thresholdUnits;
- @NotNull
- @Valid
- private ChoiceOrOtherDto<EntitlementMetric> entitlementMetric;
@Size(max = 120)
private String increments;
- @NotNull
- @Valid
- private ChoiceOrOtherDto<AggregationFunction> aggregationFunction;
@Valid
private MultiChoiceOrOtherDto<OperationalScope> operationalScope;
- @NotNull
- @Valid
- private ChoiceOrOtherDto<EntitlementTime> time;
- @NotNull
- @Size(max = 100)
- private String manufacturerReferenceNumber;
private String startDate;
private String expiryDate;
@@ -99,14 +87,6 @@ public class EntitlementPoolRequestDto {
this.thresholdUnits = thresholdUnits;
}
- public ChoiceOrOtherDto<EntitlementMetric> getEntitlementMetric() {
- return entitlementMetric;
- }
-
- public void setEntitlementMetric(ChoiceOrOtherDto<EntitlementMetric> entitlementMetric) {
- this.entitlementMetric = entitlementMetric;
- }
-
public String getIncrements() {
return increments;
}
@@ -115,14 +95,6 @@ public class EntitlementPoolRequestDto {
this.increments = increments;
}
- public ChoiceOrOtherDto<AggregationFunction> getAggregationFunction() {
- return aggregationFunction;
- }
-
- public void setAggregationFunction(ChoiceOrOtherDto<AggregationFunction> aggregationFunction) {
- this.aggregationFunction = aggregationFunction;
- }
-
public MultiChoiceOrOtherDto<OperationalScope> getOperationalScope() {
return operationalScope;
}
@@ -131,22 +103,6 @@ public class EntitlementPoolRequestDto {
this.operationalScope = operationalScope;
}
- public ChoiceOrOtherDto<EntitlementTime> getTime() {
- return time;
- }
-
- public void setTime(ChoiceOrOtherDto<EntitlementTime> time) {
- this.time = time;
- }
-
- public String getManufacturerReferenceNumber() {
- return manufacturerReferenceNumber;
- }
-
- public void setManufacturerReferenceNumber(String manufacturerReferenceNumber) {
- this.manufacturerReferenceNumber = manufacturerReferenceNumber;
- }
-
public String getStartDate() {
return startDate;
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupDescriptorDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupDescriptorDto.java
index f2d0d651ef..56b3c25635 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupDescriptorDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupDescriptorDto.java
@@ -35,7 +35,7 @@ public class FeatureGroupDescriptorDto {
@NotNull
private String partNumber;
- //@NotBlank(message = "is mandatory and should not be empty")
+ @NotBlank(message = "is mandatory and should not be empty")
@Size(max = 100)
private String manufacturerReferenceNumber;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseKeyGroupRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseKeyGroupRequestDto.java
index a9072f5e94..fb56f85326 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseKeyGroupRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseKeyGroupRequestDto.java
@@ -22,6 +22,7 @@ package org.openecomp.sdcrests.vendorlicense.types;
import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyType;
import org.openecomp.sdc.vendorlicense.dao.types.OperationalScope;
+import org.openecomp.sdc.vendorlicense.dao.types.ThresholdUnit;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
@@ -39,6 +40,16 @@ public class LicenseKeyGroupRequestDto {
@Valid
private MultiChoiceOrOtherDto<OperationalScope> operationalScope;
+ private String startDate;
+ private String expiryDate;
+
+ private Integer thresholdValue;
+
+ private ThresholdUnit thresholdUnits;
+
+ @Size(max = 120)
+ private String increments;
+
public String getName() {
return name;
}
@@ -70,4 +81,44 @@ public class LicenseKeyGroupRequestDto {
public void setOperationalScope(MultiChoiceOrOtherDto<OperationalScope> operationalScope) {
this.operationalScope = operationalScope;
}
+
+ public String getStartDate() {
+ return startDate;
+ }
+
+ public void setStartDate(String startDate) {
+ this.startDate = startDate;
+ }
+
+ public String getExpiryDate() {
+ return expiryDate;
+ }
+
+ public void setExpiryDate(String expiryDate) {
+ this.expiryDate = expiryDate;
+ }
+
+ public Integer getThresholdValue() {
+ return thresholdValue;
+ }
+
+ public void setThresholdValue(Integer thresholdValue) {
+ this.thresholdValue = thresholdValue;
+ }
+
+ public ThresholdUnit getThresholdUnits() {
+ return thresholdUnits;
+ }
+
+ public void setThresholdUnits(ThresholdUnit thresholdUnits) {
+ this.thresholdUnits = thresholdUnits;
+ }
+
+ public String getIncrements() {
+ return increments;
+ }
+
+ public void setIncrements(String increments) {
+ this.increments = increments;
+ }
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitEntityDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitEntityDto.java
index 0cc18949d8..a4dc361c57 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitEntityDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitEntityDto.java
@@ -7,8 +7,8 @@ public class LimitEntityDto {
private String type;
private String description;
private String metric;
- private Integer value;
- private Integer unit;
+ private String value;
+ private String unit;
private String aggregationFunction;
private String time;
@@ -52,11 +52,11 @@ public class LimitEntityDto {
this.metric = metric;
}
- public Integer getUnit() {
+ public String getUnit() {
return unit;
}
- public void setUnit(Integer unit) {
+ public void setUnit(String unit) {
this.unit = unit;
}
@@ -76,11 +76,11 @@ public class LimitEntityDto {
this.time = time;
}
- public Integer getValue() {
+ public String getValue() {
return value;
}
- public void setValue(Integer value) {
+ public void setValue(String value) {
this.value = value;
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitRequestDto.java
index 61f30916f8..defff137d8 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitRequestDto.java
@@ -20,11 +20,9 @@ public class LimitRequestDto {
private String description;
@NotBlank(message = "is mandatory and should not be empty")
private String metric;
- @NotNull(message = "is mandatory and should not be empty")
- @Min(value = 1, message = "should be integer and > 0")
- private Integer value;
- @Min(value = 1, message = "should be integer and > 0")
- private Integer unit;
+ @NotBlank(message = "is mandatory and should not be empty")
+ private String value;
+ private String unit;
private String aggregationFunction;
private String time;
@@ -77,19 +75,19 @@ public class LimitRequestDto {
this.time = time;
}
- public Integer getUnit() {
+ public String getUnit() {
return unit;
}
- public void setUnit(Integer unit) {
+ public void setUnit(String unit) {
this.unit = unit;
}
- public Integer getValue() {
+ public String getValue() {
return value;
}
- public void setValue(Integer value) {
+ public void setValue(String value) {
this.value = value;
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/pom.xml.versionsBackup
deleted file mode 100644
index 074c8d9e10..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/pom.xml.versionsBackup
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>vendor-software-products-rest</artifactId>
- <name>vendor-software-products-rest</name>
- <version>1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-rest-webapp</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <modules>
- <module>/vendor-software-products-rest-services</module>
- <module>/vendor-software-products-rest-types</module>
- </modules>
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml.versionsBackup
deleted file mode 100644
index ba2814613e..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml.versionsBackup
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>vendor-software-products-rest-services</artifactId>
- <parent>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>vendor-software-products-rest</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context-support</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>${spring.framework.version}</version>
- </dependency>
-
- <!-- CXF -->
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxrs</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>${http.client.version}</version>
- </dependency>
-
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- <version>${ws.rs.version}</version>
- </dependency>
-
- <!-- Other Stuff-->
- <!--dependency>
- <groupId>cglib</groupId>
- <artifactId>cglib-nodep</artifactId>
- <version>${cglib.nodep.version}</version>
- <scope>runtime</scope>
- </dependency-->
-
- <!-- Java Stuff -->
- <dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>${javax.inject.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- <version>${ws.rs.version}</version>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-core</artifactId>
- <version>1.19.1</version>
- <exclusions>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>1.5.3</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>vendor-software-products-rest-types</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-annotations</artifactId>
- <version>2.7.4</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.dataformat</groupId>
- <artifactId>jackson-dataformat-xml</artifactId>
- <version>2.7.4</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>woodstox-core-asl</artifactId>
- <version>4.4.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-vendor-software-product-manager</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>com.sun.jersey.contribs</groupId>
- <artifactId>jersey-multipart</artifactId>
- <version>1.18.1</version>
- <scope>provided</scope>
- </dependency>
-
-
- </dependencies>
-
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>test/core/unittest/offline/**</include>
- </includes>
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
- <!-- Error codes generator plugin -->
- <!--plugin>
- <groupId>org.openecomp.nfv.tools</groupId>
- <artifactId>error-codes-maven-plugin</artifactId>
- </plugin-->
- </plugins>
- </build>
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapComponentDependencyModelRequestToEntity.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapComponentDependencyModelRequestToEntity.java
index e51ccbd937..baaa664938 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapComponentDependencyModelRequestToEntity.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapComponentDependencyModelRequestToEntity.java
@@ -4,6 +4,8 @@ package org.openecomp.sdcrests.vsp.rest.mapping;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.common.errors.ErrorCode;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage;
import org.openecomp.sdc.logging.types.LoggerConstants;
import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
@@ -15,6 +17,8 @@ import org.openecomp.sdcrests.vendorsoftwareproducts.types.ComponentRelationType
public class MapComponentDependencyModelRequestToEntity extends
MappingBase<ComponentDependencyModel, ComponentDependencyModelEntity> {
+ private static final Logger logger =
+ LoggerFactory.getLogger(MapComponentDependencyModelRequestToEntity.class);
@Override
public void doMapping(ComponentDependencyModel source,
@@ -30,6 +34,7 @@ public class MapComponentDependencyModelRequestToEntity extends
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.CREATE_COMPONENT_DEPENDENCY_MODEL, ErrorLevel.ERROR.name(),
errorCode.id(), errorCode.message() );
+ logger.error(errorCode.message(), exception);
throw new CoreException(errorCode);
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
index d5eb961285..0793e9473e 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
@@ -3,6 +3,8 @@ package org.openecomp.sdcrests.vsp.rest.services;
import org.apache.commons.beanutils.BeanUtils;
import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
import org.openecomp.sdc.common.errors.Messages;
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.logging.context.MdcUtil;
@@ -30,6 +32,9 @@ import javax.ws.rs.core.Response;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
import java.util.Optional;
@Named
@@ -82,9 +87,12 @@ public class OrchestrationTemplateCandidateImpl implements OrchestrationTemplate
OrchestrationTemplateActionResponseDto responseDto =
new OrchestrationTemplateActionResponseDto();
BeanUtils.copyProperties(responseDto, response);
+
return Response.ok(responseDto).build();
}
+
+
@Override
public Response updateFilesDataStructure(
String vspId, String versionId, FileDataStructureDto fileDataStructureDto, String user)
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java
index 6dcb63dfdd..8f2e73bff6 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java
@@ -25,6 +25,7 @@ import org.openecomp.sdc.activityLog.ActivityLogManagerFactory;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.common.errors.ErrorCode;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.logging.context.MdcUtil;
@@ -75,6 +76,8 @@ import java.io.IOException;
import java.util.Collection;
import java.util.List;
+import static org.openecomp.sdc.logging.messages.AuditMessages.SUBMIT_VSP_ERROR;
+
@Named
@Service("vendorSoftwareProducts")
@@ -162,7 +165,7 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
VersionableEntityAction.Read), user);
versionInfo = getVersionInfo(vspId, VersionableEntityAction.Read, user);
} catch (Exception e) {
- //to do
+ logger.error(e.getMessage(), e);
}
}
}
@@ -206,8 +209,8 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
switch (request.getAction()) {
case Checkout:
MDC.put(LoggerConstants.SERVICE_NAME, LoggerServiceName.Checkout_VSP.toString());
- logger.audit(AuditMessages.AUDIT_MSG + AuditMessages.CHECK_OUT_VSP + vspId);
vendorSoftwareProductManager.checkout(vspId, user);
+ logger.audit(AuditMessages.AUDIT_MSG + AuditMessages.CHECK_OUT_VSP + vspId);
break;
case Undo_Checkout:
MDC.put(LoggerConstants.SERVICE_NAME, LoggerServiceName.Undo_Checkout_VSP.toString());
@@ -215,18 +218,28 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
break;
case Checkin:
MDC.put(LoggerConstants.SERVICE_NAME, LoggerServiceName.Checkin_VSP.toString());
- logger.audit(AuditMessages.AUDIT_MSG + AuditMessages.CHECK_IN_VSP + vspId);
vendorSoftwareProductManager.checkin(vspId, user);
+ logger.audit(AuditMessages.AUDIT_MSG + AuditMessages.CHECK_IN_VSP + vspId);
break;
case Submit:
MDC.put(LoggerConstants.SERVICE_NAME, LoggerServiceName.Submit_VSP.toString());
- logger.audit(AuditMessages.AUDIT_MSG + AuditMessages.SUBMIT_VSP + vspId);
ValidationResponse validationResponse = vendorSoftwareProductManager.submit(vspId, user);
if (!validationResponse.isValid()) {
+ logger.audit(AuditMessages.AUDIT_MSG + AuditMessages.SUBMIT_VSP_FAIL + vspId);
+ if (validationResponse.getVspErrors() != null) {
+ validationResponse.getVspErrors().forEach(errorCode -> logger.audit(AuditMessages
+ .AUDIT_MSG + String.format(SUBMIT_VSP_ERROR, errorCode.message(), vspId)));
+ }
+ if (validationResponse.getUploadDataErrors() != null) {
+ validationResponse.getUploadDataErrors().values().forEach(errorMessages
+ -> printAuditForErrors(errorMessages, vspId, SUBMIT_VSP_ERROR));
+ }
+
return Response.status(Response.Status.EXPECTATION_FAILED).entity(
new MapValidationResponseToDto()
.applyMapping(validationResponse, ValidationResponseDto.class)).build();
}
+ logger.audit(AuditMessages.AUDIT_MSG + AuditMessages.SUBMIT_VSP + vspId);
break;
case Create_Package:
MDC.put(LoggerConstants.SERVICE_NAME, LoggerServiceName.Create_Package.toString());
@@ -371,4 +384,14 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
return Response.ok(results).build();
}
+
+ private void printAuditForErrors(List<ErrorMessage> errorList, String vspId, String auditType) {
+
+ errorList.forEach(errorMessage -> {
+ if (errorMessage.getLevel().equals(ErrorLevel.ERROR)) {
+ logger.audit(AuditMessages.AUDIT_MSG + String.format(auditType, errorMessage.getMessage(),
+ vspId));
+ }
+ });
+ }
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/pom.xml.versionsBackup
deleted file mode 100644
index 7fb5fd711e..0000000000
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/pom.xml.versionsBackup
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>vendor-software-products-rest-types</artifactId>
- <name>vendor-software-products-rest-types</name>
-
- <parent>
- <groupId>org.openecomp.sdc.onboarding</groupId>
- <artifactId>vendor-software-products-rest</artifactId>
- <version>1.0-SNAPSHOT</version>
- <relativePath>../</relativePath>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-common-rest</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-vendor-software-product-manager</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeDetailsDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeDetailsDto.java
index 4b7889b16d..92ad0fdb0c 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeDetailsDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeDetailsDto.java
@@ -8,7 +8,6 @@ import javax.validation.constraints.Size;
public class ComputeDetailsDto implements CompositionDataEntityDto {
@NotBlank(message = "is mandatory and should not be empty")
@Size(min = 0, max = 30, message = "length should not exceed 30 characters.")
- @Pattern(regexp = "^[a-zA-Z 0-9._-]*$", message = "must match \"^[a-zA-Z 0-9._-]*$\"")
private String name;
@Size(min = 0, max = 300, message = "length should not exceed 300 characters.")
private String description;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorRequestDto.java
index 54ce63b252..baf6707ddf 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorRequestDto.java
@@ -10,7 +10,6 @@ import javax.validation.constraints.Size;
public class DeploymentFlavorRequestDto {
@NotBlank(message = "is mandatory and should not be empty")
- @Pattern(regexp = "^[a-zA-Z 0-9._-]*$", message = "must match \"^[a-zA-Z 0-9._-]*$\"")
@Size(min = 0, max = 30,message = "length should not exceed 30 characters.")
private String model;
@Size(min = 0, max = 300,message = "length should not exceed 300 characters.")
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ImageRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ImageRequestDto.java
index 6164522dda..4386245342 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ImageRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ImageRequestDto.java
@@ -8,7 +8,6 @@ import javax.validation.constraints.Pattern;
public class ImageRequestDto implements CompositionDataEntityDto {
@NotBlank(message = "is mandatory and should not be empty")
- @Pattern(regexp = "^[a-zA-Z 0-9._-]*$", message = "must match \"^[a-zA-Z 0-9._-]*$\"")
private String fileName;
private String description;
/*private String version;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/NicRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/NicRequestDto.java
index fba85b64ed..fdf953c80c 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/NicRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/NicRequestDto.java
@@ -29,7 +29,6 @@ import javax.validation.constraints.Pattern;
public class NicRequestDto {
@NotBlank(message = "is mandatory and should not be empty")
- @Pattern(regexp = "^[a-zA-Z 0-9._-]*$", message = "must match \"^[a-zA-Z 0-9._-]*$\"")
private String name;
private String description;
private String networkId;
diff --git a/openecomp-be/api/pom.xml.versionsBackup b/openecomp-be/api/pom.xml.versionsBackup
deleted file mode 100644
index 4c41573002..0000000000
--- a/openecomp-be/api/pom.xml.versionsBackup
+++ /dev/null
@@ -1,21 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>openecomp-sdc-api</artifactId>
- <name>openecomp-sdc-api</name>
- <version>1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <url>http://maven.apache.org</url>
-
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <modules>
- <module>/openecomp-sdc-rest-webapp</module>
- </modules>
-
-</project> \ No newline at end of file