aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api
diff options
context:
space:
mode:
authortalig <talig@amdocs.com>2018-05-27 14:47:32 +0300
committertalig <talig@amdocs.com>2018-05-27 14:47:32 +0300
commitfa2c7f888495ed0969ce9178b9f770ac088a5f07 (patch)
treef3b28e1bd6bbff6b5fc1ffb3ea4c4bda40788136 /openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api
parentc42dd9b1b5659244d6306899cecd346dedfd32e1 (diff)
Refactor candidate heat dao
As a result OrchestrationTemplateCandidate element will be added if not exists instead of failing. Change-Id: I1a1c9afed65018ed01be65ff07dabe1c2081bea7 Issue-ID: SDC-1371 Signed-off-by: talig <talig@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api')
-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/dao/OrchestrationTemplateCandidateDao.java4
-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.java12
2 files changed, 8 insertions, 8 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/dao/OrchestrationTemplateCandidateDao.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/OrchestrationTemplateCandidateDao.java
index 9743814b11..c44ee307b4 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/OrchestrationTemplateCandidateDao.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/OrchestrationTemplateCandidateDao.java
@@ -26,9 +26,9 @@ import java.util.Optional;
public interface OrchestrationTemplateCandidateDao extends VersionableDao {
- OrchestrationTemplateCandidateData get(String vspId, Version version);
+ Optional<OrchestrationTemplateCandidateData> get(String vspId, Version version);
- OrchestrationTemplateCandidateData getInfo(String vspId, Version version);
+ Optional<OrchestrationTemplateCandidateData> getInfo(String vspId, Version version);
void delete(String vspId, Version version);
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 00120759d6..578b120256 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
@@ -44,7 +44,7 @@ public interface CandidateService {
OrchestrationTemplateCandidateData createCandidateDataEntity(
CandidateDataEntityTo candidateDataEntityTo, InputStream zipFileManifest,
- AnalyzedZipHeatFiles analyzedZipHeatFiles) throws Exception;
+ AnalyzedZipHeatFiles analyzedZipHeatFiles);
void updateCandidateUploadData(String vspId, Version version,
OrchestrationTemplateCandidateData uploadData);
@@ -55,11 +55,11 @@ public interface CandidateService {
void updateOrchestrationTemplateCandidateFileDataStructure(String vspId, Version version,
FilesDataStructure fileDataStructure);
- OrchestrationTemplateCandidateData getOrchestrationTemplateCandidate(String vspId,
- Version version);
+ Optional<OrchestrationTemplateCandidateData> getOrchestrationTemplateCandidate(String vspId,
+ Version version);
- OrchestrationTemplateCandidateData getOrchestrationTemplateCandidateInfo(String vspId,
- Version version);
+ Optional<OrchestrationTemplateCandidateData> getOrchestrationTemplateCandidateInfo(String vspId,
+ Version version);
byte[] getZipData(ByteBuffer contentData) throws IOException;
@@ -71,7 +71,7 @@ public interface CandidateService {
OnboardingTypesEnum type,
Map<String, List<ErrorMessage>> uploadErrors);
- byte[] replaceManifestInZip(ByteBuffer contentData, String manifest, String vspId,
+ byte[] replaceManifestInZip(ByteBuffer contentData, String manifest,
OnboardingTypesEnum type) throws IOException;
Optional<ManifestContent> createManifest(VspDetails vspDetails,