added svcapi ui and camunda code
[it/otf.git] / otf-service-api / src / main / java / org / oran / otf / common / model / Group.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.List;\r
22 \r
23 import org.bson.types.ObjectId;\r
24 import org.springframework.data.annotation.Id;\r
25 import org.springframework.data.mongodb.core.mapping.Document;\r
26 \r
27 @Document(collection = "groups")\r
28 public class Group implements Serializable {\r
29 \r
30   private static final long serialVersionUID = 1L;\r
31 \r
32   @Id\r
33   private ObjectId _id;\r
34   private String groupName;\r
35   private String groupDescription;\r
36   private List<ObjectId> mechanizedIds;\r
37   private ObjectId ownerId;\r
38   private List<Role> roles;\r
39   private List<GroupMember> members;\r
40   private ObjectId parentGroupId;\r
41 \r
42   public ObjectId get_id() {\r
43     return _id;\r
44   }\r
45 \r
46   public void set_id(ObjectId _id) {\r
47     this._id = _id;\r
48   }\r
49 \r
50   public String getGroupName() {\r
51     return groupName;\r
52   }\r
53 \r
54   public void setGroupName(String groupName) {\r
55     this.groupName = groupName;\r
56   }\r
57 \r
58   public String getGroupDescription() {\r
59     return groupDescription;\r
60   }\r
61 \r
62   public void setGroupDescription(String groupDescription) {\r
63     this.groupDescription = groupDescription;\r
64   }\r
65 \r
66   public List<ObjectId> getMechanizedIds() {\r
67     return mechanizedIds;\r
68   }\r
69 \r
70   public void setMechanizedIds(List<ObjectId> mechanizedIds) {\r
71     this.mechanizedIds = mechanizedIds;\r
72   }\r
73 \r
74   public ObjectId getOwnerId() {\r
75     return ownerId;\r
76   }\r
77 \r
78   public void setOwnerId(ObjectId ownerId) {\r
79     this.ownerId = ownerId;\r
80   }\r
81 \r
82   public List<Role> getRoles() {\r
83     return roles;\r
84   }\r
85 \r
86   public void setRoles(List<Role> roles) {\r
87     this.roles = roles;\r
88   }\r
89 \r
90     public List<GroupMember> getMembers() {\r
91     return members;\r
92   }\r
93 \r
94   public void setMembers(List<GroupMember> members) {\r
95     this.members = members;\r
96   }\r
97 \r
98   public ObjectId getParentGroupId() {\r
99     return parentGroupId;\r
100   }\r
101 \r
102   public void setParentGroupId(ObjectId parentGroupId) {\r
103     this.parentGroupId = parentGroupId;\r
104   }\r
105 \r
106   @Override\r
107   public String toString() {\r
108     return Convert.objectToJson(this);\r
109   }\r
110 }\r