diff options
author | katy.rotman <katy.rotman@amdocs.com> | 2018-05-23 15:50:38 +0300 |
---|---|---|
committer | Avi Gaffa <avi.gaffa@amdocs.com> | 2018-05-23 14:08:04 +0000 |
commit | f0c3f38fc7d23b7d6fcda939aafe57d429b8f41a (patch) | |
tree | e6f51efdd34948d0b2045a4e84c80ee67c7b1f38 /common/onap-tosca-datatype | |
parent | 44c763981f2e368184d6461dd18529545c3b29aa (diff) |
new node filter implementation
Issue-ID: SDC-1363
Change-Id: I0bd8b482e8e55f92ac3bccf8725d64f1b4929a43
Signed-off-by: katy.rotman <katy.rotman@amdocs.com>
Diffstat (limited to 'common/onap-tosca-datatype')
3 files changed, 58 insertions, 51 deletions
diff --git a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/CapabilityFilter.java b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/CapabilityFilter.java new file mode 100644 index 0000000000..0453325aa2 --- /dev/null +++ b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/CapabilityFilter.java @@ -0,0 +1,46 @@ +/* + * Copyright © 2016-2018 European Support Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.sdc.tosca.datatypes.model; + +import java.util.List; +import java.util.Map; + +/** + * @author KATYR + * @since May 13, 2018 + */ + +public class CapabilityFilter { + + List<Map<String, List<Constraint>>> properties; + + public List<Map<String, List<Constraint>>> getProperties() { + return properties; + } + + public void setProperties(List<Map<String, List<Constraint>>> properties) { + this.properties = properties; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("CapabilityFilter{"); + sb.append("properties=").append(properties); + sb.append('}'); + return sb.toString(); + } +} diff --git a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/CapabilityFilterDefinition.java b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/CapabilityFilterDefinition.java deleted file mode 100644 index 83f9d2576b..0000000000 --- a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/CapabilityFilterDefinition.java +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.sdc.tosca.datatypes.model; - -import java.util.List; - - - -public class CapabilityFilterDefinition { - List<Constraint> properties; - - public List<Constraint> getProperties() { - return properties; - } - - public void setProperties(List<Constraint> properties) { - this.properties = properties; - } -} diff --git a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/NodeFilter.java b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/NodeFilter.java index 692d7e47ee..d1d07b56e6 100644 --- a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/NodeFilter.java +++ b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/NodeFilter.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,26 +24,24 @@ import java.util.List; import java.util.Map; - public class NodeFilter { - Map<String, List<Constraint>> properties; - Map<String, CapabilityFilterDefinition> capabilities; - - public Map<String, List<Constraint>> getProperties() { + List<Map<String, List<Constraint>>> properties; + List<Map<String, CapabilityFilter>> capabilities; - return properties; + public List<Map<String, CapabilityFilter>> getCapabilities() { + return capabilities; } - public void setProperties(Map<String, List<Constraint>> properties) { - this.properties = properties; + public void setCapabilities(List<Map<String, CapabilityFilter>> capabilities) { + this.capabilities = capabilities; } - public Map<String, CapabilityFilterDefinition> getCapabilities() { - return capabilities; + public List<Map<String, List<Constraint>>> getProperties() { + return properties; } - public void setCapabilities(Map<String, CapabilityFilterDefinition> capabilities) { - this.capabilities = capabilities; + public void setProperties(List<Map<String, List<Constraint>>> properties) { + this.properties = properties; } } |