Adding back-end support for UI filters
[aai/sparky-be.git] / src / main / java / org / onap / aai / sparky / search / filters / config / UiFilterDataSourceConfig.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * Copyright © 2017 Amdocs
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  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  */
23 package org.onap.aai.sparky.search.filters.config;
24
25 import com.att.aft.dme2.internal.jackson.annotate.JsonCreator;
26 import com.fasterxml.jackson.annotation.JsonInclude;
27 import com.fasterxml.jackson.annotation.JsonInclude.Include;
28 import com.fasterxml.jackson.annotation.JsonProperty;
29
30 @JsonInclude(Include.NON_NULL)
31 public class UiFilterDataSourceConfig {
32
33   @JsonProperty("indexName")
34   private String indexName;
35
36   @JsonProperty("docType")
37   private String docType;
38
39   @JsonProperty("fieldName")
40   private String fieldName;
41
42   @JsonProperty("pathToField")
43   private String pathToField;
44
45   public UiFilterDataSourceConfig() {}
46
47   @JsonCreator
48   public UiFilterDataSourceConfig(@JsonProperty("indexName") final String indexName,
49       @JsonProperty("docType") final String docType,
50       @JsonProperty("fieldName") final String fieldName,
51       @JsonProperty("pathToField") final String pathToField) {
52     this.indexName = indexName;
53     this.docType = docType;
54     this.fieldName = fieldName;
55     this.pathToField = pathToField;
56   }
57
58   @JsonProperty("indexName")
59   public String getIndexName() {
60     return indexName;
61   }
62
63   public void setIndexName(String indexName) {
64     this.indexName = indexName;
65   }
66
67   @JsonProperty("docType")
68   public String getDocType() {
69     return docType;
70   }
71
72   public void setDocType(String docType) {
73     this.docType = docType;
74   }
75
76   @JsonProperty("fieldName")
77   public String getFieldName() {
78     return fieldName;
79   }
80
81   public void setFieldName(String fieldName) {
82     this.fieldName = fieldName;
83   }
84
85   @JsonProperty("pathToField")
86   public String getPathToField() {
87     return pathToField;
88   }
89
90   public void setPathToField(String pathToField) {
91     this.pathToField = pathToField;
92   }
93
94   @Override
95   public String toString() {
96     return "UiFilterDataSourceConfig [indexName=" + indexName + ", docType=" + docType
97         + ", fieldName=" + fieldName + ", pathToField=" + pathToField + "]";
98   }
99 }
100