X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=it%2Fotf.git;a=blobdiff_plain;f=otf-camunda%2Fsrc%2Fmain%2Fjava%2Forg%2Foran%2Fotf%2Fcommon%2Fmodel%2Flocal%2FBpmnInstance.java;fp=otf-camunda%2Fsrc%2Fmain%2Fjava%2Forg%2Foran%2Fotf%2Fcommon%2Fmodel%2Flocal%2FBpmnInstance.java;h=580e86cd93a733d8059b7e83e16ec3e4e84840bd;hp=0000000000000000000000000000000000000000;hb=14f6f95c84a4a1fa8774190db4a03fd0214ec55f;hpb=f49bd1efeaaddd4891c1f329b18d8cfb28b3e75b diff --git a/otf-camunda/src/main/java/org/oran/otf/common/model/local/BpmnInstance.java b/otf-camunda/src/main/java/org/oran/otf/common/model/local/BpmnInstance.java new file mode 100644 index 0000000..580e86c --- /dev/null +++ b/otf-camunda/src/main/java/org/oran/otf/common/model/local/BpmnInstance.java @@ -0,0 +1,187 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + +package org.oran.otf.common.model.local; + +import org.oran.otf.common.utility.gson.Convert; +import java.io.Serializable; +import java.util.Date; +import java.util.List; +import java.util.Map; +import org.bson.types.ObjectId; + +public class BpmnInstance implements Serializable { + + private static final long serialVersionUID = 1L; + + private String processDefinitionId; + private String deploymentId; + private int version; + private ObjectId bpmnFileId; + private ObjectId resourceFileId; + private boolean isDeployed; + private List testHeads; + private List pflos; + private Map testDataTemplate; + private Date createdAt; + private Date updatedAt; + private ObjectId createdBy; + private ObjectId updatedBy; + + public BpmnInstance() { + } + + public BpmnInstance( + String processDefinitionId, + String deploymentId, + int version, + ObjectId bpmnFileId, + ObjectId resourceFileId, + boolean isDeployed, + List testHeads, + List pflos, + Map testDataTemplate, + Date createdAt, + Date updatedAt, + ObjectId createdBy, + ObjectId updatedBy) { + this.processDefinitionId = processDefinitionId; + this.deploymentId = deploymentId; + this.version = version; + this.bpmnFileId = bpmnFileId; + this.resourceFileId = resourceFileId; + this.isDeployed = isDeployed; + this.testHeads = testHeads; + this.testDataTemplate = testDataTemplate; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.createdBy = createdBy; + this.updatedBy = updatedBy; + } + + public String getProcessDefinitionId() { + return processDefinitionId; + } + + public void setProcessDefinitionId(String processDefinitionId) { + this.processDefinitionId = processDefinitionId; + } + + public String getDeploymentId() { + return deploymentId; + } + + public void setDeploymentId(String deploymentId) { + this.deploymentId = deploymentId; + } + + public int getVersion() { + return version; + } + + public void setVersion(int version) { + this.version = version; + } + + public ObjectId getBpmnFileId() { + return bpmnFileId; + } + + public void setBpmnFileId(ObjectId bpmnFileId) { + this.bpmnFileId = bpmnFileId; + } + + public ObjectId getResourceFileId() { + return resourceFileId; + } + + public void setResourceFileId(ObjectId resourceFileId) { + this.resourceFileId = resourceFileId; + } + + public boolean isDeployed() { + return isDeployed; + } + + public void setDeployed(boolean deployed) { + isDeployed = deployed; + } + + public List getTestHeads() { + return testHeads; + } + + public void setTestHeads(List testHeads) { + this.testHeads = testHeads; + } + + public List getPflos() { + return pflos; + } + + public void setPflos(List pflos) { + this.pflos = pflos; + } + + public Map getTestDataTemplate() { + return testDataTemplate; + } + + public void setTestDataTemplate(Map testDataTemplate) { + this.testDataTemplate = testDataTemplate; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public ObjectId getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(ObjectId createdBy) { + this.createdBy = createdBy; + } + + public ObjectId getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(ObjectId updatedBy) { + this.updatedBy = updatedBy; + } + + private String getObjectIdString(ObjectId value) { + return value == null ? "\"\"" : "\"" + value.toString() + "\""; + } + + @Override + public String toString() { + return Convert.objectToJson(this); + } +}