Merge "Unit/SONAR/Checkstyle in ONAP-REST"
[policy/engine.git] / ONAP-REST / src / main / java / org / onap / policy / rest / util / MSAttributeObject.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP-REST
4  * ================================================================================
5  * Copyright (C) 2017,2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.rest.util;
22
23 import java.util.HashMap;
24 import java.util.Map;
25
26 public class MSAttributeObject {
27
28     private String className;
29     private Map<String, String> attribute = new HashMap<>();
30     private Map<String, String> refAttribute = new HashMap<>();
31     private Map<String, Object> subClass = new HashMap<>();
32     private String dependency;
33     private Map<String, String> enumType = new HashMap<>();
34     private Map<String, String> matchingSet = new HashMap<>();
35     private boolean policyTempalate;
36     private String ruleFormation;
37     private String dataOrderInfo;
38
39     public Map<String, String> getRefAttribute() {
40         return refAttribute;
41     }
42
43     public void setRefAttribute(Map<String, String> refAttribute) {
44         this.refAttribute = refAttribute;
45     }
46
47     public String getClassName() {
48         return className;
49     }
50
51     public void setClassName(String className) {
52         this.className = className;
53     }
54
55     public Map<String, String> getAttribute() {
56         return attribute;
57     }
58
59     public void setAttribute(Map<String, String> attribute) {
60         this.attribute = attribute;
61     }
62
63     public Map<String, String> getEnumType() {
64         return enumType;
65     }
66
67     public void setEnumType(Map<String, String> enumType) {
68         this.enumType = enumType;
69     }
70
71     public void addAttribute(String key, String value) {
72         this.attribute.put(key, value);
73     }
74
75     public void addRefAttribute(String key, String value) {
76         this.refAttribute.put(key, value);
77     }
78
79     public void addAllAttribute(Map<String, String> map) {
80         this.attribute.putAll(map);
81     }
82
83     public void addAllRefAttribute(Map<String, String> map) {
84         this.refAttribute.putAll(map);
85     }
86
87     public Map<String, Object> getSubClass() {
88         return subClass;
89     }
90
91     public void setSubClass(Map<String, Object> subClass) {
92         this.subClass = subClass;
93     }
94
95     public void addAllSubClass(Map<String, Object> subClass) {
96         this.subClass.putAll(subClass);
97     }
98
99     public String getDependency() {
100         return dependency;
101     }
102
103     public void setDependency(String dependency) {
104         this.dependency = dependency;
105     }
106
107     public void addSingleEnum(String key, String value) {
108         this.enumType.put(key, value);
109     }
110
111     public Map<String, String> getMatchingSet() {
112         return matchingSet;
113     }
114
115     public void setMatchingSet(Map<String, String> matchingSet) {
116         this.matchingSet = matchingSet;
117     }
118
119     public void addMatchingSet(String key, String value) {
120         this.matchingSet.put(key, value);
121     }
122
123     public void addMatchingSet(Map<String, String> matchingSet) {
124         this.matchingSet.putAll(matchingSet);
125     }
126
127     public boolean isPolicyTempalate() {
128         return policyTempalate;
129     }
130
131     public void setPolicyTempalate(boolean policyTempalate) {
132         this.policyTempalate = policyTempalate;
133     }
134
135     public String getRuleFormation() {
136         return ruleFormation;
137     }
138
139     public void setRuleFormation(String ruleFormation) {
140         this.ruleFormation = ruleFormation;
141     }
142
143     public String getDataOrderInfo() {
144         return dataOrderInfo;
145     }
146
147     public void setDataOrderInfo(String dataOrderInfo) {
148         this.dataOrderInfo = dataOrderInfo;
149     }
150 }