added svcapi ui and camunda code
[it/otf.git] / otf-camunda / src / main / java / org / oran / otf / common / model / TestHead.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;\r
18 \r
19 import org.oran.otf.common.utility.gson.Convert;\r
20 import java.io.Serializable;\r
21 import java.util.Date;\r
22 import java.util.Map;\r
23 \r
24 import org.bson.types.ObjectId;\r
25 import org.springframework.data.annotation.Id;\r
26 import org.springframework.data.mongodb.core.index.Indexed;\r
27 import org.springframework.data.mongodb.core.mapping.Document;\r
28 \r
29 @Document(collection = "testHeads")\r
30 public class TestHead implements Serializable {\r
31 \r
32   private static final long serialVersionUID = 1L;\r
33 \r
34   @Id\r
35   private ObjectId _id;\r
36 \r
37   @Indexed(unique = true)\r
38   private String testHeadName;\r
39 \r
40   private String testHeadDescription;\r
41   private String hostname;\r
42   private String port;\r
43   private String resourcePath;\r
44   private ObjectId creatorId;\r
45   private ObjectId groupId;\r
46   private String authorizationType;\r
47   private String authorizationCredential;\r
48   private Boolean authorizationEnabled;\r
49   private Map<String, Object> vthInputTemplate;\r
50   private Date createdAt;\r
51   private Date updatedAt;\r
52   private ObjectId updatedBy;\r
53   private Boolean isPublic;\r
54   public TestHead() {\r
55   }\r
56 \r
57   public TestHead(\r
58           ObjectId _id,\r
59           String testHeadName,\r
60           String testHeadDescription,\r
61           String hostname,\r
62           String port,\r
63           String resourcePath,\r
64           ObjectId creatorId,\r
65           ObjectId groupId,\r
66           String authorizationType,\r
67           String authorizationCredential,\r
68           boolean authorizationEnabled,\r
69           Map<String, Object> vthInputTemplate,\r
70           Date createdAt,\r
71           Date updatedAt,\r
72           ObjectId updatedBy,\r
73           Boolean isPublic) {\r
74     this._id = _id;\r
75     this.testHeadName = testHeadName;\r
76     this.testHeadDescription = testHeadDescription;\r
77     this.hostname = hostname;\r
78     this.port = port;\r
79     this.resourcePath = resourcePath;\r
80     this.creatorId = creatorId;\r
81     this.groupId = groupId;\r
82     this.authorizationType = authorizationType;\r
83     this.authorizationCredential = authorizationCredential;\r
84     this.authorizationEnabled = authorizationEnabled;\r
85     this.vthInputTemplate = vthInputTemplate;\r
86     this.createdAt = createdAt;\r
87     this.updatedAt = updatedAt;\r
88     this.updatedBy = updatedBy;\r
89     this.isPublic = isPublic;\r
90   }\r
91 \r
92   public ObjectId get_id() {\r
93     return _id;\r
94   }\r
95 \r
96   public void set_id(ObjectId _id) {\r
97     this._id = _id;\r
98   }\r
99 \r
100   public String getTestHeadName() {\r
101     return testHeadName;\r
102   }\r
103 \r
104   public void setTestHeadName(String testHeadName) {\r
105     this.testHeadName = testHeadName;\r
106   }\r
107 \r
108   public String getTestHeadDescription() {\r
109     return testHeadDescription;\r
110   }\r
111 \r
112   public void setTestHeadDescription(String testHeadDescription) {\r
113     this.testHeadDescription = testHeadDescription;\r
114   }\r
115 \r
116   public String getHostname() {\r
117     return hostname;\r
118   }\r
119 \r
120   public void setHostname(String hostname) {\r
121     this.hostname = hostname;\r
122   }\r
123 \r
124   public String getPort() {\r
125     return port;\r
126   }\r
127 \r
128   public void setPort(String port) {\r
129     this.port = port;\r
130   }\r
131 \r
132   public String getResourcePath() {\r
133     return resourcePath;\r
134   }\r
135 \r
136   public void setResourcePath(String resourcePath) {\r
137     this.resourcePath = resourcePath;\r
138   }\r
139 \r
140   public ObjectId getCreatorId() {\r
141     return creatorId;\r
142   }\r
143 \r
144   public void setCreatorId(ObjectId creatorId) {\r
145     this.creatorId = creatorId;\r
146   }\r
147 \r
148   public ObjectId getGroupId() {\r
149     return groupId;\r
150   }\r
151 \r
152   public void setGroupId(ObjectId groupId) {\r
153     this.groupId = groupId;\r
154   }\r
155 \r
156   public String getAuthorizationCredential() {\r
157     return authorizationCredential;\r
158   }\r
159 \r
160   public String getAuthorizationType() {\r
161     return authorizationType;\r
162   }\r
163 \r
164   public void setAuthorizationType(String authorizationType) {\r
165     this.authorizationType = authorizationType;\r
166   }\r
167 \r
168   public void setAuthorizationCredential(String authorizationCredential) {\r
169     this.authorizationCredential = authorizationCredential;\r
170   }\r
171 \r
172   public Boolean getAuthorizationEnabled() {\r
173     return authorizationEnabled;\r
174   }\r
175 \r
176   public void setAuthorizationEnabled(Boolean authorizationEnabled) {\r
177     this.authorizationEnabled = authorizationEnabled;\r
178   }\r
179 \r
180   public Map<String, Object> getVthInputTemplate() {\r
181     return vthInputTemplate;\r
182   }\r
183 \r
184   public void setVthInputTemplate(Map<String, Object> vthInputTemplate) {\r
185     this.vthInputTemplate = vthInputTemplate;\r
186   }\r
187 \r
188   public Date getCreatedAt() {\r
189     return createdAt;\r
190   }\r
191 \r
192   public void setCreatedAt(Date createdAt) {\r
193     this.createdAt = createdAt;\r
194   }\r
195 \r
196   public Date getUpdatedAt() {\r
197     return updatedAt;\r
198   }\r
199 \r
200   public void setUpdatedAt(Date updatedAt) {\r
201     this.updatedAt = updatedAt;\r
202   }\r
203 \r
204   public ObjectId getUpdatedBy() {\r
205     return updatedBy;\r
206   }\r
207 \r
208   public void setUpdatedBy(ObjectId updatedBy) {\r
209     this.updatedBy = updatedBy;\r
210   }\r
211 \r
212   public Boolean isPublic() {\r
213     return isPublic;\r
214   }\r
215 \r
216   public void setPublic(Boolean aPublic) {\r
217     isPublic = aPublic;\r
218   }\r
219 \r
220   @Override\r
221   public String toString() {\r
222     return Convert.objectToJson(this);\r
223   }\r
224 }\r