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.heat.datatypes.manifest;
23 import java.util.Arrays;
24 import java.util.HashSet;
25 import java.util.List;
27 import java.util.function.Predicate;
29 public class FileData {
31 public static Set<Type> heatFileTypes =
32 new HashSet<>(Arrays.asList(Type.HEAT, Type.HEAT_NET, Type.HEAT_VOL));
33 private Boolean isBase;
36 private List<FileData> data;
38 public static Predicate<FileData> buildFileDataPredicateByType(Type... types) {
39 return fileData -> Arrays.asList(types).contains(fileData.getType());
42 public static boolean isHeatFile(Type type) {
43 return heatFileTypes.contains(type);
46 public Boolean getBase() {
50 public void setBase(Boolean base) {
54 public String getFile() {
58 public void setFile(String file) {
62 public Type getType() {
66 public void setType(Type type) {
70 public List<FileData> getData() {
74 public void setData(List<FileData> data) {
91 MURANO_PKG("MURANO_PKG"),
92 VENDOR_LICENSE("VENDOR_LICENSE"),
93 VF_LICENSE("VF_LICENSE"),
96 private String displayName;
98 Type(String displayName) {
99 this.displayName = displayName;
102 public String getDisplayName() {