2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.sdc.vendorsoftwareproduct;
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;
40 import java.io.IOException;
41 import java.io.InputStream;
42 import java.util.Collection;
43 import java.util.List;
45 public interface VendorSoftwareProductManager {
47 Version checkout(String vendorSoftwareProductId, String user);
49 Version undoCheckout(String vendorSoftwareProductId, String user);
51 Version checkin(String vendorSoftwareProductId, String user);
53 ValidationResponse submit(String vendorSoftwareProductId, String user) throws IOException;
56 VspDetails createNewVsp(VspDetails vspDetails, String user);
58 List<VersionedVendorSoftwareProductInfo> getVspList(String versionFilter, String user);
60 void updateVsp(VspDetails vspDetails, String user);
62 VersionedVendorSoftwareProductInfo getVspDetails(String vspId, Version version, String user);
64 void deleteVsp(String vspIdToDelete, String user);
67 UploadFileResponse uploadFile(String vspId, InputStream heatFileToUpload, String user);
69 PackageInfo createPackage(String vspId, String user) throws IOException;
71 List<PackageInfo> listPackages(String category, String subCategory);
73 File getTranslatedFile(String vspId, Version version, String user);
75 File getLatestHeatPackage(String vspId, String user);
77 QuestionnaireResponse getVspQuestionnaire(String vspId, Version version, String user);
79 void updateVspQuestionnaire(String vspId, String questionnaireData, String user);
82 Collection<NetworkEntity> listNetworks(String vspId, Version version, String user);
84 NetworkEntity createNetwork(NetworkEntity network, String user);
86 CompositionEntityValidationData updateNetwork(NetworkEntity networkEntity, String user);
88 CompositionEntityResponse<Network> getNetwork(String vspId, Version version, String networkId,
91 void deleteNetwork(String vspId, String networkId, String user);
94 QuestionnaireResponse getComponentQuestionnaire(String vspId, Version version, String componentId,
97 void updateComponentQuestionnaire(String vspId, String componentId, String questionnaireData,
101 Collection<ComponentEntity> listComponents(String vspId, Version version, String user);
103 void deleteComponents(String vspId, String user);
105 ComponentEntity createComponent(ComponentEntity componentEntity, String user);
107 CompositionEntityValidationData updateComponent(ComponentEntity componentEntity, String user);
109 CompositionEntityResponse<ComponentData> getComponent(String vspId, Version version,
110 String componentId, String user);
112 void deleteComponent(String vspId, String componentId, String user);
115 Collection<org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity> listProcesses(
116 String vspId, Version version, String componentId,
119 void deleteProcesses(String vspId, String componentId, String user);
121 org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity createProcess(
122 org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity processEntity, String user);
124 org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity getProcess(String vspId,
130 void updateProcess(org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity processEntity,
133 void deleteProcess(String vspId, String componentId, String processId, String user);
136 File getProcessArtifact(String vspId, Version version, String componentId, String processId,
139 void deleteProcessArtifact(String vspId, String componentId, String processId, String user);
141 void uploadProcessArtifact(InputStream uploadFile, String fileName, String vspId,
142 String componentId, String processId, String user);
145 Collection<org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity> listNics(String vspId,
150 org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity createNic(
151 org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity nic, String user);
153 CompositionEntityValidationData updateNic(
154 org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity nicEntity, String user);
156 CompositionEntityResponse<Nic> getNic(String vspId, Version version, String componentId,
157 String nicId, String user);
159 void deleteNic(String vspId, String componentId, String nicId, String user);
161 QuestionnaireResponse getNicQuestionnaire(String vspId, Version version, String componentId,
162 String nicId, String user);
164 void updateNicQuestionnaire(String vspId, String componentId, String nicId,
165 String questionnaireData, String user);
167 void deleteComponentMib(String vspId, String componentId, boolean isTrap, String user);
169 void uploadComponentMib(InputStream object, String filename, String vspId, String componentId,
170 boolean isTrap, String user);
172 MibUploadStatus listMibFilenames(String vspId, String componentId, String user);