6351a2f662ea9c9d3476a411abe231a7baa27b6c
[sdnc/core.git] / sli / provider / src / main / java / org / openecomp / sdnc / sli / provider / SvcLogicService.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * openECOMP : SDN-C
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights
6  *                         reserved.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  * 
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  * 
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.openecomp.sdnc.sli.provider;
23
24 import java.util.HashMap;
25 import java.util.Properties;
26
27 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
28 import org.openecomp.sdnc.sli.SvcLogicContext;
29 import org.openecomp.sdnc.sli.SvcLogicException;
30 import org.openecomp.sdnc.sli.SvcLogicGraph;
31
32
33
34
35 public interface SvcLogicService {
36         
37         public static final String NAME = "org.openecomp.sdnc.sli.provider.SvcLogicService";
38         
39         // public SvcLogicContext execute(SvcLogicGraph graph, SvcLogicContext ctx) throws SvcLogicException;
40         /**
41          * Check for existence of a directed graph
42          * @param module - module name
43          * @param rpc - rpc name
44          * @param version - version.  If null, looks for active version
45          * @param mode - mode (sync/async)
46          * @return true if directed graph found, false otherwise
47          * @throws SvcLogicException
48          */
49         public boolean hasGraph(String module, String rpc, String version, String mode) throws SvcLogicException;
50         
51         /**
52          *  Execute a directed graph
53          *  
54          * @param module - module name
55          * @param rpc - rpc name
56          * @param version - version.  If null, use active version
57          * @param mode - mode (sync/async)
58          * @param parms - parameters, used to set SvcLogicContext attributes
59          * @return final values of attributes from SvcLogicContext, as Properties
60          * @throws SvcLogicException
61          * 
62          * 
63          *  @deprecated use execute(String module, String rpc, String version, String mode, DOMDataBroker dataBroker) instead
64          */
65         @Deprecated
66         public Properties execute(String module, String rpc, String version, String mode, Properties parms) throws SvcLogicException;
67         
68         /**
69          * Execute a directed graph
70          *  
71          * @param module - module name
72          * @param rpc - rpc name
73          * @param version - version.  If null, use active version
74          * @param mode - mode (sync/async)
75          * @param parms - parameters, used to set SvcLogicContext attributes
76          * @param domDataBroker - DOMDataBroker object
77          * @return final values of attributes from SvcLogicContext, as Properties
78          * @throws SvcLogicException
79          */
80         public Properties execute(String module, String rpc, String version, String mode, Properties parms, DOMDataBroker domDataBroker) throws SvcLogicException;
81         
82 }