Convert Sparky to Spring-Boot
[aai/sparky-be.git] / sparkybe-onap-service / src / main / java / org / onap / aai / sparky / search / filters / config / UiFilterConfig.java
1 /**
2  * ============LICENSE_START===================================================
3  * SPARKY (AAI UI service)
4  * ============================================================================
5  * Copyright © 2017 AT&T Intellectual Property.
6  * Copyright © 2017 Amdocs
7  * All rights reserved.
8  * ============================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * ============LICENSE_END=====================================================
21  *
22  * ECOMP and OpenECOMP are trademarks
23  * and service marks of AT&T Intellectual Property.
24  */
25 package org.onap.aai.sparky.search.filters.config;
26
27 import java.util.List;
28
29 import com.fasterxml.jackson.annotation.JsonCreator;
30 import com.fasterxml.jackson.annotation.JsonInclude;
31 import com.fasterxml.jackson.annotation.JsonInclude.Include;
32 import com.fasterxml.jackson.annotation.JsonProperty;
33
34 @JsonInclude(Include.NON_NULL)
35 public class UiFilterConfig {
36  
37   @JsonProperty("filterId")
38   private String filterId;
39   
40   @JsonProperty("filterName")
41   private String filterName;
42   
43   @JsonProperty("displayName")
44   private String displayName;
45   
46   @JsonProperty("dataType")
47   private String dataType;
48   
49   @JsonProperty("multiSelect")
50   private String multiSelect;
51   
52   @JsonProperty("watermark")
53   private String watermark;
54   
55   @JsonProperty("defaultValue")
56   private UiFilterOptionsValuesConfig defaultValue;
57   
58   @JsonProperty("optionsType")
59   private String optionsType;
60   
61   @JsonProperty("optionsValues")
62   private List<UiFilterOptionsValuesConfig> optionsValues;
63   
64   @JsonProperty("dataSource")
65   private UiFilterDataSourceConfig dataSource = new UiFilterDataSourceConfig();
66   
67   @JsonCreator
68   public UiFilterConfig(@JsonProperty("filterId") final String filterId, 
69       @JsonProperty("filterName") final String filterName, 
70       @JsonProperty("displayName") final String displayName,
71       @JsonProperty("dataType") final String dataType,
72       @JsonProperty("multiSelect") final String multiSelect,
73       @JsonProperty("watermark") final String watermark,
74       @JsonProperty("defaultValue") final UiFilterOptionsValuesConfig defaultValue,
75       @JsonProperty("optionsType") final String optionsType,
76       @JsonProperty("optionsValues") final List<UiFilterOptionsValuesConfig> optionsValues,
77       @JsonProperty("dataSource") final UiFilterDataSourceConfig dataSource
78       ) {
79     this.filterId = filterId;
80     this.filterName = filterName;
81     this.displayName = displayName;
82     this.dataType = dataType;
83     this.multiSelect = multiSelect;
84     this.watermark = watermark;
85     this.defaultValue = defaultValue;
86     this.optionsType = optionsType;
87     this.optionsValues = optionsValues;
88     this.dataSource = dataSource;
89   }
90
91   @JsonProperty("filterId")
92   public String getFilterId() {
93     return filterId;
94   }
95
96   public void setFilterId(String filterId) {
97     this.filterId = filterId;
98   }
99
100   @JsonProperty("filterName")
101   public String getFilterName() {
102     return filterName;
103   }
104
105   public void setFilterName(String filterName) {
106     this.filterName = filterName;
107   }
108
109   @JsonProperty("displayName")
110   public String getDisplayName() {
111     return displayName;
112   }
113
114   public void setDisplayName(String displayName) {
115     this.displayName = displayName;
116   }
117
118   @JsonProperty("dataType")
119   public String getDataType() {
120     return dataType;
121   }
122
123   public void setDataType(String dataType) {
124     this.dataType = dataType;
125   }
126
127   @JsonProperty("multiSelect")
128   public String getMultiSelect() {
129     return multiSelect;
130   }
131
132   public void setMultiSelect(String multiSelect) {
133     this.multiSelect = multiSelect;
134   }
135
136   @JsonProperty("watermark")
137   public String getWatermark() {
138     return watermark;
139   }
140
141   public void setWatermark(String watermark) {
142     this.watermark = watermark;
143   }
144   
145   @JsonProperty("defaultValue")
146   public UiFilterOptionsValuesConfig getDefaultValue() {
147     return defaultValue;
148   }
149
150   public void setDefaultValue(UiFilterOptionsValuesConfig defaultValue) {
151     this.defaultValue = defaultValue;
152   }
153
154   @JsonProperty("optionsType")
155   public String getOptionsType() {
156     return optionsType;
157   }
158
159   public void setOptionsType(String optionsType) {
160     this.optionsType = optionsType;
161   }
162   @JsonProperty("optionsValues")
163   public List<UiFilterOptionsValuesConfig> getOptionsValues() {
164     return optionsValues;
165   }
166
167   public void setOptionsValues(List<UiFilterOptionsValuesConfig> optionsValues) {
168     this.optionsValues = optionsValues;
169   }
170
171   @JsonProperty("dataSource")
172   public UiFilterDataSourceConfig getDataSource() {
173     return dataSource;
174   }
175
176   public void setDataSource(UiFilterDataSourceConfig dataSource) {
177     this.dataSource = dataSource;
178   }
179
180   @Override
181   public String toString() {
182     return "UiFilterConfig [filterId=" + filterId + ", filterName=" + filterName + ", displayName="
183         + displayName + ", dataType=" + dataType + ", multiSelect=" + multiSelect + ", watermark="
184         + watermark + ", optionsType=" + optionsType + ", optionsValues=" + optionsValues
185         + ", dataSource=" + dataSource + "]";
186   }
187 }
188