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.onap.vid.asdc;
23 import java.io.IOException;
24 import java.nio.file.Path;
25 import java.util.Collection;
27 import java.util.UUID;
29 import org.onap.vid.asdc.beans.Artifact;
30 import org.onap.vid.asdc.beans.Resource;
31 import org.onap.vid.asdc.beans.Service;
34 * The Interface AsdcClient.
36 public interface AsdcClient {
41 * @param uuid the uuid
42 * @return the resource
43 * @throws AsdcCatalogException the sdc catalog exception
45 public Resource getResource(UUID uuid) throws AsdcCatalogException;
50 * @return the resources
51 * @throws AsdcCatalogException the sdc catalog exception
53 public Collection<Resource> getResources() throws AsdcCatalogException;
58 * @param filter the filter
59 * @return the resources
60 * @throws AsdcCatalogException the sdc catalog exception
62 public Collection<Resource> getResources(Map<String, String[]> filter) throws AsdcCatalogException;
65 * Gets the resource artifact.
67 * @param resourceUuid the resource uuid
68 * @param artifactUuid the artifact uuid
69 * @return the resource artifact
70 * @throws AsdcCatalogException the sdc catalog exception
72 public Artifact getResourceArtifact(UUID resourceUuid, UUID artifactUuid) throws AsdcCatalogException;
75 * Gets the resource tosca model.
77 * @param uuid the uuid
78 * @return the resource tosca model
79 * @throws AsdcCatalogException the sdc catalog exception
81 public Path getResourceToscaModel(UUID uuid) throws AsdcCatalogException;
86 * @param uuid the uuid
88 * @throws AsdcCatalogException the sdc catalog exception
90 public Service getService(UUID uuid) throws AsdcCatalogException;
95 * @return the services
96 * @throws AsdcCatalogException the sdc catalog exception
98 public Collection<Service> getServices() throws AsdcCatalogException;
103 * @param filter the filter
104 * @return the services
105 * @throws AsdcCatalogException the asdc catalog exception
107 public Collection<Service> getServices(Map<String, String[]> filter) throws AsdcCatalogException;
110 * Gets the service artifact.
112 * @param serviceUuid the service uuid
113 * @param artifactUuid the artifact uuid
114 * @return the service artifact
115 * @throws AsdcCatalogException the asdc catalog exception
117 public Artifact getServiceArtifact(UUID serviceUuid, UUID artifactUuid) throws AsdcCatalogException;
120 * Gets the service tosca model.
122 * @param uuid the uuid
123 * @return the service tosca model
124 * @throws AsdcCatalogException the asdc catalog exception
126 public Path getServiceToscaModel(UUID uuid) throws AsdcCatalogException;
128 //TODO: Collect TOSCA information from CSAR