6a92dbb20981f144885629c1df74dc128a09c611
[sdc.git] /
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 package org.openecomp.sdc.vendorsoftwareproduct;
17
18 import java.io.File;
19 import java.io.IOException;
20 import java.util.Collection;
21 import java.util.List;
22 import java.util.Map;
23 import java.util.Optional;
24 import org.apache.commons.lang3.tuple.Pair;
25 import org.openecomp.sdc.datatypes.error.ErrorMessage;
26 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComputeEntity;
27 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.OrchestrationTemplateEntity;
28 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.PackageInfo;
29 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
30 import org.openecomp.sdc.vendorsoftwareproduct.types.QuestionnaireResponse;
31 import org.openecomp.sdc.vendorsoftwareproduct.types.ValidationResponse;
32 import org.openecomp.sdc.vendorsoftwareproduct.types.candidateheat.FilesDataStructure;
33 import org.openecomp.sdc.versioning.dao.types.Version;
34
35 public interface VendorSoftwareProductManager {
36
37     VspDetails createVsp(VspDetails vspDetails);
38
39     void updateVsp(VspDetails vspDetails);
40
41     VspDetails getVsp(String vspId, Version version);
42
43     void deleteVsp(String vspId, Version version);
44
45     ValidationResponse validate(VspDetails vspDetails) throws IOException;
46
47     Map<String, List<ErrorMessage>> compile(String vspId, Version version);
48
49     QuestionnaireResponse getVspQuestionnaire(String vspId, Version version);
50
51     void updateVspQuestionnaire(String vspId, Version version, String questionnaireData);
52
53     byte[] getOrchestrationTemplateFile(String vspId, Version version);
54
55     OrchestrationTemplateEntity getOrchestrationTemplateInfo(String vspId, Version version);
56
57     Optional<FilesDataStructure> getOrchestrationTemplateStructure(String vspId, Version version);
58
59     PackageInfo createPackage(String vspId, Version version) throws IOException;
60
61     List<PackageInfo> listPackages(String category, String subCategory);
62
63     File getTranslatedFile(String vspId, Version version);
64
65     File getInformationArtifact(String vspId, Version version);
66
67     public Optional<Pair<String, byte[]>> get(String vspId, Version version) throws IOException;
68
69     Collection<ComputeEntity> getComputeByVsp(String vspId, Version version);
70 }