diff options
author | vasraz <vasyl.razinkov@est.tech> | 2022-10-03 21:36:15 +0100 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2022-10-04 10:03:39 +0000 |
commit | d073b803991a841ee8fef40aa0c3dd3febbd8e56 (patch) | |
tree | 5b1cda71baf99708fbc4909f7848ea39d5dff613 /catalog-be/src/main | |
parent | 425ebb15f5177f99103198aedc158b5691763fd9 (diff) |
Remove unused code
clean up 'UserBusinessLogic userBusinessLogic'
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Change-Id: I868692b617e2efd4001121d8f2495e73f59c77a7
Issue-ID: SDC-4205
Diffstat (limited to 'catalog-be/src/main')
52 files changed, 159 insertions, 212 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; } |