added svcapi ui and camunda code
[it/otf.git] / otf-service-api / src / main / java / org / oran / otf / common / model / Group.java
diff --git a/otf-service-api/src/main/java/org/oran/otf/common/model/Group.java b/otf-service-api/src/main/java/org/oran/otf/common/model/Group.java
new file mode 100644 (file)
index 0000000..9214407
--- /dev/null
@@ -0,0 +1,110 @@
+/*  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;\r
+\r
+import org.oran.otf.common.utility.gson.Convert;\r
+import java.io.Serializable;\r
+import java.util.List;\r
+\r
+import org.bson.types.ObjectId;\r
+import org.springframework.data.annotation.Id;\r
+import org.springframework.data.mongodb.core.mapping.Document;\r
+\r
+@Document(collection = "groups")\r
+public class Group implements Serializable {\r
+\r
+  private static final long serialVersionUID = 1L;\r
+\r
+  @Id\r
+  private ObjectId _id;\r
+  private String groupName;\r
+  private String groupDescription;\r
+  private List<ObjectId> mechanizedIds;\r
+  private ObjectId ownerId;\r
+  private List<Role> roles;\r
+  private List<GroupMember> members;\r
+  private ObjectId parentGroupId;\r
+\r
+  public ObjectId get_id() {\r
+    return _id;\r
+  }\r
+\r
+  public void set_id(ObjectId _id) {\r
+    this._id = _id;\r
+  }\r
+\r
+  public String getGroupName() {\r
+    return groupName;\r
+  }\r
+\r
+  public void setGroupName(String groupName) {\r
+    this.groupName = groupName;\r
+  }\r
+\r
+  public String getGroupDescription() {\r
+    return groupDescription;\r
+  }\r
+\r
+  public void setGroupDescription(String groupDescription) {\r
+    this.groupDescription = groupDescription;\r
+  }\r
+\r
+  public List<ObjectId> getMechanizedIds() {\r
+    return mechanizedIds;\r
+  }\r
+\r
+  public void setMechanizedIds(List<ObjectId> mechanizedIds) {\r
+    this.mechanizedIds = mechanizedIds;\r
+  }\r
+\r
+  public ObjectId getOwnerId() {\r
+    return ownerId;\r
+  }\r
+\r
+  public void setOwnerId(ObjectId ownerId) {\r
+    this.ownerId = ownerId;\r
+  }\r
+\r
+  public List<Role> getRoles() {\r
+    return roles;\r
+  }\r
+\r
+  public void setRoles(List<Role> roles) {\r
+    this.roles = roles;\r
+  }\r
+\r
+    public List<GroupMember> getMembers() {\r
+    return members;\r
+  }\r
+\r
+  public void setMembers(List<GroupMember> members) {\r
+    this.members = members;\r
+  }\r
+\r
+  public ObjectId getParentGroupId() {\r
+    return parentGroupId;\r
+  }\r
+\r
+  public void setParentGroupId(ObjectId parentGroupId) {\r
+    this.parentGroupId = parentGroupId;\r
+  }\r
+\r
+  @Override\r
+  public String toString() {\r
+    return Convert.objectToJson(this);\r
+  }\r
+}\r