Update the Drools Engine to Version 6.5.0
[holmes/engine-management.git] / engine-d / src / main / java / org / onap / holmes / engine / EngineDAppConfig.java
1 /**
2  * Copyright 2017 ZTE Corporation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.onap.holmes.engine;
17
18 import com.fasterxml.jackson.annotation.JsonProperty;
19 import io.dropwizard.Configuration;
20 import io.dropwizard.db.DataSourceFactory;
21 import javax.validation.Valid;
22 import javax.validation.constraints.NotNull;
23 import org.jvnet.hk2.annotations.Service;
24 import org.onap.holmes.common.config.MQConfig;
25
26 @Service
27 public class EngineDAppConfig extends Configuration {
28
29     private String defaultName = "Correlation-Rule";
30
31     private String apidescription = "Holmes rule management rest API";
32
33     @JsonProperty
34     @NotNull
35     @Valid
36     private MQConfig mqConfig;
37     @Valid
38     @NotNull
39     private DataSourceFactory database = new DataSourceFactory();
40
41     public MQConfig getMqConfig() {
42         return mqConfig;
43     }
44
45     public void setMqConfig(MQConfig mqConfig) {
46         this.mqConfig = mqConfig;
47     }
48
49     @JsonProperty("database")
50     public DataSourceFactory getDataSourceFactory() {
51         return database;
52     }
53
54     @JsonProperty("database")
55     public void setDataSourceFactory(DataSourceFactory dataSourceFactory) {
56         this.database = dataSourceFactory;
57     }
58
59     public String getApidescription() {
60         return apidescription;
61     }
62
63     public void setApidescription(String apidescription) {
64         this.apidescription = apidescription;
65     }
66 }