Fixed the Sonar technical debt.
[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 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         
37         public Map<String, String> getRefAttribute() {
38                 return refAttribute;
39         }
40         public void setRefAttribute(Map<String, String> refAttribute) {
41                 this.refAttribute = refAttribute;
42         }
43         public String getClassName() {
44                 return className;
45         }
46         public void setClassName(String className) {
47                 this.className = className;
48         }
49         public Map<String, String> getAttribute() {
50                 return attribute;
51         }
52         public void setAttribute(Map<String, String> attribute) {
53                 this.attribute = attribute;
54         }
55         public Map<String, String> getEnumType() {
56                 return enumType;
57         }
58         public void setEnumType(Map<String, String> enumType) {
59                 this.enumType = enumType;
60         }
61         public void addAttribute(String key, String value){
62                 this.attribute.put(key, value);
63         }
64         public void addRefAttribute(String key, String value){
65                 this.refAttribute.put(key, value);
66         }
67         public void addAllAttribute(Map<String, String> map){
68                 this.attribute.putAll(map);
69         }
70         public void addAllRefAttribute(Map<String, String> map){
71                 this.refAttribute.putAll(map);
72         }
73         public Map<String, Object> getSubClass() {
74                 return subClass;
75         }
76         public void setSubClass(Map<String, Object> subClass) {
77                 this.subClass = subClass;
78         }
79         public void addAllSubClass(Map<String, Object> subClass){
80                 this.subClass.putAll(subClass);
81         }
82         public String getDependency() {
83                 return dependency;
84         }
85         public void setDependency(String dependency) {
86                 this.dependency = dependency;
87         }
88         public void addSingleEnum(String key, String value){
89                 this.enumType.put(key, value);
90         }
91         public Map<String, String> getMatchingSet() {
92                 return matchingSet;
93         }
94         public void setMatchingSet(Map<String, String> matchingSet) {
95                 this.matchingSet = matchingSet;
96         }
97         public void addMatchingSet(String key, String value){
98                 this.matchingSet.put(key, value);
99         }
100         public void addMatchingSet(Map<String, String> matchingSet){
101                 this.matchingSet.putAll(matchingSet);
102         }
103         public boolean isPolicyTempalate() {
104                 return policyTempalate;
105         }
106         public void setPolicyTempalate(boolean policyTempalate) {
107                 this.policyTempalate = policyTempalate;
108         }
109 }