summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/filedatastructuremodule/CandidateService.java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/filedatastructuremodule/CandidateService.java')
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/filedatastructuremodule/CandidateService.java69
1 files changed, 28 insertions, 41 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/filedatastructuremodule/CandidateService.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/filedatastructuremodule/CandidateService.java
index d33533a7d0..7467d59c04 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/filedatastructuremodule/CandidateService.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/filedatastructuremodule/CandidateService.java
@@ -15,9 +15,15 @@
*
* Modifications copyright (c) 2021 Nokia
*/
-
package org.openecomp.sdc.vendorsoftwareproduct.services.filedatastructuremodule;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.ByteBuffer;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
import org.openecomp.core.utilities.file.FileContentHandler;
import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
import org.openecomp.sdc.datatypes.error.ErrorMessage;
@@ -30,61 +36,42 @@ import org.openecomp.sdc.vendorsoftwareproduct.types.candidateheat.AnalyzedZipHe
import org.openecomp.sdc.vendorsoftwareproduct.types.candidateheat.FilesDataStructure;
import org.openecomp.sdc.versioning.dao.types.Version;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.ByteBuffer;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-
public interface CandidateService {
- Optional<ErrorMessage> validateNonEmptyFileToUpload(InputStream heatFileToUpload,
- String fileSuffix);
- Optional<ErrorMessage> validateRawZipData(String fileSuffix, byte[] uploadedFileData);
+ Optional<ErrorMessage> validateNonEmptyFileToUpload(InputStream heatFileToUpload, String fileSuffix);
+
+ Optional<ErrorMessage> validateRawZipData(String fileSuffix, byte[] uploadedFileData);
- OrchestrationTemplateCandidateData createCandidateDataEntity(
- CandidateDataEntityTo candidateDataEntityTo, InputStream zipFileManifest,
- AnalyzedZipHeatFiles analyzedZipHeatFiles);
+ OrchestrationTemplateCandidateData createCandidateDataEntity(CandidateDataEntityTo candidateDataEntityTo, InputStream zipFileManifest,
+ AnalyzedZipHeatFiles analyzedZipHeatFiles);
- void updateCandidateUploadData(String vspId, Version version,
- OrchestrationTemplateCandidateData uploadData);
+ void updateCandidateUploadData(String vspId, Version version, OrchestrationTemplateCandidateData uploadData);
- Optional<FilesDataStructure> getOrchestrationTemplateCandidateFileDataStructure(String vspId,
- Version version);
+ Optional<FilesDataStructure> getOrchestrationTemplateCandidateFileDataStructure(String vspId, Version version);
- void updateOrchestrationTemplateCandidateFileDataStructure(String vspId, Version version,
- FilesDataStructure fileDataStructure);
+ void updateOrchestrationTemplateCandidateFileDataStructure(String vspId, Version version, FilesDataStructure fileDataStructure);
- Optional<OrchestrationTemplateCandidateData> getOrchestrationTemplateCandidate(String vspId,
- Version version);
+ Optional<OrchestrationTemplateCandidateData> getOrchestrationTemplateCandidate(String vspId, Version version);
- Optional<OrchestrationTemplateCandidateData> getOrchestrationTemplateCandidateInfo(String vspId,
- Version version);
+ Optional<OrchestrationTemplateCandidateData> getOrchestrationTemplateCandidateInfo(String vspId, Version version);
- byte[] getZipData(ByteBuffer contentData) throws IOException;
+ byte[] getZipData(ByteBuffer contentData) throws IOException;
- void deleteOrchestrationTemplateCandidate(String vspId, Version version);
+ void deleteOrchestrationTemplateCandidate(String vspId, Version version);
- Optional<ByteArrayInputStream> fetchZipFileByteArrayInputStream(String vspId,
- OrchestrationTemplateCandidateData candidateDataEntity,
- String manifest,
- OnboardingTypesEnum type,
- Map<String, List<ErrorMessage>> uploadErrors);
+ Optional<ByteArrayInputStream> fetchZipFileByteArrayInputStream(String vspId, OrchestrationTemplateCandidateData candidateDataEntity,
+ String manifest, OnboardingTypesEnum type,
+ Map<String, List<ErrorMessage>> uploadErrors);
- byte[] replaceManifestInZip(ByteBuffer contentData, String manifest,
- OnboardingTypesEnum type) throws IOException;
+ byte[] replaceManifestInZip(ByteBuffer contentData, String manifest, OnboardingTypesEnum type) throws IOException;
- Optional<ManifestContent> createManifest(VspDetails vspDetails,
- FileContentHandler fileContentHandler,
- AnalyzedZipHeatFiles analyzedZipHeatFiles);
+ Optional<ManifestContent> createManifest(VspDetails vspDetails, FileContentHandler fileContentHandler, AnalyzedZipHeatFiles analyzedZipHeatFiles);
- String createManifest(VspDetails vspDetails, FilesDataStructure structure);
+ String createManifest(VspDetails vspDetails, FilesDataStructure structure);
- String createManifestFromExisting(VspDetails vspDetails, FilesDataStructure structure, ManifestContent existingManifest);
+ String createManifestFromExisting(VspDetails vspDetails, FilesDataStructure structure, ManifestContent existingManifest);
- Optional<List<ErrorMessage>> validateFileDataStructure(FilesDataStructure filesDataStructure);
+ Optional<List<ErrorMessage>> validateFileDataStructure(FilesDataStructure filesDataStructure);
- void updateValidationData(String vspId, Version version, ValidationStructureList validationData);
+ void updateValidationData(String vspId, Version version, ValidationStructureList validationData);
}