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.openecomp.sdc.be.model;
23 import java.util.List;
25 public class TargetCapabilityRelDef {
28 private String toNode;
30 private List<CapabilityRequirementRelationship> relationships;
32 public TargetCapabilityRelDef() {
36 public TargetCapabilityRelDef(String toNode, List<CapabilityRequirementRelationship> relationships) {
38 this.relationships = relationships;
41 public String getToNode() {
45 public void setToNode(String toNode) {
49 public List<CapabilityRequirementRelationship> getRelationships() {
53 public CapabilityRequirementRelationship resolveSingleRelationship() {//currently only single relationship is supported
54 return relationships == null || relationships.isEmpty() ? null : relationships.get(0);
57 public String getUid() {
61 public void setUid(String uid) {
65 public void setRelationships(List<CapabilityRequirementRelationship> relationships) {
66 this.relationships = relationships;
70 public String toString() {
71 return "TargetCapabilityRelDef [ toNode=" + toNode
72 + ", relationships=" + relationships + "]";