Add VNF-Macro-Create and VNF-Macro-Delete
[so.git] / bpmn / so-bpmn-tasks / src / main / java / org / onap / so / bpmn / infrastructure / workflow / tasks / Resource.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.onap.so.bpmn.infrastructure.workflow.tasks;
22
23 import java.util.Comparator;
24
25 public class Resource {
26
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;
35
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);
38
39     public Resource(WorkflowType resourceType, String resourceId, boolean generated) {
40         this.resourceId = resourceId;
41         this.resourceType = resourceType;
42         this.generated = generated;
43     }
44
45     public String getResourceId() {
46         return resourceId;
47     }
48
49     public void setResourceId(String resourceId) {
50         this.resourceId = resourceId;
51     }
52
53     public WorkflowType getResourceType() {
54         return resourceType;
55     }
56
57     public void setResourceType(WorkflowType resourceType) {
58         this.resourceType = resourceType;
59     }
60
61     public boolean isGenerated() {
62         return generated;
63     }
64
65     public void setGenerated(boolean generated) {
66         this.generated = generated;
67     }
68
69     public boolean isBaseVfModule() {
70         return baseVfModule;
71     }
72
73     public void setBaseVfModule(boolean baseVfModule) {
74         this.baseVfModule = baseVfModule;
75     }
76
77     public String getVirtualLinkKey() {
78         return virtualLinkKey;
79     }
80
81     public void setVirtualLinkKey(String virtualLinkKey) {
82         this.virtualLinkKey = virtualLinkKey;
83     }
84
85     public String getVnfCustomizationId() {
86         return vnfCustomizationId;
87     }
88
89     public void setVnfCustomizationId(String vnfCustomizationId) {
90         this.vnfCustomizationId = vnfCustomizationId;
91     }
92
93     public String getVfModuleCustomizationId() {
94         return vfModuleCustomizationId;
95     }
96
97     public void setVfModuleCustomizationId(String vfModuleCustomizationId) {
98         this.vfModuleCustomizationId = vfModuleCustomizationId;
99     }
100
101     public String getCvnfModuleCustomizationId() {
102         return cvnfModuleCustomizationId;
103     }
104
105     public void setCvnfModuleCustomizationId(String cvnfModuleCustomizationId) {
106         this.cvnfModuleCustomizationId = cvnfModuleCustomizationId;
107     }
108 }