Initial commit for AAI-UI(sparky-backend)
[aai/sparky-be.git] / src / main / java / org / openecomp / sparky / dal / aai / ActiveInventoryDataProvider.java
1 /**
2  * ============LICENSE_START===================================================
3  * SPARKY (AAI UI service)
4  * ============================================================================
5  * Copyright © 2017 AT&T Intellectual Property.
6  * Copyright © 2017 Amdocs
7  * All rights reserved.
8  * ============================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * ============LICENSE_END=====================================================
21  *
22  * ECOMP and OpenECOMP are trademarks
23  * and service marks of AT&T Intellectual Property.
24  */
25
26 package org.openecomp.sparky.dal.aai;
27
28 import java.util.List;
29
30 import org.openecomp.sparky.dal.rest.OperationResult;
31 import org.openecomp.sparky.dal.rest.RestDataProvider;
32
33 /**
34  * The Interface ActiveInventoryDataProvider.
35  */
36 public interface ActiveInventoryDataProvider extends RestDataProvider {
37
38   /**
39    * Gets the self links by entity type.
40    *
41    * @param entityType the entity type
42    * @return the self links by entity type
43    * @throws Exception the exception
44    */
45   /*
46    * This one will do the nodes-query and understand enough to make that happen
47    */
48   OperationResult getSelfLinksByEntityType(String entityType) throws Exception;
49
50   /**
51    * Gets the self link for entity.
52    *
53    * @param entityType the entity type
54    * @param primaryKeyName the primary key name
55    * @param primaryKeyValue the primary key value
56    * @return the self link for entity
57    * @throws Exception the exception
58    */
59   OperationResult getSelfLinkForEntity(String entityType, String primaryKeyName,
60       String primaryKeyValue) throws Exception;
61
62   /**
63    * Query active inventory with retries.
64    *
65    * @param url the url
66    * @param responseType the response type
67    * @param numRetries the num retries
68    * @return the operation result
69    */
70   OperationResult queryActiveInventoryWithRetries(String url, String responseType, int numRetries);
71
72
73   /**
74    * Determines the self-link for an entity with passed-in key-value pairs.
75    * 
76    * @param startNodeType
77    * @param keyParams
78    * @return
79    * @throws Exception
80    */
81   String getGenericQueryForSelfLink(String startNodeType, List<String> queryKeyParams) throws Exception;
82
83   /*
84    * (non-Javadoc)
85    * 
86    * @see org.openecomp.sparky.dal.rest.RestDataProvider#shutdown()
87    */
88   @Override
89   void shutdown();
90
91 }