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