2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 - 2018 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.onap.so.bpmn.infrastructure.workflow.tasks;
23 import java.util.Comparator;
25 public class Resource {
27 private String resourceId;
28 private WorkflowType resourceType;
29 private boolean generated;
30 private boolean baseVfModule;
31 private String virtualLinkKey;
32 private String vnfCustomizationId;
33 private String vfModuleCustomizationId;
34 private String cvnfModuleCustomizationId;
36 public static final Comparator<Resource> sortBaseFirst = Comparator.comparingInt(x -> x.isBaseVfModule() ? 0 : 1);
37 public static final Comparator<Resource> sortBaseLast = Comparator.comparingInt(x -> x.isBaseVfModule() ? 1 : 0);
39 public Resource(WorkflowType resourceType, String resourceId, boolean generated) {
40 this.resourceId = resourceId;
41 this.resourceType = resourceType;
42 this.generated = generated;
45 public String getResourceId() {
49 public void setResourceId(String resourceId) {
50 this.resourceId = resourceId;
53 public WorkflowType getResourceType() {
57 public void setResourceType(WorkflowType resourceType) {
58 this.resourceType = resourceType;
61 public boolean isGenerated() {
65 public void setGenerated(boolean generated) {
66 this.generated = generated;
69 public boolean isBaseVfModule() {
73 public void setBaseVfModule(boolean baseVfModule) {
74 this.baseVfModule = baseVfModule;
77 public String getVirtualLinkKey() {
78 return virtualLinkKey;
81 public void setVirtualLinkKey(String virtualLinkKey) {
82 this.virtualLinkKey = virtualLinkKey;
85 public String getVnfCustomizationId() {
86 return vnfCustomizationId;
89 public void setVnfCustomizationId(String vnfCustomizationId) {
90 this.vnfCustomizationId = vnfCustomizationId;
93 public String getVfModuleCustomizationId() {
94 return vfModuleCustomizationId;
97 public void setVfModuleCustomizationId(String vfModuleCustomizationId) {
98 this.vfModuleCustomizationId = vfModuleCustomizationId;
101 public String getCvnfModuleCustomizationId() {
102 return cvnfModuleCustomizationId;
105 public void setCvnfModuleCustomizationId(String cvnfModuleCustomizationId) {
106 this.cvnfModuleCustomizationId = cvnfModuleCustomizationId;