1 package org.openecomp.mso.bpmn.core.domain;
\r
3 import java.io.Serializable;
\r
5 import com.fasterxml.jackson.annotation.JsonIgnore;
\r
9 public abstract class Resource extends JsonWrapper implements Serializable {
\r
11 private static final long serialVersionUID = 1L;
\r
12 private String resourceId;
\r
13 protected ResourceType resourceType; // Enum of vnf or network or allotted resource
\r
14 protected ModelInfo modelInfo;
\r
15 private long concurrencyCounter = 1L;
\r
17 //private List modules;
\r
18 private ResourceInstance resourceInstance = new ResourceInstance(); // TODO possibly remove
\r
19 private HomingSolution homingSolution = new HomingSolution(); // TODO maybe this instead of resourceInstance being "bridge"
\r
21 //common parameters for all Resources
\r
22 private String toscaNodeType;
\r
25 public String getResourceId() {
\r
28 public void setResourceId(String resourceId) {
\r
29 this.resourceId = resourceId;
\r
31 public ModelInfo getModelInfo() {
\r
34 public void setModelInfo(ModelInfo modelInfo) {
\r
35 this.modelInfo = modelInfo;
\r
38 public ResourceInstance getResourceInstance() {
\r
39 return resourceInstance;
\r
41 public void setResourceInstance(ResourceInstance resourceInstance) {
\r
42 this.resourceInstance = resourceInstance;
\r
44 public HomingSolution getHomingSolution(){
\r
45 return homingSolution;
\r
48 public void setHomingSolution(HomingSolution homingSolution){
\r
49 this.homingSolution = homingSolution;
\r
51 public void setResourceType(ResourceType resourceType) {
\r
52 this.resourceType = resourceType;
\r
55 public ResourceType getResourceType(){
\r
56 return resourceType;
\r
59 public String getToscaNodeType() {
\r
60 return toscaNodeType;
\r
62 public void setToscaNodeType(String toscaNodeType) {
\r
63 this.toscaNodeType = toscaNodeType;
\r
68 public String getResourceInstanceId() {
\r
69 return this.getResourceInstance().getInstanceId();
\r
71 public String getResourceInstanceName() {
\r
72 return this.getResourceInstance().getInstanceName();
\r
76 // public String getResourceHomingSolution() {
\r
79 public void setResourceInstanceId(String newInstanceId){
\r
80 this.getResourceInstance().setInstanceId(newInstanceId);
\r
82 public void setResourceInstanceName(String newInstanceName){
\r
83 this.getResourceInstance().setInstanceName(newInstanceName);
\r
88 // public String setResourceHomingSolution() {
\r
91 * To be used by macro flow to increment concurrency counter after update to it's structure was completed
\r
93 public void incrementConcurrencyCounter(){
\r
94 this.concurrencyCounter ++;
\r
97 * Method to get concurrency counter data
\r
98 * @return long value for the counter
\r
101 public long getConcurrencyCounter(){
\r
102 return concurrencyCounter;
\r