Adding rest service for so monitoring
[so.git] / mso-api-handlers / mso-requests-db / src / main / java / org / onap / so / db / request / data / repository / InfraActiveRequestsRepositoryCustom.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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.so.db.request.data.repository;
22
23 import java.util.HashMap;
24 import java.util.List;
25 import java.util.Map;
26
27 import org.onap.so.db.request.beans.InfraActiveRequests;
28 import org.springframework.stereotype.Repository;
29
30 @Repository
31 public interface InfraActiveRequestsRepositoryCustom {
32
33     public boolean healthCheck();
34
35     public InfraActiveRequests getRequestFromInfraActive(String requestId);
36
37     public InfraActiveRequests checkInstanceNameDuplicate(HashMap<String, String> instanceIdMap, String instanceName,
38             String requestScope);
39
40     public List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive(Map<String, List<String>> orchestrationMap);
41
42     // Added this method for Tenant Isolation project ( 1802-295491a) to query the mso_requests DB
43     // (infra_active_requests table) for operationalEnvId and OperationalEnvName
44     public List<InfraActiveRequests> getCloudOrchestrationFiltersFromInfraActive(Map<String, String> orchestrationMap);
45
46     public List<InfraActiveRequests> getRequestListFromInfraActive(String queryAttributeName, String queryValue,
47             String requestType);
48
49     public InfraActiveRequests getRequestFromInfraActive(String requestId, String requestType);
50
51     public InfraActiveRequests checkDuplicateByVnfName(String vnfName, String action, String requestType);
52
53     public InfraActiveRequests checkDuplicateByVnfId(String vnfId, String action, String requestType);
54
55     public InfraActiveRequests checkVnfIdStatus(String operationalEnvironmentId);
56
57     List<InfraActiveRequests> getInfraActiveRequests(final Map<String, String[]> filters, final long startTime,
58             final long endTime, final Integer maxResult);
59
60 }