Unique identifier for test execution
[sdc.git] / openecomp-be / backend / openecomp-sdc-vendor-software-product-manager / src / main / java / org / openecomp / sdc / vendorsoftwareproduct / VendorSoftwareProductManager.java
1 /*
2  * Copyright © 2016-2018 European Support Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.openecomp.sdc.vendorsoftwareproduct;
18
19 import org.apache.commons.lang3.tuple.Pair;
20 import org.openecomp.sdc.datatypes.error.ErrorMessage;
21 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComputeEntity;
22 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.OrchestrationTemplateEntity;
23 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.PackageInfo;
24 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
25 import org.openecomp.sdc.vendorsoftwareproduct.types.QuestionnaireResponse;
26 import org.openecomp.sdc.vendorsoftwareproduct.types.ValidationResponse;
27 import org.openecomp.sdc.vendorsoftwareproduct.types.candidateheat.FilesDataStructure;
28 import org.openecomp.sdc.versioning.dao.types.Version;
29
30 import java.io.File;
31 import java.io.IOException;
32 import java.util.Collection;
33 import java.util.List;
34 import java.util.Map;
35 import java.util.Optional;
36
37 public interface VendorSoftwareProductManager {
38
39     VspDetails createVsp(VspDetails vspDetails);
40
41     void updateVsp(VspDetails vspDetails);
42
43     VspDetails getVsp(String vspId, Version version);
44
45     void deleteVsp(String vspId, Version version);
46
47     ValidationResponse validate(VspDetails vspDetails) throws IOException;
48
49     Map<String, List<ErrorMessage>> compile(String vspId, Version version);
50
51
52     QuestionnaireResponse getVspQuestionnaire(String vspId, Version version);
53
54     void updateVspQuestionnaire(String vspId, Version version, String questionnaireData);
55
56
57     byte[] getOrchestrationTemplateFile(String vspId, Version version);
58
59     OrchestrationTemplateEntity getOrchestrationTemplateInfo(String vspId, Version version);
60
61     Optional<FilesDataStructure> getOrchestrationTemplateStructure(String vspId, Version version);
62
63     PackageInfo createPackage(String vspId, Version version) throws IOException;
64
65     List<PackageInfo> listPackages(String category, String subCategory);
66
67
68     File getTranslatedFile(String vspId, Version version);
69
70     File getInformationArtifact(String vspId, Version version);
71
72     public Optional<Pair<String, byte[]>> get(String vspId, Version version) throws IOException;
73
74     Collection<ComputeEntity> getComputeByVsp(String vspId, Version version);
75 }