aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductManager.java
blob: 0d38d165c248ee96b5a694ecd57a23d575d5b0c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/*-
 * ============LICENSE_START=======================================================
 * SDC
 * ================================================================================
 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 * ================================================================================
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============LICENSE_END=========================================================
 */

package org.openecomp.sdc.vendorsoftwareproduct;

import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.PackageInfo;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
import org.openecomp.sdc.vendorsoftwareproduct.types.CompositionEntityResponse;
import org.openecomp.sdc.vendorsoftwareproduct.types.CompositionEntityValidationData;
import org.openecomp.sdc.vendorsoftwareproduct.types.QuestionnaireResponse;
import org.openecomp.sdc.vendorsoftwareproduct.types.UploadFileResponse;
import org.openecomp.sdc.vendorsoftwareproduct.types.ValidationResponse;
import org.openecomp.sdc.vendorsoftwareproduct.types.VersionedVendorSoftwareProductInfo;
import org.openecomp.sdc.vendorsoftwareproduct.types.composition.ComponentData;
import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Network;
import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Nic;
import org.openecomp.sdc.vendorsoftwareproduct.types.schemagenerator.MibUploadStatus;
import org.openecomp.sdc.versioning.dao.types.Version;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collection;
import java.util.List;

public interface VendorSoftwareProductManager {

  Version checkout(String vendorSoftwareProductId, String user);

  Version undoCheckout(String vendorSoftwareProductId, String user);

  Version checkin(String vendorSoftwareProductId, String user);

  ValidationResponse submit(String vendorSoftwareProductId, String user) throws IOException;


  VspDetails createNewVsp(VspDetails vspDetails, String user);

  List<VersionedVendorSoftwareProductInfo> getVspList(String versionFilter, String user);

  void updateVsp(VspDetails vspDetails, String user);

  VersionedVendorSoftwareProductInfo getVspDetails(String vspId, Version version, String user);

  void deleteVsp(String vspIdToDelete, String user);


  UploadFileResponse uploadFile(String vspId, InputStream heatFileToUpload, String user);

  PackageInfo createPackage(String vspId, String user) throws IOException;

  List<PackageInfo> listPackages(String category, String subCategory);

  File getTranslatedFile(String vspId, Version version, String user);

  File getLatestHeatPackage(String vspId, String user);

  QuestionnaireResponse getVspQuestionnaire(String vspId, Version version, String user);

  void updateVspQuestionnaire(String vspId, String questionnaireData, String user);


  Collection<NetworkEntity> listNetworks(String vspId, Version version, String user);

  NetworkEntity createNetwork(NetworkEntity network, String user);

  CompositionEntityValidationData updateNetwork(NetworkEntity networkEntity, String user);

  CompositionEntityResponse<Network> getNetwork(String vspId, Version version, String networkId,
                                                String user);

  void deleteNetwork(String vspId, String networkId, String user);


  QuestionnaireResponse getComponentQuestionnaire(String vspId, Version version, String componentId,
                                                  String user);

  void updateComponentQuestionnaire(String vspId, String componentId, String questionnaireData,
                                    String user);


  Collection<ComponentEntity> listComponents(String vspId, Version version, String user);

  void deleteComponents(String vspId, String user);

  ComponentEntity createComponent(ComponentEntity componentEntity, String user);

  CompositionEntityValidationData updateComponent(ComponentEntity componentEntity, String user);

  CompositionEntityResponse<ComponentData> getComponent(String vspId, Version version,
                                                        String componentId, String user);

  void deleteComponent(String vspId, String componentId, String user);


  Collection<org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity> listProcesses(
      String vspId, Version version, String componentId,
      String user);

  void deleteProcesses(String vspId, String componentId, String user);

  org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity createProcess(
      org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity processEntity, String user);

  org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity getProcess(String vspId,
                                                                            Version version,
                                                                            String componentId,
                                                                            String processId,
                                                                            String user);

  void updateProcess(org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity processEntity,
                     String user);

  void deleteProcess(String vspId, String componentId, String processId, String user);


  File getProcessArtifact(String vspId, Version version, String componentId, String processId,
                          String user);

  void deleteProcessArtifact(String vspId, String componentId, String processId, String user);

  void uploadProcessArtifact(InputStream uploadFile, String fileName, String vspId,
                             String componentId, String processId, String user);


  Collection<org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity> listNics(String vspId,
                                                                                 Version version,
                                                                                 String componentId,
                                                                                 String user);

  org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity createNic(
      org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity nic, String user);

  CompositionEntityValidationData updateNic(
      org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity nicEntity, String user);

  CompositionEntityResponse<Nic> getNic(String vspId, Version version, String componentId,
                                        String nicId, String user);

  void deleteNic(String vspId, String componentId, String nicId, String user);

  QuestionnaireResponse getNicQuestionnaire(String vspId, Version version, String componentId,
                                            String nicId, String user);

  void updateNicQuestionnaire(String vspId, String componentId, String nicId,
                              String questionnaireData, String user);

  void deleteComponentMib(String vspId, String componentId, boolean isTrap, String user);

  void uploadComponentMib(InputStream object, String filename, String vspId, String componentId,
                          boolean isTrap, String user);

  MibUploadStatus listMibFilenames(String vspId, String componentId, String user);
}