Repair healthcheck
[clamp.git] / src / main / java / org / onap / clamp / clds / camel / CamelProxy.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP CLAMP
4  * ================================================================================
5  * Copyright (C) 2018 AT&T Intellectual Property. All rights
6  *                             reserved.
7  * ================================================================================
8  * Modifications Copyright (c) 2019 Samsung
9  * ================================================================================
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  * ============LICENSE_END============================================
22  * ===================================================================
23  *
24  */
25
26 package org.onap.clamp.clds.camel;
27
28 import org.apache.camel.ExchangeProperty;
29
30 /**
31  * This interface describes the CamelProxy parameters that must be passed to the
32  * Camel flow.
33  */
34 @FunctionalInterface
35 public interface CamelProxy {
36
37     /**
38      * This method is called when invoking a camel flow.
39      *
40      * @param actionCommand       The action coming from the Clamp UI (like SUBMIT, UPDATE,
41      *                            DELETE, ...)
42      * @param modelProperties     The Model properties created based on the BPMN Json and
43      *                            Properties Json
44      * @param modelBpmnProperties The Json with all the properties describing the flow
45      * @param modelName           The model name
46      * @param controlName         The control loop name
47      * @param docText             The Global properties JSON containing YAML (coming from CLamp
48      *                            template)
49      * @param isTest              Is a test or not (flag coming from the UI)
50      * @param userId              The user ID coming from the UI
51      * @param isInsertTestEvent   Is a test or not (flag coming from the UI)
52      * @param eventAction         The latest event action in database (like CREATE, SUBMIT, ...)
53      * @return A string containing the result of the Camel flow execution
54      */
55     String executeAction(@ExchangeProperty("actionCd") String actionCommand,
56                          @ExchangeProperty("modelProp") String modelProperties,
57                          @ExchangeProperty("modelBpmnProp") String modelBpmnProperties,
58                          @ExchangeProperty("modelName") String modelName, @ExchangeProperty("controlName") String controlName,
59                          @ExchangeProperty("docText") String docText, @ExchangeProperty("isTest") boolean isTest,
60                          @ExchangeProperty("userid") String userId, @ExchangeProperty("isInsertTestEvent") boolean isInsertTestEvent,
61                          @ExchangeProperty("eventAction") String eventAction);
62 }