added svcapi ui and camunda code
[it/otf.git] / otf-service-api / src / main / java / org / oran / otf / common / model / historic / TestInstanceHistoric.java
1 /*  Copyright (c) 2019 AT&T Intellectual Property.                             #\r
2 #                                                                              #\r
3 #   Licensed under the Apache License, Version 2.0 (the "License");            #\r
4 #   you may not use this file except in compliance with the License.           #\r
5 #   You may obtain a copy of the License at                                    #\r
6 #                                                                              #\r
7 #       http://www.apache.org/licenses/LICENSE-2.0                             #\r
8 #                                                                              #\r
9 #   Unless required by applicable law or agreed to in writing, software        #\r
10 #   distributed under the License is distributed on an "AS IS" BASIS,          #\r
11 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #\r
12 #   See the License for the specific language governing permissions and        #\r
13 #   limitations under the License.                                             #\r
14 ##############################################################################*/\r
15 \r
16 \r
17 package org.oran.otf.common.model.historic;\r
18 \r
19 import org.oran.otf.common.model.TestInstance;\r
20 import org.oran.otf.common.model.local.ParallelFlowInput;\r
21 import org.oran.otf.common.utility.gson.Convert;\r
22 import java.io.Serializable;\r
23 import java.util.Date;\r
24 import java.util.HashMap;\r
25 import java.util.Map;\r
26 import org.bson.types.ObjectId;\r
27 import org.springframework.data.annotation.Id;\r
28 \r
29 public class TestInstanceHistoric implements Serializable {\r
30 \r
31   private static final long serialVersionUID = 1L;\r
32 \r
33   private @Id\r
34   ObjectId _id;\r
35   private String testInstanceName;\r
36   private String testInstanceDescription;\r
37   private ObjectId groupId;\r
38   private ObjectId testDefinitionId;\r
39   private String processDefinitionId;\r
40   private Map<String, ParallelFlowInput> pfloInput;\r
41   private Map<String, Object> simulationVthInput;\r
42   private Map<String, Object> testData;\r
43   private Map<String, Object> vthInput;\r
44   private Date createdAt;\r
45   private Date updatedAt;\r
46   private ObjectId createdBy;\r
47   private ObjectId updatedBy;\r
48   private boolean simulationMode;\r
49 \r
50   public TestInstanceHistoric() {\r
51   }\r
52 \r
53   public TestInstanceHistoric(TestInstance testInstance) {\r
54     this._id = testInstance.get_id();\r
55     this.testInstanceName = testInstance.getTestInstanceName();\r
56     this.testInstanceDescription = testInstance.getTestInstanceDescription();\r
57     this.groupId = testInstance.getGroupId();\r
58     this.testDefinitionId = testInstance.getTestDefinitionId();\r
59     this.pfloInput = testInstance.getPfloInput();\r
60     this.processDefinitionId = testInstance.getProcessDefinitionId();\r
61     this.simulationVthInput = testInstance.getSimulationVthInput();\r
62     this.testData = testInstance.getTestData();\r
63     this.vthInput = testInstance.getVthInput();\r
64     this.createdAt = testInstance.getCreatedAt();\r
65     this.updatedAt = testInstance.getUpdatedAt();\r
66     this.createdBy = testInstance.getCreatedBy();\r
67     this.updatedBy = testInstance.getUpdatedBy();\r
68     this.simulationMode = testInstance.isSimulationMode();\r
69   }\r
70 \r
71   public TestInstanceHistoric(\r
72       ObjectId _id,\r
73       String testInstanceName,\r
74       String testInstanceDescription,\r
75       ObjectId groupId,\r
76       ObjectId testDefinitionId,\r
77       String processDefinitionId,\r
78       HashMap<String, ParallelFlowInput> pfloInput,\r
79       HashMap<String, Object> simulationVthInput,\r
80       HashMap<String, Object> testData,\r
81       HashMap<String, Object> vthInput,\r
82       Date createdAt,\r
83       Date updatedAt,\r
84       ObjectId createdBy,\r
85       ObjectId updatedBy,\r
86       boolean simulationMode) {\r
87     this._id = _id;\r
88     this.testInstanceName = testInstanceName;\r
89     this.testInstanceDescription = testInstanceDescription;\r
90     this.groupId = groupId;\r
91     this.testDefinitionId = testDefinitionId;\r
92     this.processDefinitionId = processDefinitionId;\r
93     this.pfloInput = pfloInput;\r
94     this.simulationVthInput = simulationVthInput;\r
95     this.testData = testData;\r
96     this.vthInput = vthInput;\r
97     this.createdAt = createdAt;\r
98     this.updatedAt = updatedAt;\r
99     this.createdBy = createdBy;\r
100     this.updatedBy = updatedBy;\r
101     this.simulationMode = simulationMode;\r
102   }\r
103 \r
104   public static long getSerialVersionUID() {\r
105     return serialVersionUID;\r
106   }\r
107 \r
108   public ObjectId get_id() {\r
109     return _id;\r
110   }\r
111 \r
112   public void set_id(ObjectId _id) {\r
113     this._id = _id;\r
114   }\r
115 \r
116   public String getTestInstanceName() {\r
117     return testInstanceName;\r
118   }\r
119 \r
120   public void setTestInstanceName(String testInstanceName) {\r
121     this.testInstanceName = testInstanceName;\r
122   }\r
123 \r
124   public String getTestInstanceDescription() {\r
125     return testInstanceDescription;\r
126   }\r
127 \r
128   public void setTestInstanceDescription(String testInstanceDescription) {\r
129     this.testInstanceDescription = testInstanceDescription;\r
130   }\r
131 \r
132   public ObjectId getGroupId() {\r
133     return groupId;\r
134   }\r
135 \r
136   public void setGroupId(ObjectId groupId) {\r
137     this.groupId = groupId;\r
138   }\r
139 \r
140   public ObjectId getTestDefinitionId() {\r
141     return testDefinitionId;\r
142   }\r
143 \r
144   public void setTestDefinitionId(ObjectId testDefinitionId) {\r
145     this.testDefinitionId = testDefinitionId;\r
146   }\r
147 \r
148   public String getProcessDefinitionId() {\r
149     return processDefinitionId;\r
150   }\r
151 \r
152   public void setProcessDefinitionId(String processDefinitionId) {\r
153     this.processDefinitionId = processDefinitionId;\r
154   }\r
155 \r
156   public Map<String, ParallelFlowInput> getPfloInput() {\r
157     return pfloInput;\r
158   }\r
159 \r
160   public void setPfloInput(\r
161       HashMap<String, ParallelFlowInput> pfloInput) {\r
162     this.pfloInput = pfloInput;\r
163   }\r
164 \r
165   public Map<String, Object> getSimulationVthInput() {\r
166     return simulationVthInput;\r
167   }\r
168 \r
169   public void setSimulationVthInput(\r
170       HashMap<String, Object> simulationVthInput) {\r
171     this.simulationVthInput = simulationVthInput;\r
172   }\r
173 \r
174   public Map<String, Object> getTestData() {\r
175     return testData;\r
176   }\r
177 \r
178   public void setTestData(HashMap<String, Object> testData) {\r
179     this.testData = testData;\r
180   }\r
181 \r
182   public Map<String, Object> getVthInput() {\r
183     return vthInput;\r
184   }\r
185 \r
186   public void setVthInput(HashMap<String, Object> vthInput) {\r
187     this.vthInput = vthInput;\r
188   }\r
189 \r
190   public Date getCreatedAt() {\r
191     return createdAt;\r
192   }\r
193 \r
194   public void setCreatedAt(Date createdAt) {\r
195     this.createdAt = createdAt;\r
196   }\r
197 \r
198   public Date getUpdatedAt() {\r
199     return updatedAt;\r
200   }\r
201 \r
202   public void setUpdatedAt(Date updatedAt) {\r
203     this.updatedAt = updatedAt;\r
204   }\r
205 \r
206   public ObjectId getCreatedBy() {\r
207     return createdBy;\r
208   }\r
209 \r
210   public void setCreatedBy(ObjectId createdBy) {\r
211     this.createdBy = createdBy;\r
212   }\r
213 \r
214   public ObjectId getUpdatedBy() {\r
215     return updatedBy;\r
216   }\r
217 \r
218   public void setUpdatedBy(ObjectId updatedBy) {\r
219     this.updatedBy = updatedBy;\r
220   }\r
221 \r
222   public boolean isSimulationMode() {\r
223     return simulationMode;\r
224   }\r
225 \r
226   public void setSimulationMode(boolean simulationMode) {\r
227     this.simulationMode = simulationMode;\r
228   }\r
229 \r
230   @Override\r
231   public String toString() {\r
232     return Convert.objectToJson(this);\r
233   }\r
234 }\r