Removed unused fields from AbstractModelElement
[clamp.git] / src / main / java / org / onap / clamp / clds / model / properties / Holmes.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP CLAMP
4  * ================================================================================
5  * Copyright (C) 2017-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.model.properties;
27
28 import com.google.gson.JsonObject;
29 import org.onap.clamp.clds.util.JsonUtils;
30
31 /**
32  * Parse Holmes bpmn parameters json properties.
33  * Example json:
34  * [{"name":"correlationalLogic","value":"vcwx"},{"name":"configPolicyName","value":"cccc"}]
35  */
36 public class Holmes extends AbstractModelElement {
37
38     private static final String TYPE_HOLMES = "holmes";
39
40     private String correlationLogic;
41     private String configPolicyName;
42
43     /**
44      * Default constructor for Holmes Element.
45      *
46      * @param modelBpmn The model bpmn
47      * @param modelJson The model json
48      */
49     public Holmes(ModelBpmn modelBpmn, JsonObject modelJson) {
50         super(TYPE_HOLMES, modelBpmn, modelJson);
51
52         correlationLogic = JsonUtils.getStringValueByName(modelElementJsonNode, "correlationalLogic");
53         configPolicyName = JsonUtils.getStringValueByName(modelElementJsonNode, "configPolicyName");
54     }
55
56     public static final String getType() {
57         return TYPE_HOLMES;
58     }
59
60     public String getCorrelationLogic() {
61         return correlationLogic;
62     }
63
64     public String getConfigPolicyName() {
65         return configPolicyName;
66     }
67 }