Upgrade sonar plugin
[vid.git] / vid-app-common / src / main / java / org / openecomp / vid / asdc / AsdcClient.java
1 /*-\r
2  * ============LICENSE_START=======================================================\r
3  * VID\r
4  * ================================================================================\r
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
6  * ================================================================================\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  * \r
11  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  * \r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  * ============LICENSE_END=========================================================\r
19  */\r
20 \r
21 package org.openecomp.vid.asdc;\r
22 \r
23 import java.io.IOException;\r
24 import java.nio.file.Path;\r
25 import java.util.Collection;\r
26 import java.util.Map;\r
27 import java.util.UUID;\r
28 \r
29 import org.openecomp.vid.asdc.beans.Artifact;\r
30 import org.openecomp.vid.asdc.beans.Resource;\r
31 import org.openecomp.vid.asdc.beans.Service;\r
32 \r
33 /**\r
34  * The Interface AsdcClient.\r
35  */\r
36 public interface AsdcClient {\r
37         \r
38         /**\r
39          * Gets the resource.\r
40          *\r
41          * @param uuid the uuid\r
42          * @return the resource\r
43          * @throws AsdcCatalogException the sdc catalog exception\r
44          */\r
45         public Resource getResource(UUID uuid) throws AsdcCatalogException;\r
46         \r
47         /**\r
48          * Gets the resources.\r
49          *\r
50          * @return the resources\r
51          * @throws AsdcCatalogException the sdc catalog exception\r
52          */\r
53         public Collection<Resource> getResources() throws AsdcCatalogException;\r
54         \r
55         /**\r
56          * Gets the resources.\r
57          *\r
58          * @param filter the filter\r
59          * @return the resources\r
60          * @throws AsdcCatalogException the sdc catalog exception\r
61          */\r
62         public Collection<Resource> getResources(Map<String, String[]> filter) throws AsdcCatalogException;\r
63         \r
64         /**\r
65          * Gets the resource artifact.\r
66          *\r
67          * @param resourceUuid the resource uuid\r
68          * @param artifactUuid the artifact uuid\r
69          * @return the resource artifact\r
70          * @throws AsdcCatalogException the sdc catalog exception\r
71          */\r
72         public Artifact getResourceArtifact(UUID resourceUuid, UUID artifactUuid) throws AsdcCatalogException;\r
73         \r
74         /**\r
75          * Gets the resource tosca model.\r
76          *\r
77          * @param uuid the uuid\r
78          * @return the resource tosca model\r
79          * @throws AsdcCatalogException the sdc catalog exception\r
80          */\r
81         public Path getResourceToscaModel(UUID uuid) throws AsdcCatalogException;\r
82         \r
83         /**\r
84          * Gets the service.\r
85          *\r
86          * @param uuid the uuid\r
87          * @return the service\r
88          * @throws AsdcCatalogException the sdc catalog exception\r
89          */\r
90         public Service getService(UUID uuid) throws AsdcCatalogException;\r
91         \r
92         /**\r
93          * Gets the services.\r
94          *\r
95          * @return the services\r
96          * @throws AsdcCatalogException the sdc catalog exception\r
97          */\r
98         public Collection<Service> getServices() throws AsdcCatalogException;\r
99         \r
100         /**\r
101          * Gets the services.\r
102          *\r
103          * @param filter the filter\r
104          * @return the services\r
105          * @throws AsdcCatalogException the asdc catalog exception\r
106          */\r
107         public Collection<Service> getServices(Map<String, String[]> filter) throws AsdcCatalogException;\r
108         \r
109         /**\r
110          * Gets the service artifact.\r
111          *\r
112          * @param serviceUuid the service uuid\r
113          * @param artifactUuid the artifact uuid\r
114          * @return the service artifact\r
115          * @throws AsdcCatalogException the asdc catalog exception\r
116          */\r
117         public Artifact getServiceArtifact(UUID serviceUuid, UUID artifactUuid) throws AsdcCatalogException;\r
118         \r
119         /**\r
120          * Gets the service tosca model.\r
121          *\r
122          * @param uuid the uuid\r
123          * @return the service tosca model\r
124          * @throws AsdcCatalogException the asdc catalog exception\r
125          */\r
126         public Path getServiceToscaModel(UUID uuid) throws AsdcCatalogException;\r
127         \r
128         //TODO: Collect TOSCA information from CSAR\r
129 }\r