Minor Improvement
[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  * 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  */
23
24 package org.onap.clamp.clds.camel;
25
26 import org.apache.camel.ExchangeProperty;
27
28 /**
29  * This interface describes the CamelProxy parameters that must be passed to the
30  * Camel flow.
31  */
32 public interface CamelProxy {
33
34     /**
35      * This method is called when invoking a camel flow.
36      * 
37      * @param actionCommand
38      *            The action coming from the Clamp UI (like SUBMIT, UPDATE,
39      *            DELETE, ...)
40      * @param modelProperties
41      *            The Model properties created based on the BPMN Json and
42      *            Properties Json
43      * @param modelBpmnProperties
44      *            The Json with all the properties describing the flow
45      * @param modelName
46      *            The model name
47      * @param controlName
48      *            The control loop name
49      * @param docText
50      *            The Global properties JSON containing YAML (coming from CLamp
51      *            template)
52      * @param isTest
53      *            Is a test or not (flag coming from the UI)
54      * @param userId
55      *            The user ID coming from the UI
56      * @param isInsertTestEvent
57      *            Is a test or not (flag coming from the UI)
58      * @param eventAction
59      *            The latest event action in database (like CREATE, SUBMIT, ...)
60      * @return A string containing the result of the Camel flow execution
61      */
62     String submit(@ExchangeProperty("actionCd") String actionCommand,
63             @ExchangeProperty("modelProp") String modelProperties,
64             @ExchangeProperty("modelBpmnProp") String modelBpmnProperties,
65             @ExchangeProperty("modelName") String modelName, @ExchangeProperty("controlName") String controlName,
66             @ExchangeProperty("docText") String docText, @ExchangeProperty("isTest") boolean isTest,
67             @ExchangeProperty("userid") String userId, @ExchangeProperty("isInsertTestEvent") boolean isInsertTestEvent,
68             @ExchangeProperty("eventAction") String eventAction);
69 }