aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionCatalogServlet.java6
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AbstractTemplateServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java13
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/CrudExternalServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefsServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ServiceActivationServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java4
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AdditionalInformationServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ArchiveEndpoint.java7
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ArtifactServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AttributeServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AutomatedUpgradeEndpoint.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeGenericServlet.java4
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeMonitoringServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/CapabilityServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentAttributeServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java14
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInterfaceOperationServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentNodeFilterServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentPropertyServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentSubstitutionFilterServlet.java7
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ConsumerServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DirectiveServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DistributionServiceServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ElementServlet.java4
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GenericArtifactBrowserServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupEndpoint.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupTypesEndpoint.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/InputsServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/InterfaceOperationServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/LifecycleServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/LockServlet.java29
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ModelServlet.java18
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/OutputsServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PolicyServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PolicyTypesEndpoint.java7
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/RequirementServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourceUploadServlet.java6
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourcesServlet.java50
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceConsumptionServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceForwardingPathServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceUploadServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TogglingServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesFetchServlet.java8
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadEndpoint.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadServlet.java12
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/UserAdminServlet.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AbstractTemplateServletTest.java1
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServletTest.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefsServletTest.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AbstractValidationsServletTest.java4
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AdditionalInformationServletTest.java330
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArchiveEndpointTest.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArtifactServletTest.java666
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AttributeServletTest.java139
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AutomatedUpgradeEndpointTest.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/CapabilityServletTest.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentServletTest.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/DistributionServiceServletTest.java121
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupEndpointTest.java9
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupServletTest.java83
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupTypesEndpointTest.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/InputsServletTest.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/OutputsServletTest.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PolicyServletTest.java5
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PolicyTypesEndpointTest.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourcesServletTest.java469
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadEndpointTest.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadServletTest.java2
75 files changed, 1081 insertions, 1143 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionCatalogServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionCatalogServlet.java
index 805d336775..78978bebbc 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionCatalogServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionCatalogServlet.java
@@ -57,7 +57,6 @@ import org.openecomp.sdc.be.dao.api.ActionStatus;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.resources.data.auditing.model.DistributionData;
import org.openecomp.sdc.be.servlets.BeGenericServlet;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.datastructure.Wrapper;
import org.openecomp.sdc.common.log.wrappers.Logger;
@@ -83,14 +82,15 @@ public class DistributionCatalogServlet extends BeGenericServlet {
private HttpServletRequest request;
@Inject
- public DistributionCatalogServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils,
+ public DistributionCatalogServlet(ComponentsUtils componentsUtils,
ArtifactsBusinessLogic artifactsBusinessLogic) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.artifactsBusinessLogic = artifactsBusinessLogic;
}
// *******************************************************
// Download (GET) artifacts
// **********************************************************/
+
/**
* @param requestId
* @param instanceIdHeader
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionServlet.java
index fb8a34830d..1517527efa 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionServlet.java
@@ -58,7 +58,6 @@ import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
import org.openecomp.sdc.be.servlets.BeGenericServlet;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.ArtifactTypeEnum;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.datastructure.Wrapper;
@@ -86,8 +85,8 @@ public class DistributionServlet extends BeGenericServlet {
private HttpServletRequest request;
@Inject
- public DistributionServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils, DistributionBusinessLogic distributionLogic) {
- super(userBusinessLogic, componentsUtils);
+ public DistributionServlet(ComponentsUtils componentsUtils, DistributionBusinessLogic distributionLogic) {
+ super(componentsUtils);
this.distributionLogic = distributionLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AbstractTemplateServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AbstractTemplateServlet.java
index f7329c6e8a..19b2c3468b 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AbstractTemplateServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AbstractTemplateServlet.java
@@ -62,7 +62,6 @@ import org.openecomp.sdc.be.resources.data.auditing.model.DistributionData;
import org.openecomp.sdc.be.resources.data.auditing.model.ResourceCommonInfo;
import org.openecomp.sdc.be.servlets.AbstractValidationsServlet;
import org.openecomp.sdc.be.servlets.RepresentationUtils;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.elements.LoggerSupportability;
import org.openecomp.sdc.common.log.enums.LoggerSupportabilityActions;
@@ -93,11 +92,11 @@ public class AbstractTemplateServlet extends AbstractValidationsServlet {
private HttpServletRequest request;
@Inject
- public AbstractTemplateServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL,
+ public AbstractTemplateServlet(ComponentInstanceBusinessLogic componentInstanceBL,
ComponentsUtils componentsUtils, ServletUtils servletUtils, ResourceImportManager resourceImportManager,
ElementBusinessLogic elementBusinessLogic, AbstractTemplateBusinessLogic abstractTemplateBusinessLogic,
ServiceBusinessLogic serviceBusinessLogic, ResourceBusinessLogic resourceBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.elementBusinessLogic = elementBusinessLogic;
this.abstractTemplateBusinessLogic = abstractTemplateBusinessLogic;
this.serviceBusinessLogic = serviceBusinessLogic;
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java
index b444532bc3..59802b27fa 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java
@@ -66,7 +66,6 @@ import org.openecomp.sdc.be.resources.data.auditing.model.DistributionData;
import org.openecomp.sdc.be.resources.data.auditing.model.ResourceCommonInfo;
import org.openecomp.sdc.be.servlets.AbstractValidationsServlet;
import org.openecomp.sdc.be.servlets.RepresentationUtils;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.datastructure.Wrapper;
import org.openecomp.sdc.common.log.wrappers.Logger;
@@ -95,10 +94,10 @@ public class ArtifactExternalServlet extends AbstractValidationsServlet {
private HttpServletRequest request;
@Inject
- public ArtifactExternalServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL,
+ public ArtifactExternalServlet(ComponentInstanceBusinessLogic componentInstanceBL,
ComponentsUtils componentsUtils, ServletUtils servletUtils, ResourceImportManager resourceImportManager,
ArtifactsBusinessLogic artifactsBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.artifactsBusinessLogic = artifactsBusinessLogic;
}
@@ -743,8 +742,8 @@ public class ArtifactExternalServlet extends AbstractValidationsServlet {
ResourceCommonInfo resourceCommonInfo = new ResourceCommonInfo(componentTypeValue);
if (!responseWrapper.isEmpty()) {
getComponentsUtils().auditExternalDownloadArtifact(responseFormat,
- resourceCommonInfo, new DistributionData(instanceIdHeader, requestURI),
- requestId, artifactUUID, userId);
+ resourceCommonInfo, new DistributionData(instanceIdHeader, requestURI),
+ requestId, artifactUUID, userId);
return responseWrapper.getInnerElement();
}
byte[] value = artifactsBusinessLogic.downloadComponentArtifactByUUIDs(componentType, uuid, artifactUUID, resourceCommonInfo);
@@ -812,11 +811,11 @@ public class ArtifactExternalServlet extends AbstractValidationsServlet {
}
if (!responseWrapper.isEmpty()) {
getComponentsUtils().auditExternalDownloadArtifact(responseFormat, new ResourceCommonInfo(resourceInstanceName, componentTypeValue),
- new DistributionData(instanceIdHeader, requestURI), requestId, artifactUUID, userId);
+ new DistributionData(instanceIdHeader, requestURI), requestId, artifactUUID, userId);
return responseWrapper.getInnerElement();
}
byte[] value = artifactsBusinessLogic
- .downloadResourceInstanceArtifactByUUIDs(componentType, uuid, resourceInstanceName, artifactUUID);
+ .downloadResourceInstanceArtifactByUUIDs(componentType, uuid, resourceInstanceName, artifactUUID);
try (InputStream is = new ByteArrayInputStream(value)) {
Map<String, String> headers = new HashMap<>();
headers.put(Constants.MD5_HEADER, GeneralUtility.calculateMD5Base64EncodedByByteArray(value));
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java
index c3edca5544..9758080c2b 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java
@@ -77,7 +77,6 @@ import org.openecomp.sdc.be.resources.data.auditing.model.DistributionData;
import org.openecomp.sdc.be.resources.data.auditing.model.ResourceCommonInfo;
import org.openecomp.sdc.be.servlets.AbstractValidationsServlet;
import org.openecomp.sdc.be.servlets.RepresentationUtils;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.openecomp.sdc.common.util.GeneralUtility;
@@ -106,11 +105,11 @@ public class AssetsDataServlet extends AbstractValidationsServlet {
private HttpServletRequest request;
@Inject
- public AssetsDataServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL, ComponentsUtils componentsUtils,
+ public AssetsDataServlet(ComponentInstanceBusinessLogic componentInstanceBL, ComponentsUtils componentsUtils,
ServletUtils servletUtils, ResourceImportManager resourceImportManager, ElementBusinessLogic elementBusinessLogic,
AssetMetadataConverter assetMetadataConverter, ComponentBusinessLogicProvider componentBusinessLogicProvider,
ServiceBusinessLogic serviceBusinessLogic, ResourceBusinessLogic resourceBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.elementBusinessLogic = elementBusinessLogic;
this.assetMetadataConverter = assetMetadataConverter;
this.serviceBusinessLogic = serviceBusinessLogic;
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/CrudExternalServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/CrudExternalServlet.java
index 3f0c049fb0..b0ec4e5727 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/CrudExternalServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/CrudExternalServlet.java
@@ -87,7 +87,6 @@ import org.openecomp.sdc.be.resources.data.auditing.model.DistributionData;
import org.openecomp.sdc.be.resources.data.auditing.model.ResourceCommonInfo;
import org.openecomp.sdc.be.servlets.AbstractValidationsServlet;
import org.openecomp.sdc.be.servlets.RepresentationUtils;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.be.utils.CommonBeUtils;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.datastructure.Wrapper;
@@ -113,12 +112,12 @@ public class CrudExternalServlet extends AbstractValidationsServlet {
private HttpServletRequest request;
@Inject
- public CrudExternalServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL,
+ public CrudExternalServlet(ComponentInstanceBusinessLogic componentInstanceBL,
ComponentsUtils componentsUtils, ServletUtils servletUtils, ResourceImportManager resourceImportManager,
ElementBusinessLogic elementBusinessLogic, AssetMetadataConverter assetMetadataUtils,
LifecycleBusinessLogic lifecycleBusinessLogic, ResourceBusinessLogic resourceBusinessLogic,
ServiceBusinessLogic serviceBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.elementBusinessLogic = elementBusinessLogic;
this.assetMetadataUtils = assetMetadataUtils;
this.lifecycleBusinessLogic = lifecycleBusinessLogic;
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefsServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefsServlet.java
index 0c3595e05d..8b2483a71f 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefsServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefsServlet.java
@@ -45,7 +45,6 @@ import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
import org.openecomp.sdc.be.dto.ExternalRefDTO;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.servlets.BeGenericServlet;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.datastructure.Wrapper;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.springframework.stereotype.Controller;
@@ -60,9 +59,9 @@ public class ExternalRefsServlet extends BeGenericServlet {
private final ExternalRefsBusinessLogic businessLogic;
@Inject
- public ExternalRefsServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils,
+ public ExternalRefsServlet(ComponentsUtils componentsUtils,
ExternalRefsBusinessLogic externalRefsBusinessLogic) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.businessLogic = externalRefsBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ServiceActivationServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ServiceActivationServlet.java
index 76d523d67f..8231bd530c 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ServiceActivationServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ServiceActivationServlet.java
@@ -55,7 +55,6 @@ import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.resources.data.auditing.model.DistributionData;
import org.openecomp.sdc.be.servlets.AbstractValidationsServlet;
import org.openecomp.sdc.be.servlets.RepresentationUtils;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.datastructure.Wrapper;
import org.openecomp.sdc.common.log.wrappers.Logger;
@@ -79,10 +78,10 @@ public class ServiceActivationServlet extends AbstractValidationsServlet {
private HttpServletRequest request;
@Inject
- public ServiceActivationServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL,
+ public ServiceActivationServlet(ComponentInstanceBusinessLogic componentInstanceBL,
ComponentsUtils componentsUtils, ServletUtils servletUtils, ResourceImportManager resourceImportManager,
ServiceBusinessLogic serviceBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.serviceBusinessLogic = serviceBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java
index 1b1111a86e..1eff7ab5ac 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java
@@ -101,9 +101,9 @@ public abstract class AbstractValidationsServlet extends BeGenericServlet {
protected ResourceImportManager resourceImportManager;
protected ServiceImportManager serviceImportManager;
- public AbstractValidationsServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL,
+ public AbstractValidationsServlet(ComponentInstanceBusinessLogic componentInstanceBL,
ComponentsUtils componentsUtils, ServletUtils servletUtils, ResourceImportManager resourceImportManager) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.servletUtils = servletUtils;
this.resourceImportManager = resourceImportManager;
this.componentInstanceBusinessLogic = componentInstanceBL;
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AdditionalInformationServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AdditionalInformationServlet.java
index 06e32b754e..80129f41b7 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AdditionalInformationServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AdditionalInformationServlet.java
@@ -55,7 +55,6 @@ import org.openecomp.sdc.be.datatypes.elements.AdditionalInfoParameterInfo;
import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.model.AdditionalInformationDefinition;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.openecomp.sdc.exception.ResponseFormat;
@@ -75,9 +74,9 @@ public class AdditionalInformationServlet extends BeGenericServlet {
private final AdditionalInformationBusinessLogic businessLogic;
@Inject
- public AdditionalInformationServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils,
+ public AdditionalInformationServlet(ComponentsUtils componentsUtils,
AdditionalInformationBusinessLogic businessLogic) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.businessLogic = businessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ArchiveEndpoint.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ArchiveEndpoint.java
index 39414a05e2..85db080aaf 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ArchiveEndpoint.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ArchiveEndpoint.java
@@ -26,9 +26,7 @@ import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.servers.Server;
-import io.swagger.v3.oas.annotations.servers.Servers;
import io.swagger.v3.oas.annotations.tags.Tag;
-import io.swagger.v3.oas.annotations.tags.Tags;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
@@ -49,7 +47,6 @@ import org.openecomp.sdc.be.components.impl.aaf.PermissionAllowed;
import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.model.catalog.CatalogComponent;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.elements.LoggerSupportability;
import org.openecomp.sdc.common.log.enums.LoggerSupportabilityActions;
@@ -71,8 +68,8 @@ public class ArchiveEndpoint extends BeGenericServlet {
private final ArchiveBusinessLogic archiveBusinessLogic;
@Inject
- public ArchiveEndpoint(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils, ArchiveBusinessLogic archiveBusinessLogic) {
- super(userBusinessLogic, componentsUtils);
+ public ArchiveEndpoint(ComponentsUtils componentsUtils, ArchiveBusinessLogic archiveBusinessLogic) {
+ super(componentsUtils);
this.archiveBusinessLogic = archiveBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ArtifactServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ArtifactServlet.java
index ad0f548523..f751ea09e7 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ArtifactServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ArtifactServlet.java
@@ -59,7 +59,6 @@ import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.model.ArtifactDefinition;
import org.openecomp.sdc.be.model.ArtifactUiDownloadData;
import org.openecomp.sdc.be.resources.data.auditing.model.ResourceCommonInfo;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.elements.LoggerSupportability;
import org.openecomp.sdc.common.log.enums.LoggerSupportabilityActions;
@@ -86,8 +85,8 @@ public class ArtifactServlet extends BeGenericServlet {
private final ArtifactsBusinessLogic artifactsBusinessLogic;
@Inject
- public ArtifactServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils, ArtifactsBusinessLogic artifactsBusinessLogic) {
- super(userBusinessLogic, componentsUtils);
+ public ArtifactServlet(ComponentsUtils componentsUtils, ArtifactsBusinessLogic artifactsBusinessLogic) {
+ super(componentsUtils);
this.artifactsBusinessLogic = artifactsBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AttributeServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AttributeServlet.java
index 14ce955419..6ea2ab1096 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AttributeServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AttributeServlet.java
@@ -57,7 +57,6 @@ import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.impl.ServletUtils;
import org.openecomp.sdc.be.model.AttributeDefinition;
import org.openecomp.sdc.be.model.User;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.datastructure.Wrapper;
import org.openecomp.sdc.common.log.enums.EcompLoggerErrorCode;
@@ -81,9 +80,9 @@ public class AttributeServlet extends AbstractValidationsServlet {
private static final String ATTRIBUTE_CONTENT_IS_INVALID = "Attribute content is invalid - {}";
@Inject
- public AttributeServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL, ComponentsUtils componentsUtils,
+ public AttributeServlet(ComponentInstanceBusinessLogic componentInstanceBL, ComponentsUtils componentsUtils,
ServletUtils servletUtils, ResourceImportManager resourceImportManager) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
}
/**
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AutomatedUpgradeEndpoint.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AutomatedUpgradeEndpoint.java
index 7bee732fa7..7257ea82df 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AutomatedUpgradeEndpoint.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AutomatedUpgradeEndpoint.java
@@ -51,7 +51,6 @@ import org.openecomp.sdc.be.components.upgrade.UpgradeStatus;
import org.openecomp.sdc.be.dao.api.ActionStatus;
import org.openecomp.sdc.be.dao.jsongraph.utils.JsonParserUtils;
import org.openecomp.sdc.be.impl.ComponentsUtils;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.springframework.stereotype.Controller;
@@ -69,8 +68,8 @@ public class AutomatedUpgradeEndpoint extends BeGenericServlet {
private final UpgradeBusinessLogic businessLogic;
@Inject
- public AutomatedUpgradeEndpoint(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils, UpgradeBusinessLogic businessLogic) {
- super(userBusinessLogic, componentsUtils);
+ public AutomatedUpgradeEndpoint(ComponentsUtils componentsUtils, UpgradeBusinessLogic businessLogic) {
+ super(componentsUtils);
this.businessLogic = businessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeGenericServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeGenericServlet.java
index 757b66aab9..2f98faed68 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeGenericServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeGenericServlet.java
@@ -88,10 +88,8 @@ public class BeGenericServlet extends BasicServlet {
@Context
protected HttpServletRequest servletRequest;
protected ComponentsUtils componentsUtils;
- private UserBusinessLogic userAdminManager;
- public BeGenericServlet(UserBusinessLogic userAdminManager, ComponentsUtils componentsUtils) {
- this.userAdminManager = userAdminManager;
+ public BeGenericServlet(ComponentsUtils componentsUtils) {
this.componentsUtils = componentsUtils;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeMonitoringServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeMonitoringServlet.java
index 5c7d88be0f..2a913b79fe 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeMonitoringServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeMonitoringServlet.java
@@ -46,7 +46,6 @@ import org.openecomp.sdc.be.components.health.HealthCheckBusinessLogic;
import org.openecomp.sdc.be.config.BeEcompErrorManager;
import org.openecomp.sdc.be.dao.api.ActionStatus;
import org.openecomp.sdc.be.impl.ComponentsUtils;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.api.HealthCheckInfo;
import org.openecomp.sdc.common.api.HealthCheckWrapper;
@@ -65,9 +64,9 @@ public class BeMonitoringServlet extends BeGenericServlet {
private final HealthCheckBusinessLogic healthCheckBusinessLogic;
@Inject
- public BeMonitoringServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils,
+ public BeMonitoringServlet(ComponentsUtils componentsUtils,
HealthCheckBusinessLogic healthCheckBusinessLogic) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.healthCheckBusinessLogic = healthCheckBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/CapabilityServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/CapabilityServlet.java
index bfa6798b20..6a1d77165e 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/CapabilityServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/CapabilityServlet.java
@@ -58,7 +58,6 @@ import org.openecomp.sdc.be.model.CapabilityDefinition;
import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
import org.openecomp.sdc.be.ui.model.UiComponentDataTransfer;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.openecomp.sdc.exception.ResponseFormat;
@@ -77,10 +76,10 @@ public class CapabilityServlet extends AbstractValidationsServlet {
private final CapabilitiesBusinessLogic capabilitiesBusinessLogic;
@Inject
- public CapabilityServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL, ComponentsUtils componentsUtils,
+ public CapabilityServlet(ComponentInstanceBusinessLogic componentInstanceBL, ComponentsUtils componentsUtils,
ServletUtils servletUtils, ResourceImportManager resourceImportManager,
CapabilitiesBusinessLogic capabilitiesBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.capabilitiesBusinessLogic = capabilitiesBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentAttributeServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentAttributeServlet.java
index bfde7a334d..d6efda4b90 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentAttributeServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentAttributeServlet.java
@@ -50,7 +50,6 @@ import org.openecomp.sdc.be.config.BeEcompErrorManager;
import org.openecomp.sdc.be.dao.api.ActionStatus;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.model.AttributeDefinition;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.exception.ResponseFormat;
import org.slf4j.Logger;
@@ -69,9 +68,9 @@ public class ComponentAttributeServlet extends BeGenericServlet {
private final AttributeBusinessLogic attributeBusinessLogic;
@Inject
- public ComponentAttributeServlet(final UserBusinessLogic userBusinessLogic, final ComponentsUtils componentsUtils,
+ public ComponentAttributeServlet(final ComponentsUtils componentsUtils,
final AttributeBusinessLogic attributeBusinessLogic) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.attributeBusinessLogic = attributeBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java
index a5022c0857..b6cb8122ce 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java
@@ -104,7 +104,6 @@ import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
import org.openecomp.sdc.be.model.operations.impl.PropertyOperation.PropertyConstraintDeserialiser;
import org.openecomp.sdc.be.resources.data.ComponentMetadataData;
import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.datastructure.Wrapper;
import org.openecomp.sdc.common.log.elements.LoggerSupportability;
@@ -150,10 +149,11 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet {
private final ComponentBusinessLogicProvider componentBusinessLogicProvider;
@Inject
- public ComponentInstanceServlet(UserBusinessLogic userBusinessLogic, GroupBusinessLogic groupBL,
+ public ComponentInstanceServlet(GroupBusinessLogic groupBL,
ComponentInstanceBusinessLogic componentInstanceBL, ComponentsUtils componentsUtils, ServletUtils servletUtils,
- ResourceImportManager resourceImportManager, ComponentNodeFilterBusinessLogic nodeFilterBusinessLogic, ComponentBusinessLogicProvider componentBusinessLogicProvider) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ ResourceImportManager resourceImportManager, ComponentNodeFilterBusinessLogic nodeFilterBusinessLogic,
+ ComponentBusinessLogicProvider componentBusinessLogicProvider) {
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.groupBL = groupBL;
this.nodeFilterBusinessLogic = nodeFilterBusinessLogic;
this.componentBusinessLogicProvider = componentBusinessLogicProvider;
@@ -580,17 +580,17 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet {
}
private void handleDeprecatedComponentInstancePropertyStructure(final List<ComponentInstanceProperty> propertiesToUpdate,
- final ComponentTypeEnum componentTypeEnum) {
+ final ComponentTypeEnum componentTypeEnum) {
propertiesToUpdate.stream().forEach(property -> {
if (property.getGetInputValues() != null) {
property.getGetInputValues().stream()
- .forEach(getInputValue -> property.setToscaFunction(createToscaFunction(getInputValue, componentTypeEnum)));
+ .forEach(getInputValue -> property.setToscaFunction(createToscaFunction(getInputValue, componentTypeEnum)));
}
});
}
private ToscaGetFunctionDataDefinition createToscaFunction(final GetInputValueDataDefinition getInput,
- final ComponentTypeEnum componentTypeEnum) {
+ final ComponentTypeEnum componentTypeEnum) {
final String[] inputIdSplit = getInput.getInputId().split("\\.");
ToscaGetFunctionDataDefinition toscaFunction = new ToscaGetFunctionDataDefinition();
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInterfaceOperationServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInterfaceOperationServlet.java
index 64b8500979..fbb7d0b0ac 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInterfaceOperationServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInterfaceOperationServlet.java
@@ -62,7 +62,6 @@ import org.openecomp.sdc.be.model.InterfaceDefinition;
import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
import org.openecomp.sdc.be.ui.model.UiComponentDataTransfer;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.datastructure.Wrapper;
import org.openecomp.sdc.common.util.ValidationUtils;
@@ -92,11 +91,11 @@ public class ComponentInterfaceOperationServlet extends AbstractValidationsServl
private final ComponentInterfaceOperationBusinessLogic componentInterfaceOperationBusinessLogic;
@Autowired
- public ComponentInterfaceOperationServlet(final UserBusinessLogic userBusinessLogic, final ComponentInstanceBusinessLogic componentInstanceBL,
+ public ComponentInterfaceOperationServlet(final ComponentInstanceBusinessLogic componentInstanceBL,
final ComponentsUtils componentsUtils, final ServletUtils servletUtils,
final ResourceImportManager resourceImportManager,
final ComponentInterfaceOperationBusinessLogic componentInterfaceOperationBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.componentInterfaceOperationBusinessLogic = componentInterfaceOperationBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentNodeFilterServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentNodeFilterServlet.java
index d69a7d367c..75c53228c3 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentNodeFilterServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentNodeFilterServlet.java
@@ -63,7 +63,6 @@ import org.openecomp.sdc.be.ui.mapper.FilterConstraintMapper;
import org.openecomp.sdc.be.ui.mapper.UIConstraintMapper;
import org.openecomp.sdc.be.ui.model.UIConstraint;
import org.openecomp.sdc.be.ui.model.UINodeFilter;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -92,11 +91,11 @@ public class ComponentNodeFilterServlet extends AbstractValidationsServlet {
private final ComponentNodeFilterBusinessLogic componentNodeFilterBusinessLogic;
@Inject
- public ComponentNodeFilterServlet(final UserBusinessLogic userBusinessLogic, final ComponentInstanceBusinessLogic componentInstanceBL,
+ public ComponentNodeFilterServlet(final ComponentInstanceBusinessLogic componentInstanceBL,
final ComponentsUtils componentsUtils, final ServletUtils servletUtils,
final ResourceImportManager resourceImportManager,
final ComponentNodeFilterBusinessLogic componentNodeFilterBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.componentNodeFilterBusinessLogic = componentNodeFilterBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentPropertyServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentPropertyServlet.java
index 101f10df19..b6f031bd41 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentPropertyServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentPropertyServlet.java
@@ -53,7 +53,6 @@ import org.openecomp.sdc.be.model.PropertyDefinition;
import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.model.cache.ApplicationDataTypeCache;
import org.openecomp.sdc.be.resources.data.EntryData;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.elements.LoggerSupportability;
import org.openecomp.sdc.common.log.enums.LoggerSupportabilityActions;
@@ -77,9 +76,9 @@ public class ComponentPropertyServlet extends BeGenericServlet {
private final ApplicationDataTypeCache applicationDataTypeCache;
@Inject
- public ComponentPropertyServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils,
+ public ComponentPropertyServlet(ComponentsUtils componentsUtils,
ApplicationDataTypeCache applicationDataTypeCache, PropertyBusinessLogic propertyBusinessLogic) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.applicationDataTypeCache = applicationDataTypeCache;
this.propertyBusinessLogic = propertyBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentServlet.java
index e60d7d53ba..92d42e0d85 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentServlet.java
@@ -71,7 +71,6 @@ import org.openecomp.sdc.be.model.Resource;
import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.ui.model.UiComponentDataTransfer;
import org.openecomp.sdc.be.ui.model.UiLeftPaletteComponent;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.be.view.ResponseView;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.wrappers.Logger;
@@ -94,9 +93,9 @@ public class ComponentServlet extends BeGenericServlet {
private final ComponentBusinessLogicProvider componentBusinessLogicProvider;
@Inject
- public ComponentServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils,
+ public ComponentServlet(ComponentsUtils componentsUtils,
ComponentBusinessLogicProvider componentBusinessLogicProvider) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.componentBusinessLogicProvider = componentBusinessLogicProvider;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentSubstitutionFilterServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentSubstitutionFilterServlet.java
index 596237065f..55ff6f4a7b 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentSubstitutionFilterServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentSubstitutionFilterServlet.java
@@ -62,7 +62,6 @@ import org.openecomp.sdc.be.tosca.utils.SubstitutionFilterConverter;
import org.openecomp.sdc.be.ui.mapper.FilterConstraintMapper;
import org.openecomp.sdc.be.ui.model.UIConstraint;
import org.openecomp.sdc.be.ui.model.UINodeFilter;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -95,11 +94,11 @@ public class ComponentSubstitutionFilterServlet extends AbstractValidationsServl
private final ComponentSubstitutionFilterBusinessLogic componentSubstitutionFilterBusinessLogic;
@Inject
- public ComponentSubstitutionFilterServlet(final UserBusinessLogic userBusinessLogic, final ComponentInstanceBusinessLogic componentInstanceBL,
+ public ComponentSubstitutionFilterServlet(final ComponentInstanceBusinessLogic componentInstanceBL,
final ComponentsUtils componentsUtils, final ServletUtils servletUtils,
final ResourceImportManager resourceImportManager,
final ComponentSubstitutionFilterBusinessLogic componentSubstitutionFilterBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.componentSubstitutionFilterBusinessLogic = componentSubstitutionFilterBusinessLogic;
}
@@ -246,7 +245,7 @@ public class ComponentSubstitutionFilterServlet extends AbstractValidationsServl
final FilterConstraintDto filterConstraintDto = new FilterConstraintMapper().mapFrom(uiConstraint);
final Optional<SubstitutionFilterDataDefinition> actionResponse = componentSubstitutionFilterBusinessLogic
- .updateSubstitutionFilter(componentId.toLowerCase(), filterConstraintDto, index , true);
+ .updateSubstitutionFilter(componentId.toLowerCase(), filterConstraintDto, index, true);
if (actionResponse.isEmpty()) {
LOGGER.error(FAILED_TO_UPDATE_SUBSTITUTION_FILTER);
return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR));
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ConsumerServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ConsumerServlet.java
index 75f362b976..049b674fae 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ConsumerServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ConsumerServlet.java
@@ -54,7 +54,6 @@ import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.model.ConsumerDefinition;
import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.openecomp.sdc.exception.ResponseFormat;
@@ -72,8 +71,8 @@ public class ConsumerServlet extends BeGenericServlet {
private final ConsumerBusinessLogic businessLogic;
@Inject
- public ConsumerServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils, ConsumerBusinessLogic businessLogic) {
- super(userBusinessLogic, componentsUtils);
+ public ConsumerServlet(ComponentsUtils componentsUtils, ConsumerBusinessLogic businessLogic) {
+ super(componentsUtils);
this.businessLogic = businessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DirectiveServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DirectiveServlet.java
index 5491201ed8..002d878d36 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DirectiveServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DirectiveServlet.java
@@ -46,7 +46,6 @@ import org.openecomp.sdc.be.config.ConfigurationManager;
import org.openecomp.sdc.be.dao.api.ActionStatus;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.model.User;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -59,8 +58,8 @@ public class DirectiveServlet extends BeGenericServlet {
private static final Logger LOGGER = LoggerFactory.getLogger(DirectiveServlet.class);
@Inject
- public DirectiveServlet(final UserBusinessLogic userAdminManager, final ComponentsUtils componentsUtils) {
- super(userAdminManager, componentsUtils);
+ public DirectiveServlet(final ComponentsUtils componentsUtils) {
+ super(componentsUtils);
}
@GET
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DistributionServiceServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DistributionServiceServlet.java
index 6932448024..96169f4dd0 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DistributionServiceServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DistributionServiceServlet.java
@@ -49,7 +49,6 @@ import org.openecomp.sdc.be.dao.api.ActionStatus;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.info.DistributionStatusListResponse;
import org.openecomp.sdc.be.info.DistributionStatusOfServiceListResponce;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.openecomp.sdc.exception.ResponseFormat;
@@ -69,9 +68,9 @@ public class DistributionServiceServlet extends BeGenericServlet {
private DistributionMonitoringBusinessLogic distributionMonitoringLogic;
@Inject
- public DistributionServiceServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils,
+ public DistributionServiceServlet(ComponentsUtils componentsUtils,
DistributionMonitoringBusinessLogic distributionMonitoringLogic) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.distributionMonitoringLogic = distributionMonitoringLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ElementServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ElementServlet.java
index f11bd8187a..e949b13d1c 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ElementServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ElementServlet.java
@@ -103,10 +103,10 @@ public class ElementServlet extends BeGenericServlet {
private final ModelBusinessLogic modelBusinessLogic;
@Inject
- public ElementServlet(final UserBusinessLogic userBusinessLogic, final ComponentsUtils componentsUtils,
+ public ElementServlet(final ComponentsUtils componentsUtils,
final ComponentsCleanBusinessLogic componentsCleanBusinessLogic, final ElementBusinessLogic elementBusinessLogic,
final ArtifactsBusinessLogic artifactsBusinessLogic, final ModelBusinessLogic modelBusinessLogic) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.componentsCleanBusinessLogic = componentsCleanBusinessLogic;
this.elementBusinessLogic = elementBusinessLogic;
this.artifactsBusinessLogic = artifactsBusinessLogic;
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GenericArtifactBrowserServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GenericArtifactBrowserServlet.java
index 37c754de59..76af7b718f 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GenericArtifactBrowserServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GenericArtifactBrowserServlet.java
@@ -50,7 +50,6 @@ import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic;
import org.openecomp.sdc.be.components.impl.GenericArtifactBrowserBusinessLogic;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.info.GenericArtifactQueryInfo;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.owasp.esapi.ESAPI;
import org.springframework.stereotype.Controller;
@@ -69,9 +68,9 @@ public class GenericArtifactBrowserServlet extends BeGenericServlet {
private final ArtifactsBusinessLogic artifactsBusinessLogic;
@Inject
- public GenericArtifactBrowserServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils,
+ public GenericArtifactBrowserServlet(ComponentsUtils componentsUtils,
ArtifactsBusinessLogic artifactsBusinessLogic, GenericArtifactBrowserBusinessLogic gabLogic) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.artifactsBusinessLogic = artifactsBusinessLogic;
this.gabLogic = gabLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupEndpoint.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupEndpoint.java
index 7475817283..610935cba1 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupEndpoint.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupEndpoint.java
@@ -48,7 +48,6 @@ import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.model.GroupProperty;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.elements.LoggerSupportability;
import org.openecomp.sdc.common.log.enums.LoggerSupportabilityActions;
@@ -71,8 +70,8 @@ public class GroupEndpoint extends BeGenericServlet {
private final GroupBusinessLogicNew groupBusinessLogic;
@Inject
- public GroupEndpoint(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils, GroupBusinessLogicNew groupBusinessLogic) {
- super(userBusinessLogic, componentsUtils);
+ public GroupEndpoint(ComponentsUtils componentsUtils, GroupBusinessLogicNew groupBusinessLogic) {
+ super(componentsUtils);
this.groupBusinessLogic = groupBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupServlet.java
index 63afee57a0..ca932e7bde 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupServlet.java
@@ -60,7 +60,6 @@ import org.openecomp.sdc.be.info.GroupDefinitionInfo;
import org.openecomp.sdc.be.model.GroupDefinition;
import org.openecomp.sdc.be.model.Resource;
import org.openecomp.sdc.be.model.User;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.openecomp.sdc.exception.ResponseFormat;
@@ -83,9 +82,9 @@ public class GroupServlet extends AbstractValidationsServlet {
private final GroupBusinessLogic groupBL;
@Inject
- public GroupServlet(UserBusinessLogic userBusinessLogic, GroupBusinessLogic groupBL, ComponentInstanceBusinessLogic componentInstanceBL,
+ public GroupServlet(GroupBusinessLogic groupBL, ComponentInstanceBusinessLogic componentInstanceBL,
ComponentsUtils componentsUtils, ServletUtils servletUtils, ResourceImportManager resourceImportManager) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.groupBL = groupBL;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupTypesEndpoint.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupTypesEndpoint.java
index 72dd2186d5..d3b2ae4e62 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupTypesEndpoint.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupTypesEndpoint.java
@@ -44,7 +44,6 @@ import org.openecomp.sdc.be.components.impl.aaf.PermissionAllowed;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.mixin.GroupTypeMixin;
import org.openecomp.sdc.be.model.GroupTypeDefinition;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.be.view.ResponseView;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.util.ValidationUtils;
@@ -61,8 +60,8 @@ public class GroupTypesEndpoint extends BeGenericServlet {
private final GroupTypeBusinessLogic groupTypeBusinessLogic;
- public GroupTypesEndpoint(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils, GroupTypeBusinessLogic groupTypeBusinessLogic) {
- super(userBusinessLogic, componentsUtils);
+ public GroupTypesEndpoint(ComponentsUtils componentsUtils, GroupTypeBusinessLogic groupTypeBusinessLogic) {
+ super(componentsUtils);
this.groupTypeBusinessLogic = groupTypeBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/InputsServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/InputsServlet.java
index 154060509e..9643c0ae02 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/InputsServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/InputsServlet.java
@@ -73,7 +73,6 @@ import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
import org.openecomp.sdc.be.resources.data.EntryData;
import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.elements.LoggerSupportability;
import org.openecomp.sdc.common.log.enums.LoggerSupportabilityActions;
@@ -99,10 +98,10 @@ public class InputsServlet extends AbstractValidationsServlet {
private final InputsBusinessLogic inputsBusinessLogic;
@Inject
- public InputsServlet(UserBusinessLogic userBusinessLogic, InputsBusinessLogic inputsBusinessLogic,
+ public InputsServlet(InputsBusinessLogic inputsBusinessLogic,
ComponentInstanceBusinessLogic componentInstanceBL, ComponentsUtils componentsUtils, ServletUtils servletUtils,
ResourceImportManager resourceImportManager, DataTypeBusinessLogic dataTypeBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.inputsBusinessLogic = inputsBusinessLogic;
this.businessLogic = dataTypeBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/InterfaceOperationServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/InterfaceOperationServlet.java
index 7eb3c8ad2a..60ffada724 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/InterfaceOperationServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/InterfaceOperationServlet.java
@@ -62,7 +62,6 @@ import org.openecomp.sdc.be.model.InterfaceDefinition;
import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
import org.openecomp.sdc.be.ui.model.UiComponentDataTransfer;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.exception.ResponseFormat;
import org.slf4j.Logger;
@@ -82,10 +81,10 @@ public class InterfaceOperationServlet extends AbstractValidationsServlet {
private final InterfaceOperationBusinessLogic interfaceOperationBusinessLogic;
@Inject
- public InterfaceOperationServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL,
+ public InterfaceOperationServlet(ComponentInstanceBusinessLogic componentInstanceBL,
ComponentsUtils componentsUtils, ServletUtils servletUtils, ResourceImportManager resourceImportManager,
InterfaceOperationBusinessLogic interfaceOperationBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.interfaceOperationBusinessLogic = interfaceOperationBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/LifecycleServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/LifecycleServlet.java
index bd61ad6efe..c294492763 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/LifecycleServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/LifecycleServlet.java
@@ -59,7 +59,6 @@ import org.openecomp.sdc.be.model.LifeCycleTransitionEnum;
import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
import org.openecomp.sdc.be.ui.model.UiComponentMetadata;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.elements.LoggerSupportability;
import org.openecomp.sdc.common.log.enums.LoggerSupportabilityActions;
@@ -81,8 +80,8 @@ public class LifecycleServlet extends BeGenericServlet {
private LifecycleBusinessLogic lifecycleBusinessLogic;
@Inject
- public LifecycleServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils, LifecycleBusinessLogic lifecycleBusinessLogic) {
- super(userBusinessLogic, componentsUtils);
+ public LifecycleServlet(ComponentsUtils componentsUtils, LifecycleBusinessLogic lifecycleBusinessLogic) {
+ super(componentsUtils);
this.lifecycleBusinessLogic = lifecycleBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/LockServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/LockServlet.java
index 7319f7c060..b6a098c0d3 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/LockServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/LockServlet.java
@@ -18,8 +18,15 @@
*/
package org.openecomp.sdc.be.servlets;
+import com.jcabi.aspects.Loggable;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.servers.Server;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.Arrays;
-
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Consumes;
@@ -30,28 +37,16 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-
import org.openecomp.sdc.be.components.impl.aaf.AafPermission;
import org.openecomp.sdc.be.components.impl.aaf.PermissionAllowed;
import org.openecomp.sdc.be.components.validation.UserValidations;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.model.operations.api.IGraphLockOperation;
import org.openecomp.sdc.be.user.Role;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.log.enums.EcompLoggerErrorCode;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.springframework.stereotype.Controller;
-import com.jcabi.aspects.Loggable;
-
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.media.Content;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.responses.ApiResponse;
-import io.swagger.v3.oas.annotations.servers.Server;
-import io.swagger.v3.oas.annotations.tags.Tag;
-
@Loggable(prepend = true, value = Loggable.DEBUG, trim = false)
@Path("/v1/catalog")
@@ -65,9 +60,9 @@ public class LockServlet extends BeGenericServlet {
private final IGraphLockOperation graphLockOperation;
@Inject
- public LockServlet(final UserBusinessLogic userBusinessLogic, final ComponentsUtils componentsUtils,
- final UserValidations userValidations, IGraphLockOperation graphLockOperation) {
- super(userBusinessLogic, componentsUtils);
+ public LockServlet(final ComponentsUtils componentsUtils,
+ final UserValidations userValidations, IGraphLockOperation graphLockOperation) {
+ super(componentsUtils);
this.userValidations = userValidations;
this.graphLockOperation = graphLockOperation;
}
@@ -83,7 +78,7 @@ public class LockServlet extends BeGenericServlet {
@ApiResponse(responseCode = "500", description = "Update disable locking failed")
})
public Response toggleDisableLocking(@Context final HttpServletRequest request, @HeaderParam("USER_ID") String userId,
- @Parameter(description = "Disable Locking") boolean disable) {
+ @Parameter(description = "Disable Locking") boolean disable) {
log.info("User {} attempting to set disable locking with value {}", userId, disable);
userValidations.validateUserRole(userValidations.validateUserExists(userId), Arrays.asList(Role.DESIGNER, Role.ADMIN));
try {
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ModelServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ModelServlet.java
index f52277f3ef..ad546d5283 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ModelServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ModelServlet.java
@@ -63,7 +63,6 @@ import org.openecomp.sdc.be.model.Model;
import org.openecomp.sdc.be.model.jsonjanusgraph.operations.exception.ModelOperationExceptionSupplier;
import org.openecomp.sdc.be.ui.model.ModelCreateRequest;
import org.openecomp.sdc.be.user.Role;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.util.ValidationUtils;
import org.slf4j.Logger;
@@ -85,10 +84,10 @@ public class ModelServlet extends AbstractValidationsServlet {
private final UserValidations userValidations;
@Inject
- public ModelServlet(final UserBusinessLogic userBusinessLogic, final ComponentInstanceBusinessLogic componentInstanceBL,
+ public ModelServlet(final ComponentInstanceBusinessLogic componentInstanceBL,
final ComponentsUtils componentsUtils, final ServletUtils servletUtils, final ResourceImportManager resourceImportManager,
final ModelBusinessLogic modelBusinessLogic, final UserValidations userValidations) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.modelBusinessLogic = modelBusinessLogic;
this.userValidations = userValidations;
}
@@ -105,9 +104,9 @@ public class ModelServlet extends AbstractValidationsServlet {
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "409", description = "Model already exists")})
public Response createModel(@Parameter(description = "model to be created", required = true)
- @NotNull @Valid @FormDataParam("model") final ModelCreateRequest modelCreateRequest,
+ @NotNull @Valid @FormDataParam("model") final ModelCreateRequest modelCreateRequest,
@Parameter(description = "the model TOSCA imports zipped", required = true)
- @NotNull @FormDataParam("modelImportsZip") final InputStream modelImportsZip,
+ @NotNull @FormDataParam("modelImportsZip") final InputStream modelImportsZip,
@HeaderParam(value = Constants.USER_ID_HEADER) final String userId) {
validateUser(ValidationUtils.sanitizeInputString(userId));
final var modelName = ValidationUtils.sanitizeInputString(modelCreateRequest.getName().trim());
@@ -141,7 +140,8 @@ public class ModelServlet extends AbstractValidationsServlet {
public Response listModels(@HeaderParam(value = Constants.USER_ID_HEADER) final String userId, @QueryParam("modelType") final String modelType) {
validateUser(ValidationUtils.sanitizeInputString(userId));
try {
- final List<Model> modelList = StringUtils.isEmpty(modelType)? modelBusinessLogic.listModels() : modelBusinessLogic.listModels(getModelTypeEnum(modelType));
+ final List<Model> modelList =
+ StringUtils.isEmpty(modelType) ? modelBusinessLogic.listModels() : modelBusinessLogic.listModels(getModelTypeEnum(modelType));
return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), RepresentationUtils.toRepresentation(modelList));
} catch (final BusinessException e) {
throw e;
@@ -152,7 +152,7 @@ public class ModelServlet extends AbstractValidationsServlet {
return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR));
}
}
-
+
private ModelTypeEnum getModelTypeEnum(final String modelType) {
final ModelTypeEnum modelTypeEnum = ModelTypeEnum.valueOf(modelType.toUpperCase());
if (modelTypeEnum == null) {
@@ -173,9 +173,9 @@ public class ModelServlet extends AbstractValidationsServlet {
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "404", description = "Model not found")})
public Response updateModelImports(@Parameter(description = "model to be created", required = true)
- @NotNull @FormDataParam("modelName") String modelName,
+ @NotNull @FormDataParam("modelName") String modelName,
@Parameter(description = "the model TOSCA imports zipped", required = true)
- @NotNull @FormDataParam("modelImportsZip") final InputStream modelImportsZip,
+ @NotNull @FormDataParam("modelImportsZip") final InputStream modelImportsZip,
@HeaderParam(value = Constants.USER_ID_HEADER) final String userId) {
validateUser(ValidationUtils.sanitizeInputString(userId));
modelName = ValidationUtils.sanitizeInputString(modelName);
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/OutputsServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/OutputsServlet.java
index dae80ba082..a799872444 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/OutputsServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/OutputsServlet.java
@@ -62,7 +62,6 @@ import org.openecomp.sdc.be.model.ComponentInstanceOutput;
import org.openecomp.sdc.be.model.OutputDefinition;
import org.openecomp.sdc.be.model.Resource;
import org.openecomp.sdc.be.model.User;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.openecomp.sdc.exception.ResponseFormat;
@@ -82,10 +81,10 @@ public class OutputsServlet extends AbstractValidationsServlet {
private final OutputsBusinessLogic outputsBusinessLogic;
@Inject
- public OutputsServlet(final UserBusinessLogic userBusinessLogic, final OutputsBusinessLogic outputsBusinessLogic,
+ public OutputsServlet(final OutputsBusinessLogic outputsBusinessLogic,
final ComponentInstanceBusinessLogic componentInstanceBL, final ComponentsUtils componentsUtils,
final ServletUtils servletUtils, final ResourceImportManager resourceImportManager) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.outputsBusinessLogic = outputsBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PolicyServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PolicyServlet.java
index 8ba84b80a5..1645e76af6 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PolicyServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PolicyServlet.java
@@ -65,7 +65,6 @@ import org.openecomp.sdc.be.impl.ServletUtils;
import org.openecomp.sdc.be.model.PolicyDefinition;
import org.openecomp.sdc.be.model.PolicyTargetDTO;
import org.openecomp.sdc.be.model.Resource;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.elements.LoggerSupportability;
import org.openecomp.sdc.common.log.enums.LoggerSupportabilityActions;
@@ -91,9 +90,9 @@ public class PolicyServlet extends AbstractValidationsServlet {
private final PolicyBusinessLogic policyBusinessLogic;
@Inject
- public PolicyServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL, ComponentsUtils componentsUtils,
+ public PolicyServlet(ComponentInstanceBusinessLogic componentInstanceBL, ComponentsUtils componentsUtils,
ServletUtils servletUtils, ResourceImportManager resourceImportManager, PolicyBusinessLogic policyBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.policyBusinessLogic = policyBusinessLogic;
this.servletUtils = servletUtils;
this.resourceImportManager = resourceImportManager;
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PolicyTypesEndpoint.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PolicyTypesEndpoint.java
index 3c69354203..a978a53582 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PolicyTypesEndpoint.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PolicyTypesEndpoint.java
@@ -44,7 +44,6 @@ import org.openecomp.sdc.be.components.impl.aaf.PermissionAllowed;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.mixin.PolicyTypeMixin;
import org.openecomp.sdc.be.model.PolicyTypeDefinition;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.be.view.ResponseView;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.wrappers.Logger;
@@ -63,9 +62,9 @@ public class PolicyTypesEndpoint extends BeGenericServlet {
private static final Logger log = Logger.getLogger(PolicyTypesEndpoint.class);
private final PolicyTypeBusinessLogic policyTypeBusinessLogic;
- public PolicyTypesEndpoint(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils,
+ public PolicyTypesEndpoint(ComponentsUtils componentsUtils,
PolicyTypeBusinessLogic policyTypeBusinessLogic) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.policyTypeBusinessLogic = policyTypeBusinessLogic;
}
@@ -82,7 +81,7 @@ public class PolicyTypesEndpoint extends BeGenericServlet {
@Parameter(description = "An optional parameter to indicate the type of the container from where this call is executed")
@QueryParam("internalComponentType") String internalComponentType,
@QueryParam("componentModel") String internalComponentModel,
- @Parameter(description = "The user id", required = true) @HeaderParam(value = Constants.USER_ID_HEADER) String userId) {
+ @Parameter(description = "The user id", required = true) @HeaderParam(value = Constants.USER_ID_HEADER) String userId) {
log.debug("(get) Start handle request of GET policyTypes");
if (internalComponentModel != null) {
internalComponentModel = ValidationUtils.sanitizeInputString(internalComponentModel.trim());
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/RequirementServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/RequirementServlet.java
index fcfe37ac11..1a12670c23 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/RequirementServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/RequirementServlet.java
@@ -57,7 +57,6 @@ import org.openecomp.sdc.be.model.RequirementDefinition;
import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
import org.openecomp.sdc.be.ui.model.UiComponentDataTransfer;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.openecomp.sdc.exception.ResponseFormat;
@@ -76,10 +75,10 @@ public class RequirementServlet extends AbstractValidationsServlet {
private final RequirementBusinessLogic requirementBusinessLogic;
@Inject
- public RequirementServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL,
+ public RequirementServlet(ComponentInstanceBusinessLogic componentInstanceBL,
ComponentsUtils componentsUtils, ServletUtils servletUtils, ResourceImportManager resourceImportManager,
RequirementBusinessLogic requirementBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.requirementBusinessLogic = requirementBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourceUploadServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourceUploadServlet.java
index b200b32204..c1eccdbef0 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourceUploadServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourceUploadServlet.java
@@ -63,7 +63,6 @@ import org.openecomp.sdc.be.model.NodeTypesMetadataList;
import org.openecomp.sdc.be.model.UploadResourceInfo;
import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.model.jsonjanusgraph.operations.exception.ModelOperationExceptionSupplier;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.datastructure.Wrapper;
import org.openecomp.sdc.common.util.ValidationUtils;
@@ -91,10 +90,10 @@ public class ResourceUploadServlet extends AbstractValidationsServlet {
private final ModelBusinessLogic modelBusinessLogic;
@Inject
- public ResourceUploadServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL,
+ public ResourceUploadServlet(ComponentInstanceBusinessLogic componentInstanceBL,
ComponentsUtils componentsUtils, ServletUtils servletUtils, ResourceImportManager resourceImportManager,
ModelBusinessLogic modelBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.modelBusinessLogic = modelBusinessLogic;
}
@@ -213,6 +212,7 @@ public class ResourceUploadServlet extends AbstractValidationsServlet {
/**
* The Model field is an optional entry when uploading a resource. If the field is present, it validates if the Model name exists.
+ *
* @param modelName Model names declared on the resource json representation
*/
private void validateModel(final String modelName) {
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourcesServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourcesServlet.java
index 8109521252..d84e40c3d8 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourcesServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourcesServlet.java
@@ -31,6 +31,26 @@ import io.swagger.v3.oas.annotations.servers.Server;
import io.swagger.v3.oas.annotations.servers.Servers;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.tags.Tags;
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import javax.inject.Inject;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.HeaderParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
import org.apache.http.HttpStatus;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam;
@@ -58,7 +78,6 @@ import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
import org.openecomp.sdc.be.resources.data.auditing.model.DistributionData;
import org.openecomp.sdc.be.resources.data.auditing.model.ResourceCommonInfo;
import org.openecomp.sdc.be.servlets.ResourceUploadServlet.ResourceAuthorityTypeEnum;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.datastructure.Wrapper;
import org.openecomp.sdc.common.log.elements.LoggerSupportability;
@@ -70,27 +89,6 @@ import org.openecomp.sdc.common.zip.exception.ZipException;
import org.openecomp.sdc.exception.ResponseFormat;
import org.springframework.stereotype.Controller;
-import javax.inject.Inject;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.HeaderParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-
@Loggable(prepend = true, value = Loggable.DEBUG, trim = false)
@Path("/v1/catalog")
@Tags({@Tag(name = "SDCE-2 APIs")})
@@ -105,10 +103,10 @@ public class ResourcesServlet extends AbstractValidationsServlet {
private final ResourceBusinessLogic resourceBusinessLogic;
@Inject
- public ResourcesServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL,
+ public ResourcesServlet(ComponentInstanceBusinessLogic componentInstanceBL,
ResourceBusinessLogic resourceBusinessLogic, ComponentsUtils componentsUtils, ServletUtils servletUtils,
ResourceImportManager resourceImportManager) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.resourceBusinessLogic = resourceBusinessLogic;
}
@@ -222,8 +220,8 @@ public class ResourcesServlet extends AbstractValidationsServlet {
@PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE)
public Response deleteResource(@PathParam("resourceId") final String resourceId,
@Parameter(description = "Optional parameter to determine the delete action: " +
- "DELETE, which will permanently delete the Resource from the system or " +
- "MARK_AS_DELETE, which will logically mark the Resource as deleted. Default action is to MARK_AS_DELETE")
+ "DELETE, which will permanently delete the Resource from the system or " +
+ "MARK_AS_DELETE, which will logically mark the Resource as deleted. Default action is to MARK_AS_DELETE")
@QueryParam("deleteAction") final DeleteActionEnum deleteAction,
@Context final HttpServletRequest request) {
String url = request.getMethod() + " " + request.getRequestURI();
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceConsumptionServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceConsumptionServlet.java
index f6dc2973a5..6f4eb2ec54 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceConsumptionServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceConsumptionServlet.java
@@ -69,7 +69,6 @@ import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
import org.openecomp.sdc.be.types.ServiceConsumptionData;
import org.openecomp.sdc.be.types.ServiceConsumptionSource;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.exception.ResponseFormat;
import org.openecomp.sdc.tosca.datatypes.ToscaFunctions;
@@ -88,9 +87,9 @@ public class ServiceConsumptionServlet extends BeGenericServlet {
private final ServiceBusinessLogic serviceBusinessLogic;
@Inject
- public ServiceConsumptionServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils,
+ public ServiceConsumptionServlet(ComponentsUtils componentsUtils,
InterfaceOperationBusinessLogic interfaceOperationBusinessLogic, ServiceBusinessLogic serviceBusinessLogic) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.interfaceOperationBusinessLogic = interfaceOperationBusinessLogic;
this.serviceBusinessLogic = serviceBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceForwardingPathServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceForwardingPathServlet.java
index 169e1cf7e7..ed27fa0d3e 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceForwardingPathServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceForwardingPathServlet.java
@@ -67,7 +67,6 @@ import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
import org.openecomp.sdc.be.ui.model.UiComponentDataTransfer;
import org.openecomp.sdc.be.ui.model.UiServiceDataTransfer;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.openecomp.sdc.exception.ResponseFormat;
@@ -88,10 +87,10 @@ public class ServiceForwardingPathServlet extends AbstractValidationsServlet {
private final ServiceBusinessLogic serviceBusinessLogic;
@Inject
- public ServiceForwardingPathServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL,
+ public ServiceForwardingPathServlet(ComponentInstanceBusinessLogic componentInstanceBL,
ComponentsUtils componentsUtils, ServletUtils servletUtils, ResourceImportManager resourceImportManager,
ServiceBusinessLogic serviceBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.serviceBusinessLogic = serviceBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceServlet.java
index f49bfdc637..d3a2f7cca0 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceServlet.java
@@ -86,7 +86,6 @@ import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
import org.openecomp.sdc.be.resources.data.auditing.model.DistributionData;
import org.openecomp.sdc.be.resources.data.auditing.model.ResourceCommonInfo;
import org.openecomp.sdc.be.servlets.ServiceUploadServlet.ServiceAuthorityTypeEnum;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.datastructure.Wrapper;
import org.openecomp.sdc.common.log.elements.LoggerSupportability;
@@ -111,10 +110,10 @@ public class ServiceServlet extends AbstractValidationsServlet {
private final ServiceBusinessLogic serviceBusinessLogic;
@Inject
- public ServiceServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL, ComponentsUtils componentsUtils,
+ public ServiceServlet(ComponentInstanceBusinessLogic componentInstanceBL, ComponentsUtils componentsUtils,
ServletUtils servletUtils, ResourceImportManager resourceImportManager, ServiceBusinessLogic serviceBusinessLogic,
ResourceBusinessLogic resourceBusinessLogic, ElementBusinessLogic elementBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.serviceBusinessLogic = serviceBusinessLogic;
this.elementBusinessLogic = elementBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceUploadServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceUploadServlet.java
index c7dd825f59..99c539357e 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceUploadServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceUploadServlet.java
@@ -28,7 +28,6 @@ import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic;
import org.openecomp.sdc.be.components.impl.ResourceImportManager;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.impl.ServletUtils;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.log.wrappers.Logger;
/**
@@ -48,9 +47,9 @@ public class ServiceUploadServlet extends AbstractValidationsServlet {
public static final String USER_TYPE_SERVICE_UI_IMPORT = "user-servcie-ui-import";
private static final Logger log = Logger.getLogger(ServiceUploadServlet.class);
- public ServiceUploadServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL,
+ public ServiceUploadServlet(ComponentInstanceBusinessLogic componentInstanceBL,
ComponentsUtils componentsUtils, ServletUtils servletUtils, ResourceImportManager resourceImportManager) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
}
public enum ServiceAuthorityTypeEnum {
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TogglingServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TogglingServlet.java
index bc5036f1ac..15fa90b8b5 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TogglingServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TogglingServlet.java
@@ -48,7 +48,6 @@ import org.openecomp.sdc.be.components.impl.TogglingBusinessLogic;
import org.openecomp.sdc.be.dao.api.ActionStatus;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.impl.ServletUtils;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.log.wrappers.Logger;
@Loggable(prepend = true, value = Loggable.DEBUG, trim = false)
@@ -65,9 +64,9 @@ public class TogglingServlet extends AbstractValidationsServlet {
private final TogglingBusinessLogic togglingBusinessLogic;
@Inject
- public TogglingServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL, ComponentsUtils componentsUtils,
+ public TogglingServlet(ComponentInstanceBusinessLogic componentInstanceBL, ComponentsUtils componentsUtils,
ServletUtils servletUtils, ResourceImportManager resourceImportManager, TogglingBusinessLogic togglingBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.togglingBusinessLogic = togglingBusinessLogic;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesFetchServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesFetchServlet.java
index df7fcd5e17..254bb8c92b 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesFetchServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesFetchServlet.java
@@ -73,7 +73,6 @@ import org.openecomp.sdc.be.model.DataTypeDefinition;
import org.openecomp.sdc.be.model.InterfaceDefinition;
import org.openecomp.sdc.be.model.RelationshipTypeDefinition;
import org.openecomp.sdc.be.model.User;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.datastructure.Wrapper;
import org.openecomp.sdc.common.log.enums.EcompLoggerErrorCode;
@@ -100,7 +99,6 @@ public class TypesFetchServlet extends AbstractValidationsServlet {
@Inject
public TypesFetchServlet(
- UserBusinessLogic userBusinessLogic,
ComponentInstanceBusinessLogic componentInstanceBL,
ComponentsUtils componentsUtils,
ServletUtils servletUtils,
@@ -113,7 +111,6 @@ public class TypesFetchServlet extends AbstractValidationsServlet {
ArtifactsBusinessLogic artifactsBusinessLogic
) {
super(
- userBusinessLogic,
componentInstanceBL,
componentsUtils,
servletUtils,
@@ -219,7 +216,8 @@ public class TypesFetchServlet extends AbstractValidationsServlet {
if (responseWrapper.isEmpty()) {
String url = request.getMethod() + " " + request.getRequestURI();
log.debug("Start handle request of {} | modifier id is {}", url, userId);
- Either<Map<String, CapabilityTypeDefinition>, ResponseFormat> allDataTypes = capabilitiesBusinessLogic.getAllCapabilityTypes(modelName);
+ Either<Map<String, CapabilityTypeDefinition>, ResponseFormat> allDataTypes = capabilitiesBusinessLogic.getAllCapabilityTypes(
+ modelName);
if (allDataTypes.isRight()) {
log.info("Failed to get all capability types. Reason - {}", allDataTypes.right().value());
Response errorResponse = buildErrorResponse(allDataTypes.right().value());
@@ -375,7 +373,7 @@ public class TypesFetchServlet extends AbstractValidationsServlet {
}
componentList = actionResponse.left().value();
return Either.left(ListUtils.emptyIfNull(componentList).stream().filter(component ->
- ((ResourceMetadataDataDefinition) component.getComponentMetadataDefinition().getMetadataDataDefinition()).getToscaResourceName() != null)
+ ((ResourceMetadataDataDefinition) component.getComponentMetadataDefinition().getMetadataDataDefinition()).getToscaResourceName() != null)
.collect(Collectors.toMap(
component -> ((ResourceMetadataDataDefinition) component.getComponentMetadataDefinition().getMetadataDataDefinition())
.getToscaResourceName(), component -> component, (component1, component2) -> component1)));
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadEndpoint.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadEndpoint.java
index 1a8f40927d..e25783204e 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadEndpoint.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadEndpoint.java
@@ -51,7 +51,6 @@ import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.model.AnnotationTypeDefinition;
import org.openecomp.sdc.be.model.operations.impl.AnnotationTypeOperations;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.be.utils.TypeUtils;
import org.openecomp.sdc.common.datastructure.Wrapper;
import org.openecomp.sdc.common.zip.exception.ZipException;
@@ -77,9 +76,9 @@ public class TypesUploadEndpoint extends BeGenericServlet {
private final AnnotationTypeOperations annotationTypeOperations;
private final AccessValidations accessValidations;
- public TypesUploadEndpoint(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils, CommonImportManager commonImportManager,
+ public TypesUploadEndpoint(ComponentsUtils componentsUtils, CommonImportManager commonImportManager,
AnnotationTypeOperations annotationTypeOperations, AccessValidations accessValidations) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.commonImportManager = commonImportManager;
this.annotationTypeOperations = annotationTypeOperations;
this.accessValidations = accessValidations;
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadServlet.java
index fbd480169a..f07a742ab5 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadServlet.java
@@ -74,7 +74,6 @@ import org.openecomp.sdc.be.model.PolicyTypeDefinition;
import org.openecomp.sdc.be.model.RelationshipTypeDefinition;
import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.model.normatives.ToscaTypeMetadata;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.datastructure.FunctionalInterfaces.ConsumerFourParam;
import org.openecomp.sdc.common.datastructure.FunctionalInterfaces.ConsumerTwoParam;
@@ -106,14 +105,14 @@ public class TypesUploadServlet extends AbstractValidationsServlet {
private final ArtifactTypeImportManager artifactTypeImportManager;
@Inject
- public TypesUploadServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL,
+ public TypesUploadServlet(ComponentInstanceBusinessLogic componentInstanceBL,
ComponentsUtils componentsUtils, ServletUtils servletUtils, ResourceImportManager resourceImportManager,
CapabilityTypeImportManager capabilityTypeImportManager,
InterfaceLifecycleTypeImportManager interfaceLifecycleTypeImportManager,
CategoriesImportManager categoriesImportManager, DataTypeImportManager dataTypeImportManager,
GroupTypeImportManager groupTypeImportManager, PolicyTypeImportManager policyTypeImportManager,
RelationshipTypeImportManager relationshipTypeImportManager, ArtifactTypeImportManager artifactTypeImportManager) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.capabilityTypeImportManager = capabilityTypeImportManager;
this.interfaceLifecycleTypeImportManager = interfaceLifecycleTypeImportManager;
this.categoriesImportManager = categoriesImportManager;
@@ -190,13 +189,14 @@ public class TypesUploadServlet extends AbstractValidationsServlet {
@ApiResponse(responseCode = "409", description = "Tosca Artifact Type already exist")})
@PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE)
public Response uploadArtifactTypes(@Parameter(description = "Zip file containing a yaml with the TOSCA artifact types definition")
- @FormDataParam("artifactsZip") File file,
+ @FormDataParam("artifactsZip") File file,
@Parameter(description = "model name") @FormDataParam("model") String modelName,
@Context final HttpServletRequest request, @HeaderParam("USER_ID") String creator,
@Parameter(description = "A flag to add types to the default imports")
- @FormDataParam("includeToModelImport") boolean includeToModelDefaultImports) {
+ @FormDataParam("includeToModelImport") boolean includeToModelDefaultImports) {
final ConsumerTwoParam<Wrapper<Response>, String> createElementsMethod = (responseWrapper, ymlPayload) ->
- createElementsType(responseWrapper, () -> artifactTypeImportManager.createArtifactTypes(ymlPayload, modelName, includeToModelDefaultImports));
+ createElementsType(responseWrapper,
+ () -> artifactTypeImportManager.createArtifactTypes(ymlPayload, modelName, includeToModelDefaultImports));
return uploadElementTypeServletLogic(createElementsMethod, file, request, creator, NodeTypeEnum.ArtifactType.getName());
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/UserAdminServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/UserAdminServlet.java
index 75809119f0..63fca17288 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/UserAdminServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/UserAdminServlet.java
@@ -70,7 +70,7 @@ public class UserAdminServlet extends BeGenericServlet {
private final UserBusinessLogicExt userBusinessLogicExt;
UserAdminServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils, UserBusinessLogicExt userBusinessLogicExt) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.userBusinessLogic = userBusinessLogic;
this.userBusinessLogicExt = userBusinessLogicExt;
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java
index faaa7e3162..f6656693d9 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java
@@ -134,7 +134,7 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest
private final ArtifactDefinition artifactDefinition = mock(ArtifactDefinition.class);
private final ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
private final ServletUtils servletUtils = mock(ServletUtils.class);
- private final AbstractValidationsServlet servlet = new ArtifactExternalServlet(userBusinessLogic,
+ private final AbstractValidationsServlet servlet = new ArtifactExternalServlet(
componentInstanceBusinessLogic, componentsUtils, servletUtils, resourceImportManager, artifactsBusinessLogic);
private final ApplicationDataTypeCache applicationDataTypeCache = mock(ApplicationDataTypeCache.class);
private final ArtifactTypeOperation artifactTypeOperation = mock(ArtifactTypeOperation.class);
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AbstractTemplateServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AbstractTemplateServletTest.java
index 40dd38ad84..87cb31f39b 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AbstractTemplateServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AbstractTemplateServletTest.java
@@ -244,7 +244,6 @@ class AbstractTemplateServletTest extends JerseyTest {
private CrudExternalServlet createMockServlet() {
return new CrudExternalServlet(
- userBusinessLogic,
componentInstanceBusinessLogic,
componentsUtils,
servletUtils,
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServletTest.java
index a2673ea363..d11022a886 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServletTest.java
@@ -222,7 +222,7 @@ class AssetsDataServletTest extends JerseyTest {
ApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);
forceSet(TestProperties.CONTAINER_PORT, "0");
return new ResourceConfig()
- .register(new CrudExternalServlet(userBusinessLogic, componentInstanceBusinessLogic, componentsUtils,
+ .register(new CrudExternalServlet(componentInstanceBusinessLogic, componentsUtils,
servletUtils, resourceImportManager, elementBusinessLogic, assetMetadataConverter,
lifecycleBusinessLogic, resourceBusinessLogic, serviceBusinessLogic))
.register(new AbstractBinder() {
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefsServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefsServletTest.java
index 6264e349a1..b912891157 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefsServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefsServletTest.java
@@ -624,7 +624,7 @@ class ExternalRefsServletTest extends JerseyTest {
@Bean
ExternalRefsServlet externalRefsServlet() {
- return new ExternalRefsServlet(userAdmin, componentUtils, externalRefsBusinessLogic());
+ return new ExternalRefsServlet(componentUtils, externalRefsBusinessLogic());
}
@Bean
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AbstractValidationsServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AbstractValidationsServletTest.java
index ecc89af3f8..5e9bf0ebb4 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AbstractValidationsServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AbstractValidationsServletTest.java
@@ -55,8 +55,8 @@ public class AbstractValidationsServletTest {
private static ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
private static ArtifactsBusinessLogic artifactsBusinessLogic = mock(ArtifactsBusinessLogic.class);
- private static AbstractValidationsServlet servlet = new ArtifactExternalServlet(userBusinessLogic,
- componentInstanceBL, componentsUtils, servletUtils, resourceImportManager, artifactsBusinessLogic);
+ private static AbstractValidationsServlet servlet = new ArtifactExternalServlet(
+ componentInstanceBL, componentsUtils, servletUtils, resourceImportManager, artifactsBusinessLogic);
private static final String BASIC_TOSCA_TEMPLATE = "tosca_definitions_version: tosca_simple_yaml_%s";
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AdditionalInformationServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AdditionalInformationServletTest.java
index edc01e8800..c34fe7411c 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AdditionalInformationServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AdditionalInformationServletTest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,178 +20,176 @@
package org.openecomp.sdc.be.servlets;
+import static org.mockito.Mockito.mock;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
import org.junit.Test;
import org.openecomp.sdc.be.components.impl.AdditionalInformationBusinessLogic;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.user.UserBusinessLogic;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Response;
-import static org.mockito.Mockito.mock;
+public class AdditionalInformationServletTest {
+ private AdditionalInformationServlet createTestSubject() {
+ UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
+ ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
+ AdditionalInformationBusinessLogic additionalInformationBusinessLogic =
+ mock(AdditionalInformationBusinessLogic.class);
+ return new AdditionalInformationServlet(componentsUtils,
+ additionalInformationBusinessLogic);
+ }
-public class AdditionalInformationServletTest {
- private AdditionalInformationServlet createTestSubject() {
- UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
- ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- AdditionalInformationBusinessLogic additionalInformationBusinessLogic =
- mock(AdditionalInformationBusinessLogic.class);
- return new AdditionalInformationServlet(userBusinessLogic, componentsUtils,
- additionalInformationBusinessLogic);
- }
-
-
- @Test
- public void testCreateResourceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String resourceId = "";
- String data = "";
- HttpServletRequest request = null;
- String userUserId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testCreateServiceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String serviceId = "";
- String data = "";
- HttpServletRequest request = null;
- String userUserId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateResourceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String resourceId = "";
- String labelId = "";
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateServiceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String serviceId = "";
- String labelId = "";
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateResourceAdditionalInformationLabel_1() throws Exception {
- AdditionalInformationServlet testSubject;
- String resourceId = "";
- String labelId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteServiceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String serviceId = "";
- String labelId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetResourceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String resourceId = "";
- String labelId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetServiceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String serviceId = "";
- String labelId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetAllResourceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String resourceId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetAllServiceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String serviceId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
+ @Test
+ public void testCreateResourceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String resourceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userUserId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testCreateServiceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String serviceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userUserId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateResourceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String resourceId = "";
+ String labelId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateServiceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String serviceId = "";
+ String labelId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateResourceAdditionalInformationLabel_1() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String resourceId = "";
+ String labelId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteServiceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String serviceId = "";
+ String labelId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetResourceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String resourceId = "";
+ String labelId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetServiceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String serviceId = "";
+ String labelId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetAllResourceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String resourceId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetAllServiceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String serviceId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArchiveEndpointTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArchiveEndpointTest.java
index 2b870baf62..40461830c6 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArchiveEndpointTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArchiveEndpointTest.java
@@ -151,7 +151,7 @@ class ArchiveEndpointTest extends JerseyTest {
@Bean
ArchiveEndpoint archiveEndpoint() {
- return new ArchiveEndpoint(userAdmin, componentUtils, archiveBusinessLogic());
+ return new ArchiveEndpoint(componentUtils, archiveBusinessLogic());
}
@Bean
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArtifactServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArtifactServletTest.java
index efa5b51041..5536b5ee21 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArtifactServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArtifactServletTest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,346 +20,344 @@
package org.openecomp.sdc.be.servlets;
+import static org.mockito.Mockito.mock;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
import org.junit.Test;
import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.user.UserBusinessLogic;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Response;
-import static org.mockito.Mockito.mock;
+public class ArtifactServletTest {
+ private ArtifactServlet createTestSubject() {
+ UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
+ ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
+ ArtifactsBusinessLogic artifactsBusinessLogic = mock(ArtifactsBusinessLogic.class);
+ return new ArtifactServlet(componentsUtils, artifactsBusinessLogic);
+ }
-public class ArtifactServletTest {
- private ArtifactServlet createTestSubject() {
- UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
- ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- ArtifactsBusinessLogic artifactsBusinessLogic = mock(ArtifactsBusinessLogic.class);
- return new ArtifactServlet(userBusinessLogic, componentsUtils,artifactsBusinessLogic);
- }
-
-
- @Test
- public void testLoadArtifact() throws Exception {
- ArtifactServlet testSubject;
- String resourceId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateArtifact() throws Exception {
- ArtifactServlet testSubject;
- String resourceId = "";
- String artifactId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteArtifact() throws Exception {
- ArtifactServlet testSubject;
- String resourceId = "";
- String artifactId = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testLoadInformationArtifact() throws Exception {
- ArtifactServlet testSubject;
- String serviceId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateInformationArtifact() throws Exception {
- ArtifactServlet testSubject;
- String serviceId = "";
- String artifactId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateApiArtifact() throws Exception {
- ArtifactServlet testSubject;
- String serviceId = "";
- String artifactId = "";
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- String origMd5 = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteApiArtifact() throws Exception {
- ArtifactServlet testSubject;
- String serviceId = "";
- String artifactId = "";
- HttpServletRequest request = null;
- String userId = "";
- String origMd5 = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteInformationalArtifact() throws Exception {
- ArtifactServlet testSubject;
- String serviceId = "";
- String artifactId = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDownloadServiceArtifactBase64() throws Exception {
- ArtifactServlet testSubject;
- String serviceId = "";
- String artifactId = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDownloadResourceArtifactBase64() throws Exception {
- ArtifactServlet testSubject;
- String resourceId = "";
- String artifactId = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDownloadResourceInstanceArtifactBase64() throws Exception {
- ArtifactServlet testSubject;
- String containerComponentType = "";
- String componentId = "";
- String componentInstanceId = "";
- String artifactId = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testLoadArtifactToInterface() throws Exception {
- ArtifactServlet testSubject;
- String resourceId = "";
- String interfaceType = "";
- String operation = "";
- String userId = "";
- String origMd5 = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteArtifactToInterface() throws Exception {
- ArtifactServlet testSubject;
- String resourceId = "";
- String interfaceType = "";
- String operation = "";
- String artifactId = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateArtifactToInterface() throws Exception {
- ArtifactServlet testSubject;
- String resourceId = "";
- String interfaceType = "";
- String operation = "";
- String artifactId = "";
- String userId = "";
- String origMd5 = "";
- HttpServletRequest request = null;
- String data = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateRIArtifact() throws Exception {
- ArtifactServlet testSubject;
- String containerComponentType = "";
- String componentId = "";
- String componentInstanceId = "";
- String artifactId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateComponentInstanceArtifact() throws Exception {
- ArtifactServlet testSubject;
- String userId = "";
- String origMd5 = "";
- String containerComponentType = "";
- String componentId = "";
- String componentInstanceId = "";
- String artifactId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testLoadComponentInstanceArtifact() throws Exception {
- ArtifactServlet testSubject;
- String userId = "";
- String origMd5 = "";
- String containerComponentType = "";
- String componentId = "";
- String componentInstanceId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteComponentInstanceArtifact() throws Exception {
- ArtifactServlet testSubject;
- String userId = "";
- String origMd5 = "";
- String containerComponentType = "";
- String componentId = "";
- String componentInstanceId = "";
- String artifactId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetComponentArtifacts() throws Exception {
- ArtifactServlet testSubject;
- String containerComponentType = "";
- String componentId = "";
- String artifactGroupType = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetComponentInstanceArtifacts() throws Exception {
- ArtifactServlet testSubject;
- String containerComponentType = "";
- String componentId = "";
- String componentInstanceId = "";
- String artifactGroupType = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
+ @Test
+ public void testLoadArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testLoadInformationArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateInformationArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateApiArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ String origMd5 = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteApiArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ String origMd5 = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteInformationalArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDownloadServiceArtifactBase64() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDownloadResourceArtifactBase64() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDownloadResourceInstanceArtifactBase64() throws Exception {
+ ArtifactServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testLoadArtifactToInterface() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String interfaceType = "";
+ String operation = "";
+ String userId = "";
+ String origMd5 = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteArtifactToInterface() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String interfaceType = "";
+ String operation = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateArtifactToInterface() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String interfaceType = "";
+ String operation = "";
+ String artifactId = "";
+ String userId = "";
+ String origMd5 = "";
+ HttpServletRequest request = null;
+ String data = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateRIArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateComponentInstanceArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String userId = "";
+ String origMd5 = "";
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testLoadComponentInstanceArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String userId = "";
+ String origMd5 = "";
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteComponentInstanceArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String userId = "";
+ String origMd5 = "";
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetComponentArtifacts() throws Exception {
+ ArtifactServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String artifactGroupType = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetComponentInstanceArtifacts() throws Exception {
+ ArtifactServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String artifactGroupType = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AttributeServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AttributeServletTest.java
index 6184fa8d7e..c8a4a0209c 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AttributeServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AttributeServletTest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,11 @@
package org.openecomp.sdc.be.servlets;
+import static org.mockito.Mockito.mock;
+
import com.google.common.base.Equivalence.Wrapper;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
import org.junit.Test;
import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic;
import org.openecomp.sdc.be.components.impl.ResourceImportManager;
@@ -30,75 +34,70 @@ import org.openecomp.sdc.be.model.PropertyDefinition;
import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.exception.ResponseFormat;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Response;
+public class AttributeServletTest {
-import static org.mockito.Mockito.mock;
+ private AttributeServlet createTestSubject() {
+ UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
+ ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
+ ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
+ ServletUtils servletUtils = mock(ServletUtils.class);
+ ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
-public class AttributeServletTest {
+ return new AttributeServlet(componentInstanceBL, componentsUtils, servletUtils,
+ resourceImportManager);
+ }
+
+
+ @Test
+ public void testCreateAttribute() throws Exception {
+ AttributeServlet testSubject;
+ String resourceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUpdateAttribute() throws Exception {
+ AttributeServlet testSubject;
+ String resourceId = "";
+ String attributeId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteAttribute() throws Exception {
+ AttributeServlet testSubject;
+ String resourceId = "";
+ String attributeId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testBuildAttributeFromString() throws Exception {
+ AttributeServlet testSubject;
+ String data = "";
+ Wrapper<PropertyDefinition> attributesWrapper = null;
+ Wrapper<ResponseFormat> errorWrapper = null;
- private AttributeServlet createTestSubject() {
- UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
- ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
- ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- ServletUtils servletUtils = mock(ServletUtils.class);
- ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
-
- return new AttributeServlet(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils,
- resourceImportManager);
- }
-
-
- @Test
- public void testCreateAttribute() throws Exception {
- AttributeServlet testSubject;
- String resourceId = "";
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
- }
-
-
- @Test
- public void testUpdateAttribute() throws Exception {
- AttributeServlet testSubject;
- String resourceId = "";
- String attributeId = "";
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
- }
-
-
- @Test
- public void testDeleteAttribute() throws Exception {
- AttributeServlet testSubject;
- String resourceId = "";
- String attributeId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
- }
-
-
- @Test
- public void testBuildAttributeFromString() throws Exception {
- AttributeServlet testSubject;String data = "";
- Wrapper<PropertyDefinition> attributesWrapper = null;
- Wrapper<ResponseFormat> errorWrapper = null;
-
-
- // default test
- }
+ // default test
+ }
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AutomatedUpgradeEndpointTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AutomatedUpgradeEndpointTest.java
index 6149d8de7d..ba106798ed 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AutomatedUpgradeEndpointTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AutomatedUpgradeEndpointTest.java
@@ -124,7 +124,7 @@ class AutomatedUpgradeEndpointTest extends JerseySpringBaseTest {
UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- return new AutomatedUpgradeEndpoint(userBusinessLogic, componentsUtils,
+ return new AutomatedUpgradeEndpoint(componentsUtils,
upgradeBusinessLogic());
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/CapabilityServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/CapabilityServletTest.java
index cda5145ee7..8c025c7e03 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/CapabilityServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/CapabilityServletTest.java
@@ -221,7 +221,7 @@ class CapabilityServletTest extends JerseyTest {
}
private void createTestObject() {
- capabilityServlet = new CapabilityServlet(userBusinessLogic, componentInstanceBusinessLogic,
+ capabilityServlet = new CapabilityServlet(componentInstanceBusinessLogic,
componentsUtils, servletUtils, resourceImportManager, capabilitiesBusinessLogic);
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentServletTest.java
index 2b0ffe91a9..82a5c833d3 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentServletTest.java
@@ -75,7 +75,7 @@ class ComponentServletTest extends JerseySpringBaseTest {
resourceBusinessLogic = mock(ResourceBusinessLogic.class);
UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- ComponentServlet componentServlet = new ComponentServlet(userBusinessLogic, componentsUtils,
+ ComponentServlet componentServlet = new ComponentServlet(componentsUtils,
new ComponentBusinessLogicProvider(resourceBusinessLogic, null, null));
return super.configure().register(componentServlet);
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/DistributionServiceServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/DistributionServiceServletTest.java
index 7a89a6bee5..7c6c8c10f0 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/DistributionServiceServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/DistributionServiceServletTest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,71 +20,70 @@
package org.openecomp.sdc.be.servlets;
+import static org.mockito.Mockito.mock;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
import org.junit.Test;
import org.openecomp.sdc.be.components.impl.DistributionMonitoringBusinessLogic;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.user.UserBusinessLogic;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Response;
+public class DistributionServiceServletTest {
-import static org.mockito.Mockito.mock;
+ private DistributionServiceServlet createTestSubject() {
+ UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
+ ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
+ DistributionMonitoringBusinessLogic distributionMonitoringLogic = mock(DistributionMonitoringBusinessLogic.class);
+ return new DistributionServiceServlet(componentsUtils,
+ distributionMonitoringLogic);
+ }
-public class DistributionServiceServletTest {
- private DistributionServiceServlet createTestSubject() {
- UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
- ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- DistributionMonitoringBusinessLogic distributionMonitoringLogic = mock(DistributionMonitoringBusinessLogic.class);
- return new DistributionServiceServlet(userBusinessLogic, componentsUtils,
- distributionMonitoringLogic);
- }
-
-
- @Test
- public void testGetServiceById() throws Exception {
- DistributionServiceServlet testSubject;
- String serviceUUID = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
- }
-
-
- @Test
- public void testGetListOfDistributionStatuses() throws Exception {
- DistributionServiceServlet testSubject;
- String did = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
- }
-
-
- @Test
- public void testInit() throws Exception {
- DistributionServiceServlet testSubject;
- HttpServletRequest request = null;
-
- // default test
- testSubject = createTestSubject();
- }
-
-
- @Test
- public void testGetDistributionBL() throws Exception {
- DistributionServiceServlet testSubject;
- ServletContext context = null;
- DistributionMonitoringBusinessLogic result;
-
- // default test
- testSubject = createTestSubject();
- }
+ @Test
+ public void testGetServiceById() throws Exception {
+ DistributionServiceServlet testSubject;
+ String serviceUUID = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetListOfDistributionStatuses() throws Exception {
+ DistributionServiceServlet testSubject;
+ String did = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testInit() throws Exception {
+ DistributionServiceServlet testSubject;
+ HttpServletRequest request = null;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetDistributionBL() throws Exception {
+ DistributionServiceServlet testSubject;
+ ServletContext context = null;
+ DistributionMonitoringBusinessLogic result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupEndpointTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupEndpointTest.java
index 8b58702c08..1ba22695a9 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupEndpointTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupEndpointTest.java
@@ -54,7 +54,6 @@ import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.openecomp.sdc.be.components.impl.GroupBusinessLogicNew;
import org.openecomp.sdc.be.components.validation.AccessValidations;
@@ -112,7 +111,7 @@ class GroupEndpointTest extends JerseySpringBaseTest {
UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- return new GroupEndpoint(userBusinessLogic, componentsUtils, groupBusinessLogic());
+ return new GroupEndpoint(componentsUtils, groupBusinessLogic());
}
@Bean
@@ -198,9 +197,9 @@ class GroupEndpointTest extends JerseySpringBaseTest {
when(groupsOperation
.updateGroupPropertiesOnComponent(eq(VALID_COMPONENT_ID), isA(GroupDefinition.class), anyList(),
any(PromoteVersionEnum.class))).thenAnswer((Answer<Either>) invocationOnMock -> {
- Object[] args = invocationOnMock.getArguments();
- return Either.left(Collections.singletonList(args[2]));
- });
+ Object[] args = invocationOnMock.getArguments();
+ return Either.left(Collections.singletonList(args[2]));
+ });
}
@Test
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupServletTest.java
index ddd5a2098d..e50025658a 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupServletTest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,6 +20,10 @@
package org.openecomp.sdc.be.servlets;
+import static org.mockito.Mockito.mock;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
import org.junit.Test;
import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic;
import org.openecomp.sdc.be.components.impl.GroupBusinessLogic;
@@ -28,51 +32,46 @@ import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.impl.ServletUtils;
import org.openecomp.sdc.be.user.UserBusinessLogic;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Response;
+public class GroupServletTest {
-import static org.mockito.Mockito.mock;
+ private GroupServlet createTestSubject() {
+ UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
+ GroupBusinessLogic groupBL = mock(GroupBusinessLogic.class);
+ ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
+ ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
+ ServletUtils servletUtils = mock(ServletUtils.class);
+ ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
+ return new GroupServlet(groupBL, componentInstanceBL, componentsUtils, servletUtils,
+ resourceImportManager);
+ }
-public class GroupServletTest {
- private GroupServlet createTestSubject() {
- UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
- GroupBusinessLogic groupBL = mock(GroupBusinessLogic.class);
- ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
- ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- ServletUtils servletUtils = mock(ServletUtils.class);
- ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
- return new GroupServlet(userBusinessLogic, groupBL, componentInstanceBL, componentsUtils, servletUtils,
- resourceImportManager);
- }
+ @Test
+ public void testGetGroupArtifactById() throws Exception {
+ GroupServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String groupId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
-
- @Test
- public void testGetGroupArtifactById() throws Exception {
- GroupServlet testSubject;
- String containerComponentType = "";
- String componentId = "";
- String groupId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
+ // default test
+ }
- // default test
- }
-
- @Test
- public void testUpdateGroupMetadata() throws Exception {
- GroupServlet testSubject;
- String containerComponentType = "";
- String componentId = "";
- String groupUniqueId = "";
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
+ @Test
+ public void testUpdateGroupMetadata() throws Exception {
+ GroupServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String groupUniqueId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
- // default test
- testSubject = createTestSubject();
- }
+ // default test
+ testSubject = createTestSubject();
+ }
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupTypesEndpointTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupTypesEndpointTest.java
index a03f8d42c9..e4407cdcc4 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupTypesEndpointTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupTypesEndpointTest.java
@@ -103,7 +103,7 @@ class GroupTypesEndpointTest extends JerseySpringBaseTest {
GroupTypesEndpoint groupTypesEndpoint() {
UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- return new GroupTypesEndpoint(userBusinessLogic, componentsUtils, groupTypeBusinessLogic());
+ return new GroupTypesEndpoint(componentsUtils, groupTypeBusinessLogic());
}
@Bean
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/InputsServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/InputsServletTest.java
index bd20471544..a86d4ca5f5 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/InputsServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/InputsServletTest.java
@@ -174,7 +174,7 @@ class InputsServletTest extends JerseyTest {
@Override
protected Application configure() {
- InputsServlet inputsServlet = new InputsServlet(userBusinessLogic, inputsBusinessLogic,
+ InputsServlet inputsServlet = new InputsServlet(inputsBusinessLogic,
componentInstanceBL, componentsUtils,
servletUtils, resourceImportManager, dataTypeBusinessLogic);
forceSet(TestProperties.CONTAINER_PORT, "0");
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/OutputsServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/OutputsServletTest.java
index 6b0cf70ecb..c678068d51 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/OutputsServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/OutputsServletTest.java
@@ -240,7 +240,7 @@ class OutputsServletTest extends JerseyTest {
}
private OutputsServlet createTestObject() {
- return new OutputsServlet(userBusinessLogic, outputsBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ return new OutputsServlet(outputsBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
}
@Override
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PolicyServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PolicyServletTest.java
index 469a73de58..c0d858a4e7 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PolicyServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PolicyServletTest.java
@@ -280,7 +280,8 @@ class PolicyServletTest extends JerseySpringBaseTest {
assertThat(response.getStatus()).isEqualTo(Response.Status.FORBIDDEN.getStatusCode());
}
- @Test//(expected = ComponentException.class)
+ @Test
+//(expected = ComponentException.class)
void getPolicyProperties_unHandledError_returnGeneralError() {
when(businessLogic.getPolicyProperties(ComponentTypeEnum.SERVICE, SERVICE_ID, POLICY_ID, USER_ID))
.thenThrow(new RuntimeException());
@@ -515,7 +516,7 @@ class PolicyServletTest extends JerseySpringBaseTest {
protected ResourceConfig configure() {
forceSet(TestProperties.CONTAINER_PORT, "0");
return super.configure()
- .register(new PolicyServlet(null, null, componentsUtils,
+ .register(new PolicyServlet(null, componentsUtils,
servletUtils, null, businessLogic));
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PolicyTypesEndpointTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PolicyTypesEndpointTest.java
index 89d10322ed..5e888e6b69 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PolicyTypesEndpointTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PolicyTypesEndpointTest.java
@@ -69,7 +69,7 @@ class PolicyTypesEndpointTest extends JerseySpringBaseTest {
UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
return super.configure()
- .register(new PolicyTypesEndpoint(userBusinessLogic, componentsUtils, policyTypeBusinessLogic));
+ .register(new PolicyTypesEndpoint(componentsUtils, policyTypeBusinessLogic));
}
@Test
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourcesServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourcesServletTest.java
index 239e7232af..8f4f43fe3f 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourcesServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourcesServletTest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,8 +20,14 @@
package org.openecomp.sdc.be.servlets;
+import static org.mockito.Mockito.mock;
+
import com.google.common.base.Equivalence.Wrapper;
import fj.data.Either;
+import java.util.List;
+import java.util.Map;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
import org.junit.Test;
import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic;
import org.openecomp.sdc.be.components.impl.ResourceBusinessLogic;
@@ -34,240 +40,233 @@ import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.exception.ResponseFormat;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Response;
-import java.util.List;
-import java.util.Map;
+public class ResourcesServletTest {
-import static org.mockito.Mockito.mock;
+ private ResourcesServlet createTestSubject() {
+ UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
+ ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
+ ResourceBusinessLogic resourceBusinessLogic = mock(ResourceBusinessLogic.class);
+ ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
+ ServletUtils servletUtils = mock(ServletUtils.class);
+ ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
-public class ResourcesServletTest {
+ return new ResourcesServlet(componentInstanceBL, resourceBusinessLogic, componentsUtils, servletUtils,
+ resourceImportManager);
+ }
+
+
+ @Test
+ public void testCreateResource() throws Exception {
+ ResourcesServlet testSubject;
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testIsUIImport() throws Exception {
+ ResourcesServlet testSubject;
+ String data = "";
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testPerformUIImport() throws Exception {
+ ResourcesServlet testSubject;
+ Wrapper<Response> responseWrapper = null;
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ String resourceUniqueId = "";
+
+ // default test
+ }
+
+
+ @Test
+ public void testParseToResource() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceJson = "";
+ User user = null;
+ Either<Resource, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testParseToLightResource() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceJson = "";
+ User user = null;
+ Either<Resource, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteResource() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteResourceByNameAndVersion() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceName = "";
+ String version = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetResourceById() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetResourceByNameAndVersion() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceName = "";
+ String resourceVersion = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateResourceName() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceName = "";
+ String resourceType = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetCertifiedAbstractResources() throws Exception {
+ ResourcesServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetCertifiedNotAbstractResources() throws Exception {
+ ResourcesServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateResourceMetadata() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateResource() throws Exception {
+ ResourcesServlet testSubject;
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ String resourceId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testConvertMapToList() throws Exception {
+ Map<String, PropertyDefinition> properties = null;
+ List<PropertyDefinition> result;
+
+ // test 1
+ properties = null;
+
+ }
+
+
+ @Test
+ public void testGetResourceFromCsar() throws Exception {
+ ResourcesServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ String csarUUID = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
- private ResourcesServlet createTestSubject() {
- UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
- ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
- ResourceBusinessLogic resourceBusinessLogic = mock(ResourceBusinessLogic.class);
- ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- ServletUtils servletUtils = mock(ServletUtils.class);
- ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
-
- return new ResourcesServlet(userBusinessLogic, componentInstanceBL, resourceBusinessLogic, componentsUtils, servletUtils,
- resourceImportManager);
- }
-
-
- @Test
- public void testCreateResource() throws Exception {
- ResourcesServlet testSubject;
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testIsUIImport() throws Exception {
- ResourcesServlet testSubject;
- String data = "";
- boolean result;
-
- // default test
- testSubject = createTestSubject();
- }
-
-
- @Test
- public void testPerformUIImport() throws Exception {
- ResourcesServlet testSubject;Wrapper<Response> responseWrapper = null;
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- String resourceUniqueId = "";
-
-
- // default test
- }
-
-
- @Test
- public void testParseToResource() throws Exception {
- ResourcesServlet testSubject;
- String resourceJson = "";
- User user = null;
- Either<Resource, ResponseFormat> result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testParseToLightResource() throws Exception {
- ResourcesServlet testSubject;
- String resourceJson = "";
- User user = null;
- Either<Resource, ResponseFormat> result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteResource() throws Exception {
- ResourcesServlet testSubject;
- String resourceId = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteResourceByNameAndVersion() throws Exception {
- ResourcesServlet testSubject;
- String resourceName = "";
- String version = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetResourceById() throws Exception {
- ResourcesServlet testSubject;
- String resourceId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetResourceByNameAndVersion() throws Exception {
- ResourcesServlet testSubject;
- String resourceName = "";
- String resourceVersion = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testValidateResourceName() throws Exception {
- ResourcesServlet testSubject;
- String resourceName = "";
- String resourceType = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetCertifiedAbstractResources() throws Exception {
- ResourcesServlet testSubject;
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetCertifiedNotAbstractResources() throws Exception {
- ResourcesServlet testSubject;
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateResourceMetadata() throws Exception {
- ResourcesServlet testSubject;
- String resourceId = "";
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateResource() throws Exception {
- ResourcesServlet testSubject;
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- String resourceId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testConvertMapToList() throws Exception {
- Map<String, PropertyDefinition> properties = null;
- List<PropertyDefinition> result;
-
- // test 1
- properties = null;
-
- }
-
-
- @Test
- public void testGetResourceFromCsar() throws Exception {
- ResourcesServlet testSubject;
- HttpServletRequest request = null;
- String userId = "";
- String csarUUID = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
+ }
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadEndpointTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadEndpointTest.java
index 72af772507..039207437b 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadEndpointTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadEndpointTest.java
@@ -242,7 +242,7 @@ class TypesUploadEndpointTest extends JerseySpringBaseTest {
TypesUploadEndpoint typesUploadEndpoint() {
UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- return new TypesUploadEndpoint(userBusinessLogic, componentsUtils, commonImportManager(),
+ return new TypesUploadEndpoint(componentsUtils, commonImportManager(),
annotationTypeOperations(), accessValidations);
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadServletTest.java
index ed9b9a4eff..9cc03dc9db 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadServletTest.java
@@ -516,7 +516,7 @@ class TypesUploadServletTest extends JerseyTest {
MockitoAnnotations.openMocks(this);
forceSet(TestProperties.CONTAINER_PORT, "0");
- final TypesUploadServlet typesUploadServlet = new TypesUploadServlet(null, null, componentUtils,
+ final TypesUploadServlet typesUploadServlet = new TypesUploadServlet(null, componentUtils,
servletUtils, null, capabilityTypeImportManager, interfaceLifecycleTypeImportManager,
categoriesImportManager, dataTypeImportManager,
groupTypeImportManager, policyTypeImportManager, relationshipTypeImportManager, artifactTypeImportManager);