2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.policy.rest.adapter;
25 import java.util.ArrayList;
26 import java.util.HashSet;
27 import java.util.List;
34 protected String ruleName;
35 protected List<String> fromZones;
36 protected List<String> toZones;
37 protected boolean negateSource; //hardcoded
38 protected boolean negateDestination; //hardcoded
39 protected List<AddressJson> sourceList;
40 protected List<AddressJson> destinationList;
41 protected List<ServicesJson> sourceServices;
42 protected Set<ServicesJson> destServices;
43 protected String action;
44 protected String description;
45 boolean enabled; //hardcoded
46 boolean log; //hardcoded
49 public String getPosition() {
53 public void setPosition(String value) {
54 this.position = value;
58 public String getRuleName() {
62 public void setRuleName(String value) {
63 this.ruleName = value;
67 public List<String> getFromZones() {
70 fromZones= new ArrayList<>();
75 public void setFromZones(List<String> fromZones) {
76 this.fromZones = fromZones;
80 public List<String> getToZones() {
83 toZones= new ArrayList<>();
88 public void setToZones(List<String> toZones) {
89 this.toZones = toZones;
94 public boolean getNegateSource() {
98 public void setNegateSource(boolean negateSource) {
99 this.negateSource = negateSource;
103 public boolean getNegateDestination() {
104 return negateDestination;
107 public void setNegateDestination(boolean negateDestination) {
108 this.negateDestination = negateDestination;
112 public List<AddressJson> getSourceList()
116 sourceList= new ArrayList<>();
118 return this.sourceList;
121 public void setSourceList(List<AddressJson> srcList) {
122 this.sourceList = srcList;
126 public List<AddressJson> getDestinationList()
128 if(destinationList==null)
130 destinationList= new ArrayList<>();
132 return this.destinationList;
135 public void setDestinationList(List<AddressJson> destList) {
136 this.destinationList = destList;
140 public List<ServicesJson> getSourceServices() {
141 if(sourceServices==null)
143 sourceServices= new ArrayList<>();
145 return this.sourceServices;
148 public void setSourceServices(List<ServicesJson> sourceServices) {
149 this.sourceServices = sourceServices;
152 //Destination services.
153 public Set<ServicesJson> getDestServices() {
154 if(destServices==null)
156 destServices= new HashSet<>();
158 return this.destServices;
161 public void setDestServices(Set<ServicesJson> destServices) {
162 this.destServices = destServices;
166 public String getAction() {
170 public void setAction(String value) {
175 public String getDescription() {
179 public void setDescription(String desc) {
180 this.description = desc;
184 public boolean getEnabled() {
188 public void setEnabled(boolean value) {
189 this.enabled = value;
193 public boolean getLog() {
197 public void setLog(boolean value) {