[VID-6] Initial rebase push
[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.util.Collection;\r
24 import java.util.Map;\r
25 import java.util.UUID;\r
26 \r
27 import org.openecomp.vid.asdc.beans.Artifact;\r
28 import org.openecomp.vid.asdc.beans.Resource;\r
29 import org.openecomp.vid.asdc.beans.Service;\r
30 import org.openecomp.vid.asdc.beans.tosca.ToscaCsar;\r
31 \r
32 /**\r
33  * The Interface AsdcClient.\r
34  */\r
35 public interface AsdcClient {\r
36         \r
37         /**\r
38          * Gets the resource.\r
39          *\r
40          * @param uuid the uuid\r
41          * @return the resource\r
42          * @throws AsdcCatalogException the sdc catalog exception\r
43          */\r
44         public Resource getResource(UUID uuid) throws AsdcCatalogException;\r
45         \r
46         /**\r
47          * Gets the resources.\r
48          *\r
49          * @return the resources\r
50          * @throws AsdcCatalogException the sdc catalog exception\r
51          */\r
52         public Collection<Resource> getResources() throws AsdcCatalogException;\r
53         \r
54         /**\r
55          * Gets the resources.\r
56          *\r
57          * @param filter the filter\r
58          * @return the resources\r
59          * @throws AsdcCatalogException the sdc catalog exception\r
60          */\r
61         public Collection<Resource> getResources(Map<String, String[]> filter) throws AsdcCatalogException;\r
62         \r
63         /**\r
64          * Gets the resource artifact.\r
65          *\r
66          * @param resourceUuid the resource uuid\r
67          * @param artifactUuid the artifact uuid\r
68          * @return the resource artifact\r
69          * @throws AsdcCatalogException the sdc catalog exception\r
70          */\r
71         public Artifact getResourceArtifact(UUID resourceUuid, UUID artifactUuid) throws AsdcCatalogException;\r
72         \r
73         /**\r
74          * Gets the resource tosca model.\r
75          *\r
76          * @param uuid the uuid\r
77          * @return the resource tosca model\r
78          * @throws AsdcCatalogException the sdc catalog exception\r
79          */\r
80         public ToscaCsar getResourceToscaModel(UUID uuid) throws AsdcCatalogException;\r
81         \r
82         /**\r
83          * Gets the service.\r
84          *\r
85          * @param uuid the uuid\r
86          * @return the service\r
87          * @throws AsdcCatalogException the sdc catalog exception\r
88          */\r
89         public Service getService(UUID uuid) throws AsdcCatalogException;\r
90         \r
91         /**\r
92          * Gets the services.\r
93          *\r
94          * @return the services\r
95          * @throws AsdcCatalogException the sdc catalog exception\r
96          */\r
97         public Collection<Service> getServices() throws AsdcCatalogException;\r
98         \r
99         /**\r
100          * Gets the services.\r
101          *\r
102          * @param filter the filter\r
103          * @return the services\r
104          * @throws AsdcCatalogException the asdc catalog exception\r
105          */\r
106         public Collection<Service> getServices(Map<String, String[]> filter) throws AsdcCatalogException;\r
107         \r
108         /**\r
109          * Gets the service artifact.\r
110          *\r
111          * @param serviceUuid the service uuid\r
112          * @param artifactUuid the artifact uuid\r
113          * @return the service artifact\r
114          * @throws AsdcCatalogException the asdc catalog exception\r
115          */\r
116         public Artifact getServiceArtifact(UUID serviceUuid, UUID artifactUuid) throws AsdcCatalogException;\r
117         \r
118         /**\r
119          * Gets the service tosca model.\r
120          *\r
121          * @param uuid the uuid\r
122          * @return the service tosca model\r
123          * @throws AsdcCatalogException the asdc catalog exception\r
124          */\r
125         public ToscaCsar getServiceToscaModel(UUID uuid) throws AsdcCatalogException;\r
126         \r
127         //TODO: Collect TOSCA information from CSAR\r
128 }\r