push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-vendor-software-product-lib / openecomp-sdc-vendor-software-product-api / src / main / java / org / openecomp / sdc / vendorsoftwareproduct / dao / VendorSoftwareProductDao.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.dao;
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.NicEntity;
26 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.PackageInfo;
27 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessArtifactEntity;
28 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity;
29 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.UploadDataEntity;
30 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
31 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspQuestionnaireEntity;
32 import org.openecomp.sdc.versioning.dao.VersionableDao;
33 import org.openecomp.sdc.versioning.dao.types.Version;
34
35 import java.nio.ByteBuffer;
36 import java.util.Collection;
37 import java.util.List;
38
39 public interface VendorSoftwareProductDao extends VersionableDao {
40
41   void createVendorSoftwareProductInfo(VspDetails vspDetails);
42
43   Collection<VspDetails> listVendorSoftwareProductsInfo();
44
45   VspDetails getVendorSoftwareProductInfo(VspDetails vspDetails);
46
47   void updateVendorSoftwareProductInfo(VspDetails vspDetails);
48
49   void deleteVendorSoftwareProductInfo(VspDetails vspDetails);
50
51
52   void updateUploadData(UploadDataEntity uploadData);
53
54   UploadDataEntity getUploadData(UploadDataEntity uploadData);
55
56   ByteBuffer getContentData(UploadDataEntity uploadDataEntity);
57
58
59   List<PackageInfo> listPackages(String category, String subCategory);
60
61   void insertPackageDetails(PackageInfo packageInfo);
62
63   PackageInfo getPackageInfo(PackageInfo packageInfo);
64
65   void deletePackageInfo(PackageInfo packageInfo);
66
67
68   Collection<NetworkEntity> listNetworks(String vspId, Version version);
69
70   void createNetwork(NetworkEntity network);
71
72   void updateNetwork(NetworkEntity network);
73
74   NetworkEntity getNetwork(String vspId, Version version, String networkId);
75
76   void deleteNetwork(String vspId, Version version);
77
78
79   Collection<ComponentEntity> listComponents(String vspId, Version version);
80
81   void createComponent(ComponentEntity component);
82
83   void updateComponent(ComponentEntity component);
84
85   ComponentEntity getComponent(String vspId, Version version, String componentId);
86
87   Collection<ComponentEntity> listComponentsQuestionnaire(String vspId, Version version);
88
89   void updateComponentQuestionnaire(String vspId, Version version, String componentId,
90                                     String questionnaireData);
91
92   void deleteComponent(String vspId, Version version);
93
94
95   Collection<ProcessEntity> listProcesses(String vspId, Version version, String componentId);
96
97   void deleteProcesses(String vspId, Version version, String componentId);
98
99   ProcessEntity getProcess(String vspId, Version version, String componentId, String processId);
100
101   void createProcess(ProcessEntity processEntity);
102
103   void updateProcess(ProcessEntity processEntity);
104
105   void deleteProcess(String vspId, Version version, String componentId, String processId);
106
107
108   void uploadProcessArtifact(String vspId, Version version, String componentId, String processId,
109                              byte[] artifact, String artifactFileName);
110
111   ProcessArtifactEntity getProcessArtifact(String vspId, Version version, String componentId,
112                                            String processId);
113
114   void deleteProcessArtifact(String vspId, Version version, String componentId, String processId);
115
116
117   VspQuestionnaireEntity getQuestionnaire(String vspId, Version version);
118
119   void updateQuestionnaire(String vspId, Version version, String questionnaireData);
120
121
122   Collection<NicEntity> listNics(String vspId, Version version, String componentId);
123
124   void createNic(NicEntity nic);
125
126   void updateNic(NicEntity nicEntity);
127
128   NicEntity getNic(String vspId, Version version, String componentId, String nicId);
129
130   void updateNicQuestionnaire(String vspId, Version version, String componentId, String nicId,
131                               String questionnaireData);
132
133   Collection<NicEntity> listNicsByVsp(String vspId, Version version);
134
135   void deleteNic(String vspId, Version version, String componentId);
136
137   void deleteUploadData(String vspId, Version version);
138
139   void updateVspLatestModificationTime(String vspId, Version version);
140 }