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;
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
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;
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;
}
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;
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;
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;
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;
}
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);
}
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));
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;
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;
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;
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;
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;
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;
}
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;
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;
}
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;
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;
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;
}
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;
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;
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;
}
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;
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;
}
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;
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);
}
/**
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;
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;
}
@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;
}
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;
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;
}
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;
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;
}
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;
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;
}
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;
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;
}
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();
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;
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;
}
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;
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;
}
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;
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;
}
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;
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;
}
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;
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;
}
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));
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;
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;
}
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;
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
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;
private DistributionMonitoringBusinessLogic distributionMonitoringLogic;
@Inject
- public DistributionServiceServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils,
+ public DistributionServiceServlet(ComponentsUtils componentsUtils,
DistributionMonitoringBusinessLogic distributionMonitoringLogic) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.distributionMonitoringLogic = distributionMonitoringLogic;
}
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;
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;
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;
}
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;
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;
}
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;
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;
}
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;
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;
}
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;
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;
}
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;
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;
}
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;
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;
}
*/
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;
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")
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;
}
@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 {
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;
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;
}
@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());
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;
return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR));
}
}
-
+
private ModelTypeEnum getModelTypeEnum(final String modelType) {
final ModelTypeEnum modelTypeEnum = ModelTypeEnum.valueOf(modelType.toUpperCase());
if (modelTypeEnum == null) {
@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);
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;
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;
}
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;
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;
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;
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;
}
@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());
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;
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;
}
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;
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;
}
/**
* 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) {
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;
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;
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")})
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;
}
@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();
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;
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;
}
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;
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;
}
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;
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;
}
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;
/**
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 {
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)
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;
}
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;
@Inject
public TypesFetchServlet(
- UserBusinessLogic userBusinessLogic,
ComponentInstanceBusinessLogic componentInstanceBL,
ComponentsUtils componentsUtils,
ServletUtils servletUtils,
ArtifactsBusinessLogic artifactsBusinessLogic
) {
super(
- userBusinessLogic,
componentInstanceBL,
componentsUtils,
servletUtils,
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());
}
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)));
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;
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;
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;
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;
@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());
}
private final UserBusinessLogicExt userBusinessLogicExt;
UserAdminServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils, UserBusinessLogicExt userBusinessLogicExt) {
- super(userBusinessLogic, componentsUtils);
+ super(componentsUtils);
this.userBusinessLogic = userBusinessLogic;
this.userBusinessLogicExt = userBusinessLogicExt;
}
private final ArtifactDefinition artifactDefinition = mock(ArtifactDefinition.class);
private final ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
private final ServletUtils servletUtils = mock(ServletUtils.class);
- private final AbstractValidationsServlet servlet = new ArtifactExternalServlet(userBusinessLogic,
+ private final AbstractValidationsServlet servlet = new ArtifactExternalServlet(
componentInstanceBusinessLogic, componentsUtils, servletUtils, resourceImportManager, artifactsBusinessLogic);
private final ApplicationDataTypeCache applicationDataTypeCache = mock(ApplicationDataTypeCache.class);
private final ArtifactTypeOperation artifactTypeOperation = mock(ArtifactTypeOperation.class);
private CrudExternalServlet createMockServlet() {
return new CrudExternalServlet(
- userBusinessLogic,
componentInstanceBusinessLogic,
componentsUtils,
servletUtils,
ApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);
forceSet(TestProperties.CONTAINER_PORT, "0");
return new ResourceConfig()
- .register(new CrudExternalServlet(userBusinessLogic, componentInstanceBusinessLogic, componentsUtils,
+ .register(new CrudExternalServlet(componentInstanceBusinessLogic, componentsUtils,
servletUtils, resourceImportManager, elementBusinessLogic, assetMetadataConverter,
lifecycleBusinessLogic, resourceBusinessLogic, serviceBusinessLogic))
.register(new AbstractBinder() {
@Bean
ExternalRefsServlet externalRefsServlet() {
- return new ExternalRefsServlet(userAdmin, componentUtils, externalRefsBusinessLogic());
+ return new ExternalRefsServlet(componentUtils, externalRefsBusinessLogic());
}
@Bean
private static ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
private static ArtifactsBusinessLogic artifactsBusinessLogic = mock(ArtifactsBusinessLogic.class);
- private static AbstractValidationsServlet servlet = new ArtifactExternalServlet(userBusinessLogic,
- componentInstanceBL, componentsUtils, servletUtils, resourceImportManager, artifactsBusinessLogic);
+ private static AbstractValidationsServlet servlet = new ArtifactExternalServlet(
+ componentInstanceBL, componentsUtils, servletUtils, resourceImportManager, artifactsBusinessLogic);
private static final String BASIC_TOSCA_TEMPLATE = "tosca_definitions_version: tosca_simple_yaml_%s";
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
package org.openecomp.sdc.be.servlets;
+import static org.mockito.Mockito.mock;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
import org.junit.Test;
import org.openecomp.sdc.be.components.impl.AdditionalInformationBusinessLogic;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.user.UserBusinessLogic;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Response;
-import static org.mockito.Mockito.mock;
+public class AdditionalInformationServletTest {
+ private AdditionalInformationServlet createTestSubject() {
+ UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
+ ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
+ AdditionalInformationBusinessLogic additionalInformationBusinessLogic =
+ mock(AdditionalInformationBusinessLogic.class);
+ return new AdditionalInformationServlet(componentsUtils,
+ additionalInformationBusinessLogic);
+ }
-public class AdditionalInformationServletTest {
- private AdditionalInformationServlet createTestSubject() {
- UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
- ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- AdditionalInformationBusinessLogic additionalInformationBusinessLogic =
- mock(AdditionalInformationBusinessLogic.class);
- return new AdditionalInformationServlet(userBusinessLogic, componentsUtils,
- additionalInformationBusinessLogic);
- }
-
-
- @Test
- public void testCreateResourceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String resourceId = "";
- String data = "";
- HttpServletRequest request = null;
- String userUserId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testCreateServiceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String serviceId = "";
- String data = "";
- HttpServletRequest request = null;
- String userUserId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateResourceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String resourceId = "";
- String labelId = "";
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateServiceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String serviceId = "";
- String labelId = "";
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateResourceAdditionalInformationLabel_1() throws Exception {
- AdditionalInformationServlet testSubject;
- String resourceId = "";
- String labelId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteServiceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String serviceId = "";
- String labelId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetResourceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String resourceId = "";
- String labelId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetServiceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String serviceId = "";
- String labelId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetAllResourceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String resourceId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetAllServiceAdditionalInformationLabel() throws Exception {
- AdditionalInformationServlet testSubject;
- String serviceId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
+ @Test
+ public void testCreateResourceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String resourceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userUserId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testCreateServiceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String serviceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userUserId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateResourceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String resourceId = "";
+ String labelId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateServiceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String serviceId = "";
+ String labelId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateResourceAdditionalInformationLabel_1() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String resourceId = "";
+ String labelId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteServiceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String serviceId = "";
+ String labelId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetResourceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String resourceId = "";
+ String labelId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetServiceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String serviceId = "";
+ String labelId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetAllResourceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String resourceId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetAllServiceAdditionalInformationLabel() throws Exception {
+ AdditionalInformationServlet testSubject;
+ String serviceId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
}
@Bean
ArchiveEndpoint archiveEndpoint() {
- return new ArchiveEndpoint(userAdmin, componentUtils, archiveBusinessLogic());
+ return new ArchiveEndpoint(componentUtils, archiveBusinessLogic());
}
@Bean
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
package org.openecomp.sdc.be.servlets;
+import static org.mockito.Mockito.mock;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
import org.junit.Test;
import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.user.UserBusinessLogic;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Response;
-import static org.mockito.Mockito.mock;
+public class ArtifactServletTest {
+ private ArtifactServlet createTestSubject() {
+ UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
+ ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
+ ArtifactsBusinessLogic artifactsBusinessLogic = mock(ArtifactsBusinessLogic.class);
+ return new ArtifactServlet(componentsUtils, artifactsBusinessLogic);
+ }
-public class ArtifactServletTest {
- private ArtifactServlet createTestSubject() {
- UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
- ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- ArtifactsBusinessLogic artifactsBusinessLogic = mock(ArtifactsBusinessLogic.class);
- return new ArtifactServlet(userBusinessLogic, componentsUtils,artifactsBusinessLogic);
- }
-
-
- @Test
- public void testLoadArtifact() throws Exception {
- ArtifactServlet testSubject;
- String resourceId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateArtifact() throws Exception {
- ArtifactServlet testSubject;
- String resourceId = "";
- String artifactId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteArtifact() throws Exception {
- ArtifactServlet testSubject;
- String resourceId = "";
- String artifactId = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testLoadInformationArtifact() throws Exception {
- ArtifactServlet testSubject;
- String serviceId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateInformationArtifact() throws Exception {
- ArtifactServlet testSubject;
- String serviceId = "";
- String artifactId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateApiArtifact() throws Exception {
- ArtifactServlet testSubject;
- String serviceId = "";
- String artifactId = "";
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- String origMd5 = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteApiArtifact() throws Exception {
- ArtifactServlet testSubject;
- String serviceId = "";
- String artifactId = "";
- HttpServletRequest request = null;
- String userId = "";
- String origMd5 = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteInformationalArtifact() throws Exception {
- ArtifactServlet testSubject;
- String serviceId = "";
- String artifactId = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDownloadServiceArtifactBase64() throws Exception {
- ArtifactServlet testSubject;
- String serviceId = "";
- String artifactId = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDownloadResourceArtifactBase64() throws Exception {
- ArtifactServlet testSubject;
- String resourceId = "";
- String artifactId = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDownloadResourceInstanceArtifactBase64() throws Exception {
- ArtifactServlet testSubject;
- String containerComponentType = "";
- String componentId = "";
- String componentInstanceId = "";
- String artifactId = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testLoadArtifactToInterface() throws Exception {
- ArtifactServlet testSubject;
- String resourceId = "";
- String interfaceType = "";
- String operation = "";
- String userId = "";
- String origMd5 = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteArtifactToInterface() throws Exception {
- ArtifactServlet testSubject;
- String resourceId = "";
- String interfaceType = "";
- String operation = "";
- String artifactId = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateArtifactToInterface() throws Exception {
- ArtifactServlet testSubject;
- String resourceId = "";
- String interfaceType = "";
- String operation = "";
- String artifactId = "";
- String userId = "";
- String origMd5 = "";
- HttpServletRequest request = null;
- String data = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateRIArtifact() throws Exception {
- ArtifactServlet testSubject;
- String containerComponentType = "";
- String componentId = "";
- String componentInstanceId = "";
- String artifactId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateComponentInstanceArtifact() throws Exception {
- ArtifactServlet testSubject;
- String userId = "";
- String origMd5 = "";
- String containerComponentType = "";
- String componentId = "";
- String componentInstanceId = "";
- String artifactId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testLoadComponentInstanceArtifact() throws Exception {
- ArtifactServlet testSubject;
- String userId = "";
- String origMd5 = "";
- String containerComponentType = "";
- String componentId = "";
- String componentInstanceId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteComponentInstanceArtifact() throws Exception {
- ArtifactServlet testSubject;
- String userId = "";
- String origMd5 = "";
- String containerComponentType = "";
- String componentId = "";
- String componentInstanceId = "";
- String artifactId = "";
- String data = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetComponentArtifacts() throws Exception {
- ArtifactServlet testSubject;
- String containerComponentType = "";
- String componentId = "";
- String artifactGroupType = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetComponentInstanceArtifacts() throws Exception {
- ArtifactServlet testSubject;
- String containerComponentType = "";
- String componentId = "";
- String componentInstanceId = "";
- String artifactGroupType = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
+ @Test
+ public void testLoadArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testLoadInformationArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateInformationArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateApiArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ String origMd5 = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteApiArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ String origMd5 = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteInformationalArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDownloadServiceArtifactBase64() throws Exception {
+ ArtifactServlet testSubject;
+ String serviceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDownloadResourceArtifactBase64() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDownloadResourceInstanceArtifactBase64() throws Exception {
+ ArtifactServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testLoadArtifactToInterface() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String interfaceType = "";
+ String operation = "";
+ String userId = "";
+ String origMd5 = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteArtifactToInterface() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String interfaceType = "";
+ String operation = "";
+ String artifactId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateArtifactToInterface() throws Exception {
+ ArtifactServlet testSubject;
+ String resourceId = "";
+ String interfaceType = "";
+ String operation = "";
+ String artifactId = "";
+ String userId = "";
+ String origMd5 = "";
+ HttpServletRequest request = null;
+ String data = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateRIArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateComponentInstanceArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String userId = "";
+ String origMd5 = "";
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testLoadComponentInstanceArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String userId = "";
+ String origMd5 = "";
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteComponentInstanceArtifact() throws Exception {
+ ArtifactServlet testSubject;
+ String userId = "";
+ String origMd5 = "";
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String artifactId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetComponentArtifacts() throws Exception {
+ ArtifactServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String artifactGroupType = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetComponentInstanceArtifacts() throws Exception {
+ ArtifactServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String componentInstanceId = "";
+ String artifactGroupType = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
}
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
package org.openecomp.sdc.be.servlets;
+import static org.mockito.Mockito.mock;
+
import com.google.common.base.Equivalence.Wrapper;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
import org.junit.Test;
import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic;
import org.openecomp.sdc.be.components.impl.ResourceImportManager;
import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.exception.ResponseFormat;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Response;
+public class AttributeServletTest {
-import static org.mockito.Mockito.mock;
+ private AttributeServlet createTestSubject() {
+ UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
+ ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
+ ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
+ ServletUtils servletUtils = mock(ServletUtils.class);
+ ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
-public class AttributeServletTest {
+ return new AttributeServlet(componentInstanceBL, componentsUtils, servletUtils,
+ resourceImportManager);
+ }
+
+
+ @Test
+ public void testCreateAttribute() throws Exception {
+ AttributeServlet testSubject;
+ String resourceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUpdateAttribute() throws Exception {
+ AttributeServlet testSubject;
+ String resourceId = "";
+ String attributeId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteAttribute() throws Exception {
+ AttributeServlet testSubject;
+ String resourceId = "";
+ String attributeId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testBuildAttributeFromString() throws Exception {
+ AttributeServlet testSubject;
+ String data = "";
+ Wrapper<PropertyDefinition> attributesWrapper = null;
+ Wrapper<ResponseFormat> errorWrapper = null;
- private AttributeServlet createTestSubject() {
- UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
- ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
- ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- ServletUtils servletUtils = mock(ServletUtils.class);
- ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
-
- return new AttributeServlet(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils,
- resourceImportManager);
- }
-
-
- @Test
- public void testCreateAttribute() throws Exception {
- AttributeServlet testSubject;
- String resourceId = "";
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
- }
-
-
- @Test
- public void testUpdateAttribute() throws Exception {
- AttributeServlet testSubject;
- String resourceId = "";
- String attributeId = "";
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
- }
-
-
- @Test
- public void testDeleteAttribute() throws Exception {
- AttributeServlet testSubject;
- String resourceId = "";
- String attributeId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
- }
-
-
- @Test
- public void testBuildAttributeFromString() throws Exception {
- AttributeServlet testSubject;String data = "";
- Wrapper<PropertyDefinition> attributesWrapper = null;
- Wrapper<ResponseFormat> errorWrapper = null;
-
-
- // default test
- }
+ // default test
+ }
}
UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- return new AutomatedUpgradeEndpoint(userBusinessLogic, componentsUtils,
+ return new AutomatedUpgradeEndpoint(componentsUtils,
upgradeBusinessLogic());
}
}
private void createTestObject() {
- capabilityServlet = new CapabilityServlet(userBusinessLogic, componentInstanceBusinessLogic,
+ capabilityServlet = new CapabilityServlet(componentInstanceBusinessLogic,
componentsUtils, servletUtils, resourceImportManager, capabilitiesBusinessLogic);
}
resourceBusinessLogic = mock(ResourceBusinessLogic.class);
UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- ComponentServlet componentServlet = new ComponentServlet(userBusinessLogic, componentsUtils,
+ ComponentServlet componentServlet = new ComponentServlet(componentsUtils,
new ComponentBusinessLogicProvider(resourceBusinessLogic, null, null));
return super.configure().register(componentServlet);
}
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
package org.openecomp.sdc.be.servlets;
+import static org.mockito.Mockito.mock;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
import org.junit.Test;
import org.openecomp.sdc.be.components.impl.DistributionMonitoringBusinessLogic;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.user.UserBusinessLogic;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Response;
+public class DistributionServiceServletTest {
-import static org.mockito.Mockito.mock;
+ private DistributionServiceServlet createTestSubject() {
+ UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
+ ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
+ DistributionMonitoringBusinessLogic distributionMonitoringLogic = mock(DistributionMonitoringBusinessLogic.class);
+ return new DistributionServiceServlet(componentsUtils,
+ distributionMonitoringLogic);
+ }
-public class DistributionServiceServletTest {
- private DistributionServiceServlet createTestSubject() {
- UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
- ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- DistributionMonitoringBusinessLogic distributionMonitoringLogic = mock(DistributionMonitoringBusinessLogic.class);
- return new DistributionServiceServlet(userBusinessLogic, componentsUtils,
- distributionMonitoringLogic);
- }
-
-
- @Test
- public void testGetServiceById() throws Exception {
- DistributionServiceServlet testSubject;
- String serviceUUID = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
- }
-
-
- @Test
- public void testGetListOfDistributionStatuses() throws Exception {
- DistributionServiceServlet testSubject;
- String did = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
- }
-
-
- @Test
- public void testInit() throws Exception {
- DistributionServiceServlet testSubject;
- HttpServletRequest request = null;
-
- // default test
- testSubject = createTestSubject();
- }
-
-
- @Test
- public void testGetDistributionBL() throws Exception {
- DistributionServiceServlet testSubject;
- ServletContext context = null;
- DistributionMonitoringBusinessLogic result;
-
- // default test
- testSubject = createTestSubject();
- }
+ @Test
+ public void testGetServiceById() throws Exception {
+ DistributionServiceServlet testSubject;
+ String serviceUUID = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetListOfDistributionStatuses() throws Exception {
+ DistributionServiceServlet testSubject;
+ String did = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testInit() throws Exception {
+ DistributionServiceServlet testSubject;
+ HttpServletRequest request = null;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetDistributionBL() throws Exception {
+ DistributionServiceServlet testSubject;
+ ServletContext context = null;
+ DistributionMonitoringBusinessLogic result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
}
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.openecomp.sdc.be.components.impl.GroupBusinessLogicNew;
import org.openecomp.sdc.be.components.validation.AccessValidations;
UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- return new GroupEndpoint(userBusinessLogic, componentsUtils, groupBusinessLogic());
+ return new GroupEndpoint(componentsUtils, groupBusinessLogic());
}
@Bean
when(groupsOperation
.updateGroupPropertiesOnComponent(eq(VALID_COMPONENT_ID), isA(GroupDefinition.class), anyList(),
any(PromoteVersionEnum.class))).thenAnswer((Answer<Either>) invocationOnMock -> {
- Object[] args = invocationOnMock.getArguments();
- return Either.left(Collections.singletonList(args[2]));
- });
+ Object[] args = invocationOnMock.getArguments();
+ return Either.left(Collections.singletonList(args[2]));
+ });
}
@Test
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
package org.openecomp.sdc.be.servlets;
+import static org.mockito.Mockito.mock;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
import org.junit.Test;
import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic;
import org.openecomp.sdc.be.components.impl.GroupBusinessLogic;
import org.openecomp.sdc.be.impl.ServletUtils;
import org.openecomp.sdc.be.user.UserBusinessLogic;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Response;
+public class GroupServletTest {
-import static org.mockito.Mockito.mock;
+ private GroupServlet createTestSubject() {
+ UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
+ GroupBusinessLogic groupBL = mock(GroupBusinessLogic.class);
+ ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
+ ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
+ ServletUtils servletUtils = mock(ServletUtils.class);
+ ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
+ return new GroupServlet(groupBL, componentInstanceBL, componentsUtils, servletUtils,
+ resourceImportManager);
+ }
-public class GroupServletTest {
- private GroupServlet createTestSubject() {
- UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
- GroupBusinessLogic groupBL = mock(GroupBusinessLogic.class);
- ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
- ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- ServletUtils servletUtils = mock(ServletUtils.class);
- ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
- return new GroupServlet(userBusinessLogic, groupBL, componentInstanceBL, componentsUtils, servletUtils,
- resourceImportManager);
- }
+ @Test
+ public void testGetGroupArtifactById() throws Exception {
+ GroupServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String groupId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
-
- @Test
- public void testGetGroupArtifactById() throws Exception {
- GroupServlet testSubject;
- String containerComponentType = "";
- String componentId = "";
- String groupId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
+ // default test
+ }
- // default test
- }
-
- @Test
- public void testUpdateGroupMetadata() throws Exception {
- GroupServlet testSubject;
- String containerComponentType = "";
- String componentId = "";
- String groupUniqueId = "";
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
+ @Test
+ public void testUpdateGroupMetadata() throws Exception {
+ GroupServlet testSubject;
+ String containerComponentType = "";
+ String componentId = "";
+ String groupUniqueId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
- // default test
- testSubject = createTestSubject();
- }
+ // default test
+ testSubject = createTestSubject();
+ }
}
GroupTypesEndpoint groupTypesEndpoint() {
UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- return new GroupTypesEndpoint(userBusinessLogic, componentsUtils, groupTypeBusinessLogic());
+ return new GroupTypesEndpoint(componentsUtils, groupTypeBusinessLogic());
}
@Bean
@Override
protected Application configure() {
- InputsServlet inputsServlet = new InputsServlet(userBusinessLogic, inputsBusinessLogic,
+ InputsServlet inputsServlet = new InputsServlet(inputsBusinessLogic,
componentInstanceBL, componentsUtils,
servletUtils, resourceImportManager, dataTypeBusinessLogic);
forceSet(TestProperties.CONTAINER_PORT, "0");
}
private OutputsServlet createTestObject() {
- return new OutputsServlet(userBusinessLogic, outputsBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ return new OutputsServlet(outputsBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
}
@Override
assertThat(response.getStatus()).isEqualTo(Response.Status.FORBIDDEN.getStatusCode());
}
- @Test//(expected = ComponentException.class)
+ @Test
+//(expected = ComponentException.class)
void getPolicyProperties_unHandledError_returnGeneralError() {
when(businessLogic.getPolicyProperties(ComponentTypeEnum.SERVICE, SERVICE_ID, POLICY_ID, USER_ID))
.thenThrow(new RuntimeException());
protected ResourceConfig configure() {
forceSet(TestProperties.CONTAINER_PORT, "0");
return super.configure()
- .register(new PolicyServlet(null, null, componentsUtils,
+ .register(new PolicyServlet(null, componentsUtils,
servletUtils, null, businessLogic));
}
UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
return super.configure()
- .register(new PolicyTypesEndpoint(userBusinessLogic, componentsUtils, policyTypeBusinessLogic));
+ .register(new PolicyTypesEndpoint(componentsUtils, policyTypeBusinessLogic));
}
@Test
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
package org.openecomp.sdc.be.servlets;
+import static org.mockito.Mockito.mock;
+
import com.google.common.base.Equivalence.Wrapper;
import fj.data.Either;
+import java.util.List;
+import java.util.Map;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
import org.junit.Test;
import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic;
import org.openecomp.sdc.be.components.impl.ResourceBusinessLogic;
import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.exception.ResponseFormat;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Response;
-import java.util.List;
-import java.util.Map;
+public class ResourcesServletTest {
-import static org.mockito.Mockito.mock;
+ private ResourcesServlet createTestSubject() {
+ UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
+ ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
+ ResourceBusinessLogic resourceBusinessLogic = mock(ResourceBusinessLogic.class);
+ ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
+ ServletUtils servletUtils = mock(ServletUtils.class);
+ ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
-public class ResourcesServletTest {
+ return new ResourcesServlet(componentInstanceBL, resourceBusinessLogic, componentsUtils, servletUtils,
+ resourceImportManager);
+ }
+
+
+ @Test
+ public void testCreateResource() throws Exception {
+ ResourcesServlet testSubject;
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testIsUIImport() throws Exception {
+ ResourcesServlet testSubject;
+ String data = "";
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testPerformUIImport() throws Exception {
+ ResourcesServlet testSubject;
+ Wrapper<Response> responseWrapper = null;
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ String resourceUniqueId = "";
+
+ // default test
+ }
+
+
+ @Test
+ public void testParseToResource() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceJson = "";
+ User user = null;
+ Either<Resource, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testParseToLightResource() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceJson = "";
+ User user = null;
+ Either<Resource, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteResource() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceId = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteResourceByNameAndVersion() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceName = "";
+ String version = "";
+ HttpServletRequest request = null;
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetResourceById() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceId = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetResourceByNameAndVersion() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceName = "";
+ String resourceVersion = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateResourceName() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceName = "";
+ String resourceType = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetCertifiedAbstractResources() throws Exception {
+ ResourcesServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetCertifiedNotAbstractResources() throws Exception {
+ ResourcesServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateResourceMetadata() throws Exception {
+ ResourcesServlet testSubject;
+ String resourceId = "";
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateResource() throws Exception {
+ ResourcesServlet testSubject;
+ String data = "";
+ HttpServletRequest request = null;
+ String userId = "";
+ String resourceId = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testConvertMapToList() throws Exception {
+ Map<String, PropertyDefinition> properties = null;
+ List<PropertyDefinition> result;
+
+ // test 1
+ properties = null;
+
+ }
+
+
+ @Test
+ public void testGetResourceFromCsar() throws Exception {
+ ResourcesServlet testSubject;
+ HttpServletRequest request = null;
+ String userId = "";
+ String csarUUID = "";
+ Response result;
+
+ // default test
+ testSubject = createTestSubject();
- private ResourcesServlet createTestSubject() {
- UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
- ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
- ResourceBusinessLogic resourceBusinessLogic = mock(ResourceBusinessLogic.class);
- ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- ServletUtils servletUtils = mock(ServletUtils.class);
- ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
-
- return new ResourcesServlet(userBusinessLogic, componentInstanceBL, resourceBusinessLogic, componentsUtils, servletUtils,
- resourceImportManager);
- }
-
-
- @Test
- public void testCreateResource() throws Exception {
- ResourcesServlet testSubject;
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testIsUIImport() throws Exception {
- ResourcesServlet testSubject;
- String data = "";
- boolean result;
-
- // default test
- testSubject = createTestSubject();
- }
-
-
- @Test
- public void testPerformUIImport() throws Exception {
- ResourcesServlet testSubject;Wrapper<Response> responseWrapper = null;
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- String resourceUniqueId = "";
-
-
- // default test
- }
-
-
- @Test
- public void testParseToResource() throws Exception {
- ResourcesServlet testSubject;
- String resourceJson = "";
- User user = null;
- Either<Resource, ResponseFormat> result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testParseToLightResource() throws Exception {
- ResourcesServlet testSubject;
- String resourceJson = "";
- User user = null;
- Either<Resource, ResponseFormat> result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteResource() throws Exception {
- ResourcesServlet testSubject;
- String resourceId = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testDeleteResourceByNameAndVersion() throws Exception {
- ResourcesServlet testSubject;
- String resourceName = "";
- String version = "";
- HttpServletRequest request = null;
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetResourceById() throws Exception {
- ResourcesServlet testSubject;
- String resourceId = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetResourceByNameAndVersion() throws Exception {
- ResourcesServlet testSubject;
- String resourceName = "";
- String resourceVersion = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testValidateResourceName() throws Exception {
- ResourcesServlet testSubject;
- String resourceName = "";
- String resourceType = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetCertifiedAbstractResources() throws Exception {
- ResourcesServlet testSubject;
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testGetCertifiedNotAbstractResources() throws Exception {
- ResourcesServlet testSubject;
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateResourceMetadata() throws Exception {
- ResourcesServlet testSubject;
- String resourceId = "";
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testUpdateResource() throws Exception {
- ResourcesServlet testSubject;
- String data = "";
- HttpServletRequest request = null;
- String userId = "";
- String resourceId = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
-
-
- @Test
- public void testConvertMapToList() throws Exception {
- Map<String, PropertyDefinition> properties = null;
- List<PropertyDefinition> result;
-
- // test 1
- properties = null;
-
- }
-
-
- @Test
- public void testGetResourceFromCsar() throws Exception {
- ResourcesServlet testSubject;
- HttpServletRequest request = null;
- String userId = "";
- String csarUUID = "";
- Response result;
-
- // default test
- testSubject = createTestSubject();
-
- }
+ }
}
TypesUploadEndpoint typesUploadEndpoint() {
UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
- return new TypesUploadEndpoint(userBusinessLogic, componentsUtils, commonImportManager(),
+ return new TypesUploadEndpoint(componentsUtils, commonImportManager(),
annotationTypeOperations(), accessValidations);
}
MockitoAnnotations.openMocks(this);
forceSet(TestProperties.CONTAINER_PORT, "0");
- final TypesUploadServlet typesUploadServlet = new TypesUploadServlet(null, null, componentUtils,
+ final TypesUploadServlet typesUploadServlet = new TypesUploadServlet(null, componentUtils,
servletUtils, null, capabilityTypeImportManager, interfaceLifecycleTypeImportManager,
categoriesImportManager, dataTypeImportManager,
groupTypeImportManager, policyTypeImportManager, relationshipTypeImportManager, artifactTypeImportManager);