--- /dev/null
+/* Copyright (c) 2019 AT&T Intellectual Property. #\r
+# #\r
+# Licensed under the Apache License, Version 2.0 (the "License"); #\r
+# you may not use this file except in compliance with the License. #\r
+# You may obtain a copy of the License at #\r
+# #\r
+# http://www.apache.org/licenses/LICENSE-2.0 #\r
+# #\r
+# Unless required by applicable law or agreed to in writing, software #\r
+# distributed under the License is distributed on an "AS IS" BASIS, #\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #\r
+# See the License for the specific language governing permissions and #\r
+# limitations under the License. #\r
+##############################################################################*/\r
+\r
+\r
+package org.oran.otf.common.model.local;\r
+\r
+import org.oran.otf.common.utility.gson.Convert;\r
+import java.io.Serializable;\r
+import java.util.Date;\r
+import java.util.List;\r
+import java.util.Map;\r
+import org.bson.types.ObjectId;\r
+\r
+public class BpmnInstance implements Serializable {\r
+\r
+ private static final long serialVersionUID = 1L;\r
+\r
+ private String processDefinitionId;\r
+ private String deploymentId;\r
+ private int version;\r
+ private ObjectId bpmnFileId;\r
+ private ObjectId resourceFileId;\r
+ private boolean isDeployed;\r
+ private List<TestHeadNode> testHeads;\r
+ private List<PfloNode> pflos;\r
+ private Map<String, Object> testDataTemplate;\r
+ private Date createdAt;\r
+ private Date updatedAt;\r
+ private ObjectId createdBy;\r
+ private ObjectId updatedBy;\r
+\r
+ public BpmnInstance() {\r
+ }\r
+\r
+ public BpmnInstance(\r
+ String processDefinitionId,\r
+ String deploymentId,\r
+ int version,\r
+ ObjectId bpmnFileId,\r
+ ObjectId resourceFileId,\r
+ boolean isDeployed,\r
+ List<TestHeadNode> testHeads,\r
+ List<PfloNode> pflos,\r
+ Map<String, Object> testDataTemplate,\r
+ Date createdAt,\r
+ Date updatedAt,\r
+ ObjectId createdBy,\r
+ ObjectId updatedBy) {\r
+ this.processDefinitionId = processDefinitionId;\r
+ this.deploymentId = deploymentId;\r
+ this.version = version;\r
+ this.bpmnFileId = bpmnFileId;\r
+ this.resourceFileId = resourceFileId;\r
+ this.isDeployed = isDeployed;\r
+ this.testHeads = testHeads;\r
+ this.testDataTemplate = testDataTemplate;\r
+ this.createdAt = createdAt;\r
+ this.updatedAt = updatedAt;\r
+ this.createdBy = createdBy;\r
+ this.updatedBy = updatedBy;\r
+ }\r
+\r
+ public String getProcessDefinitionId() {\r
+ return processDefinitionId;\r
+ }\r
+\r
+ public void setProcessDefinitionId(String processDefinitionId) {\r
+ this.processDefinitionId = processDefinitionId;\r
+ }\r
+\r
+ public String getDeploymentId() {\r
+ return deploymentId;\r
+ }\r
+\r
+ public void setDeploymentId(String deploymentId) {\r
+ this.deploymentId = deploymentId;\r
+ }\r
+\r
+ public int getVersion() {\r
+ return version;\r
+ }\r
+\r
+ public void setVersion(int version) {\r
+ this.version = version;\r
+ }\r
+\r
+ public ObjectId getBpmnFileId() {\r
+ return bpmnFileId;\r
+ }\r
+\r
+ public void setBpmnFileId(ObjectId bpmnFileId) {\r
+ this.bpmnFileId = bpmnFileId;\r
+ }\r
+\r
+ public ObjectId getResourceFileId() {\r
+ return resourceFileId;\r
+ }\r
+\r
+ public void setResourceFileId(ObjectId resourceFileId) {\r
+ this.resourceFileId = resourceFileId;\r
+ }\r
+\r
+ public boolean isDeployed() {\r
+ return isDeployed;\r
+ }\r
+\r
+ public void setDeployed(boolean deployed) {\r
+ isDeployed = deployed;\r
+ }\r
+\r
+ public List<TestHeadNode> getTestHeads() {\r
+ return testHeads;\r
+ }\r
+\r
+ public void setTestHeads(List<TestHeadNode> testHeads) {\r
+ this.testHeads = testHeads;\r
+ }\r
+\r
+ public List<PfloNode> getPflos() {\r
+ return pflos;\r
+ }\r
+\r
+ public void setPflos(List<PfloNode> pflos) {\r
+ this.pflos = pflos;\r
+ }\r
+\r
+ public Map<String, Object> getTestDataTemplate() {\r
+ return testDataTemplate;\r
+ }\r
+\r
+ public void setTestDataTemplate(Map<String, Object> testDataTemplate) {\r
+ this.testDataTemplate = testDataTemplate;\r
+ }\r
+\r
+ public Date getCreatedAt() {\r
+ return createdAt;\r
+ }\r
+\r
+ public void setCreatedAt(Date createdAt) {\r
+ this.createdAt = createdAt;\r
+ }\r
+\r
+ public Date getUpdatedAt() {\r
+ return updatedAt;\r
+ }\r
+\r
+ public void setUpdatedAt(Date updatedAt) {\r
+ this.updatedAt = updatedAt;\r
+ }\r
+\r
+ public ObjectId getCreatedBy() {\r
+ return createdBy;\r
+ }\r
+\r
+ public void setCreatedBy(ObjectId createdBy) {\r
+ this.createdBy = createdBy;\r
+ }\r
+\r
+ public ObjectId getUpdatedBy() {\r
+ return updatedBy;\r
+ }\r
+\r
+ public void setUpdatedBy(ObjectId updatedBy) {\r
+ this.updatedBy = updatedBy;\r
+ }\r
+\r
+ private String getObjectIdString(ObjectId value) {\r
+ return value == null ? "\"\"" : "\"" + value.toString() + "\"";\r
+ }\r
+\r
+ @Override\r
+ public String toString() {\r
+ return Convert.objectToJson(this);\r
+ }\r
+}\r