push addional code
[sdc.git] / openecomp-be / backend / openecomp-sdc-vendor-software-product-manager / src / main / java / org / openecomp / sdc / vendorsoftwareproduct / VendorSoftwareProductManager.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.sdc.vendorsoftwareproduct;
22
23 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
24 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
25 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.PackageInfo;
26 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
27 import org.openecomp.sdc.vendorsoftwareproduct.types.CompositionEntityResponse;
28 import org.openecomp.sdc.vendorsoftwareproduct.types.CompositionEntityValidationData;
29 import org.openecomp.sdc.vendorsoftwareproduct.types.QuestionnaireResponse;
30 import org.openecomp.sdc.vendorsoftwareproduct.types.UploadFileResponse;
31 import org.openecomp.sdc.vendorsoftwareproduct.types.ValidationResponse;
32 import org.openecomp.sdc.vendorsoftwareproduct.types.VersionedVendorSoftwareProductInfo;
33 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.ComponentData;
34 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Network;
35 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Nic;
36 import org.openecomp.sdc.vendorsoftwareproduct.types.schemagenerator.MibUploadStatus;
37 import org.openecomp.sdc.versioning.dao.types.Version;
38
39 import java.io.File;
40 import java.io.IOException;
41 import java.io.InputStream;
42 import java.util.Collection;
43 import java.util.List;
44
45 public interface VendorSoftwareProductManager {
46
47   Version checkout(String vendorSoftwareProductId, String user);
48
49   Version undoCheckout(String vendorSoftwareProductId, String user);
50
51   Version checkin(String vendorSoftwareProductId, String user);
52
53   ValidationResponse submit(String vendorSoftwareProductId, String user) throws IOException;
54
55
56   VspDetails createNewVsp(VspDetails vspDetails, String user);
57
58   List<VersionedVendorSoftwareProductInfo> getVspList(String versionFilter, String user);
59
60   void updateVsp(VspDetails vspDetails, String user);
61
62   VersionedVendorSoftwareProductInfo getVspDetails(String vspId, Version version, String user);
63
64   void deleteVsp(String vspIdToDelete, String user);
65
66
67   UploadFileResponse uploadFile(String vspId, InputStream heatFileToUpload, String user);
68
69   PackageInfo createPackage(String vspId, String user) throws IOException;
70
71   List<PackageInfo> listPackages(String category, String subCategory);
72
73   File getTranslatedFile(String vspId, Version version, String user);
74
75   File getLatestHeatPackage(String vspId, String user);
76
77   QuestionnaireResponse getVspQuestionnaire(String vspId, Version version, String user);
78
79   void updateVspQuestionnaire(String vspId, String questionnaireData, String user);
80
81
82   Collection<NetworkEntity> listNetworks(String vspId, Version version, String user);
83
84   NetworkEntity createNetwork(NetworkEntity network, String user);
85
86   CompositionEntityValidationData updateNetwork(NetworkEntity networkEntity, String user);
87
88   CompositionEntityResponse<Network> getNetwork(String vspId, Version version, String networkId,
89                                                 String user);
90
91   void deleteNetwork(String vspId, String networkId, String user);
92
93
94   QuestionnaireResponse getComponentQuestionnaire(String vspId, Version version, String componentId,
95                                                   String user);
96
97   void updateComponentQuestionnaire(String vspId, String componentId, String questionnaireData,
98                                     String user);
99
100
101   Collection<ComponentEntity> listComponents(String vspId, Version version, String user);
102
103   void deleteComponents(String vspId, String user);
104
105   ComponentEntity createComponent(ComponentEntity componentEntity, String user);
106
107   CompositionEntityValidationData updateComponent(ComponentEntity componentEntity, String user);
108
109   CompositionEntityResponse<ComponentData> getComponent(String vspId, Version version,
110                                                         String componentId, String user);
111
112   void deleteComponent(String vspId, String componentId, String user);
113
114
115   Collection<org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity> listProcesses(
116       String vspId, Version version, String componentId,
117       String user);
118
119   void deleteProcesses(String vspId, String componentId, String user);
120
121   org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity createProcess(
122       org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity processEntity, String user);
123
124   org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity getProcess(String vspId,
125                                                                             Version version,
126                                                                             String componentId,
127                                                                             String processId,
128                                                                             String user);
129
130   void updateProcess(org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity processEntity,
131                      String user);
132
133   void deleteProcess(String vspId, String componentId, String processId, String user);
134
135
136   File getProcessArtifact(String vspId, Version version, String componentId, String processId,
137                           String user);
138
139   void deleteProcessArtifact(String vspId, String componentId, String processId, String user);
140
141   void uploadProcessArtifact(InputStream uploadFile, String fileName, String vspId,
142                              String componentId, String processId, String user);
143
144
145   Collection<org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity> listNics(String vspId,
146                                                                                  Version version,
147                                                                                  String componentId,
148                                                                                  String user);
149
150   org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity createNic(
151       org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity nic, String user);
152
153   CompositionEntityValidationData updateNic(
154       org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity nicEntity, String user);
155
156   CompositionEntityResponse<Nic> getNic(String vspId, Version version, String componentId,
157                                         String nicId, String user);
158
159   void deleteNic(String vspId, String componentId, String nicId, String user);
160
161   QuestionnaireResponse getNicQuestionnaire(String vspId, Version version, String componentId,
162                                             String nicId, String user);
163
164   void updateNicQuestionnaire(String vspId, String componentId, String nicId,
165                               String questionnaireData, String user);
166
167   void deleteComponentMib(String vspId, String componentId, boolean isTrap, String user);
168
169   void uploadComponentMib(InputStream object, String filename, String vspId, String componentId,
170                           boolean isTrap, String user);
171
172   MibUploadStatus listMibFilenames(String vspId, String componentId, String user);
173 }