Upload the ESR server seed code.
[aai/esr-server.git] / esr-core / esr-mgr / src / main / java / org / onap / aai / esr / ExtsysAppConfiguration.java
1 /**
2  * Copyright 2016 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
17 package org.onap.aai.esr;
18
19 import com.fasterxml.jackson.annotation.JsonProperty;
20 import io.dropwizard.Configuration;
21 import io.dropwizard.db.DataSourceFactory;
22 import org.hibernate.validator.constraints.NotEmpty;
23
24 import javax.validation.Valid;
25 import javax.validation.constraints.NotNull;
26
27
28
29 public class ExtsysAppConfiguration extends Configuration {
30   @NotEmpty
31   private String template;
32
33   @NotEmpty
34   private String defaultName = "OPENO-Extsys";
35
36   @NotEmpty
37   private String msbServerAddr;
38   @Valid
39   private String serviceIp;
40
41   @Valid
42   @NotNull
43   private DataSourceFactory database = new DataSourceFactory();
44
45   @JsonProperty("database")
46   public DataSourceFactory getDataSourceFactory() {
47     return database;
48   }
49
50   @JsonProperty("database")
51   public void setDataSourceFactory(DataSourceFactory dataSourceFactory) {
52     this.database = dataSourceFactory;
53   }
54
55   @JsonProperty
56   public String getTemplate() {
57     return template;
58   }
59
60   @JsonProperty
61   public void setTemplate(String template) {
62     this.template = template;
63   }
64
65   @JsonProperty
66   public String getDefaultName() {
67     return defaultName;
68   }
69
70   @JsonProperty
71   public void setDefaultName(String name) {
72     this.defaultName = name;
73   }
74
75   @JsonProperty
76   public String getMsbServerAddr() {
77     return msbServerAddr;
78   }
79
80   @JsonProperty
81   public void setMsbServerAddr(String msbServerAddr) {
82     this.msbServerAddr = msbServerAddr;
83   }
84   @JsonProperty
85   public String getServiceIp() {
86     return serviceIp;
87   }
88
89   @JsonProperty
90   public void setServiceIp(String serviceIp) {
91     this.serviceIp = serviceIp;
92   }
93 }