2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017,2019 AT&T Intellectual Property. All rights reserved.
6 * Modifications Copyright (C) 2019 Nordix Foundation.
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
22 package org.onap.policy.rest.util;
24 import java.util.HashMap;
32 public class MsAttributeObject {
34 private String className;
35 private Map<String, String> attribute = new HashMap<>();
36 private Map<String, String> refAttribute = new HashMap<>();
37 private Map<String, Object> subClass = new HashMap<>();
38 private String dependency;
39 private Map<String, String> enumType = new HashMap<>();
40 private Map<String, String> matchingSet = new HashMap<>();
41 private boolean policyTempalate;
42 private String ruleFormation;
43 private String dataOrderInfo;
45 public void addAttribute(String key, String value) {
46 this.attribute.put(key, value);
49 public void addRefAttribute(String key, String value) {
50 this.refAttribute.put(key, value);
53 public void addAllAttribute(Map<String, String> map) {
54 this.attribute.putAll(map);
57 public void addAllRefAttribute(Map<String, String> map) {
58 this.refAttribute.putAll(map);
61 public void addAllSubClass(Map<String, Object> subClass) {
62 this.subClass.putAll(subClass);
65 public void addSingleEnum(String key, String value) {
66 this.enumType.put(key, value);
69 public void addMatchingSet(String key, String value) {
70 this.matchingSet.put(key, value);
73 public void addMatchingSet(Map<String, String> matchingSet) {
74 this.matchingSet.putAll(matchingSet);