Refactor dblib
[ccsdk/sli/core.git] / sli / provider / src / main / java / org / onap / ccsdk / sli / core / sli / provider / SvcLogicService.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : CCSDK
4  * ================================================================================
5  * Copyright (C) 2017 ONAP
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.ccsdk.sli.core.sli.provider;
22
23 import java.util.Properties;
24
25 import org.onap.ccsdk.sli.core.sli.SvcLogicException;
26 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
27
28 public interface SvcLogicService {
29         
30         public static final String NAME = "org.openecomp.sdnc.sli.provider.SvcLogicService";
31         
32         // public SvcLogicContext execute(SvcLogicGraph graph, SvcLogicContext ctx) throws SvcLogicException;
33         /**
34          * Check for existence of a directed graph
35          * @param module - module name
36          * @param rpc - rpc name
37          * @param version - version.  If null, looks for active version
38          * @param mode - mode (sync/async)
39          * @return true if directed graph found, false otherwise
40          * @throws SvcLogicException
41          */
42         public boolean hasGraph(String module, String rpc, String version, String mode) throws SvcLogicException;
43         
44         /**
45          *  Execute a directed graph
46          *  
47          * @param module - module name
48          * @param rpc - rpc name
49          * @param version - version.  If null, use active version
50          * @param mode - mode (sync/async)
51          * @param parms - parameters, used to set SvcLogicContext attributes
52          * @return final values of attributes from SvcLogicContext, as Properties
53          * @throws SvcLogicException
54          * 
55          * 
56          *  @deprecated use execute(String module, String rpc, String version, String mode, DOMDataBroker dataBroker) instead
57          */
58         @Deprecated
59         public Properties execute(String module, String rpc, String version, String mode, Properties parms) throws SvcLogicException;
60         
61         /**
62          * Execute a directed graph
63          *  
64          * @param module - module name
65          * @param rpc - rpc name
66          * @param version - version.  If null, use active version
67          * @param mode - mode (sync/async)
68          * @param parms - parameters, used to set SvcLogicContext attributes
69          * @param domDataBroker - DOMDataBroker object
70          * @return final values of attributes from SvcLogicContext, as Properties
71          * @throws SvcLogicException
72          */
73         public Properties execute(String module, String rpc, String version, String mode, Properties parms, DOMDataBroker domDataBroker) throws SvcLogicException;
74         
75 }