3 * ============LICENSE_START=======================================================
4 * Copyright (C) 2022 Nordix Foundation.
5 * ================================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 * SPDX-License-Identifier: Apache-2.0
19 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.be.model;
23 import java.util.ArrayList;
24 import java.util.List;
25 import org.openecomp.sdc.be.model.category.CategoryDefinition;
26 import org.openecomp.sdc.be.model.category.SubCategoryDefinition;
28 public class DefaultUploadResourceInfo extends UploadResourceInfo{
30 public DefaultUploadResourceInfo(String toscaName){
31 SubCategoryDefinition subCategory = new SubCategoryDefinition();
32 subCategory.setName("Network Elements");
33 CategoryDefinition category = new CategoryDefinition();
34 category.setName("Generic");
35 category.setNormalizedName("generic");
36 category.setIcons(List.of("defaulticon"));
37 category.setNormalizedName("generic");
38 category.addSubCategory(subCategory);
39 List<CategoryDefinition> categories = new ArrayList<>();
40 categories.add(category);
41 super.setCategories(categories);
42 super.setIcon("defaulticon");
43 super.setVendorRelease("1");
44 super.setNormative(false);
45 String[] nodeTemplateName = toscaName.split("\\.");
46 String name = nodeTemplateName[nodeTemplateName.length - 1];
48 super.setDescription("A vfc of type " + toscaName);
49 List<String> tags = new ArrayList<>();