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.vendorsoftwareproduct.types;
23 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityType;
25 import java.util.ArrayList;
26 import java.util.Collection;
29 * The type Composition entity validation data.
31 public class CompositionEntityValidationData {
32 private CompositionEntityType entityType;
33 private String entityId;
34 private Collection<String> errors;
35 private Collection<CompositionEntityValidationData> subEntitiesValidationData;
38 * Instantiates a new Composition entity validation data.
40 * @param entityType the entity type
41 * @param entityId the entity id
43 public CompositionEntityValidationData(CompositionEntityType entityType, String entityId) {
44 this.entityType = entityType;
45 this.entityId = entityId;
51 * @return the entity type
53 public CompositionEntityType getEntityType() {
60 * @param entityType the entity type
62 public void setEntityType(CompositionEntityType entityType) {
63 this.entityType = entityType;
69 * @return the entity id
71 public String getEntityId() {
78 * @param entityId the entity id
80 public void setEntityId(String entityId) {
81 this.entityId = entityId;
89 public Collection<String> getErrors() {
96 * @param errors the errors
98 public void setErrors(Collection<String> errors) {
103 * Gets sub entities validation data.
105 * @return the sub entities validation data
107 public Collection<CompositionEntityValidationData> getSubEntitiesValidationData() {
108 return subEntitiesValidationData;
112 * Add sub entity validation data.
114 * @param subEntityValidationData the sub entity validation data
116 public void addSubEntityValidationData(CompositionEntityValidationData subEntityValidationData) {
117 if (subEntitiesValidationData == null) {
118 subEntitiesValidationData = new ArrayList<>();
120 subEntitiesValidationData.add(subEntityValidationData);