1
2
3
4
5
6
7 package ch.colabproject.colab.api.rest.project.bean;
8
9 import ch.colabproject.colab.api.model.DuplicationParam;
10 import ch.colabproject.colab.api.model.common.Illustration;
11 import ch.colabproject.colab.api.model.project.ProjectType;
12 import ch.colabproject.colab.generator.model.annotations.ExtractJavaDoc;
13 import java.io.Serializable;
14 import java.util.ArrayList;
15 import java.util.List;
16 import org.apache.commons.lang3.builder.EqualsBuilder;
17 import org.apache.commons.lang3.builder.HashCodeBuilder;
18
19
20
21
22
23
24 @ExtractJavaDoc
25 public class ProjectCreationData implements Serializable {
26
27 private static final long serialVersionUID = 1L;
28
29
30
31
32
33
34
35
36 private ProjectType type;
37
38
39
40
41 private String name;
42
43
44
45
46 private String description;
47
48
49
50
51
52
53 private Illustration illustration;
54
55
56
57
58 private Long baseProjectId;
59
60
61
62
63 private DuplicationParam duplicationParam;
64
65
66
67
68 private List<String> guestsEmail = new ArrayList<>();
69
70
71
72
73
74
75
76
77 public ProjectType getType() {
78 return type;
79 }
80
81
82
83
84 public void setType(ProjectType type) {
85 this.type = type;
86 }
87
88
89
90
91 public String getName() {
92 return name;
93 }
94
95
96
97
98 public void setName(String name) {
99 this.name = name;
100 }
101
102
103
104
105 public String getDescription() {
106 return description;
107 }
108
109
110
111
112 public void setDescription(String description) {
113 this.description = description;
114 }
115
116
117
118
119 public Illustration getIllustration() {
120 return illustration;
121 }
122
123
124
125
126 public void setIllustration(Illustration illustration) {
127 this.illustration = illustration;
128 }
129
130
131
132
133 public Long getBaseProjectId() {
134 return baseProjectId;
135 }
136
137
138
139
140 public void setBaseProjectId(Long baseProjectId) {
141 this.baseProjectId = baseProjectId;
142 }
143
144
145
146
147 public DuplicationParam getDuplicationParam() {
148 return duplicationParam;
149 }
150
151
152
153
154
155 public void setDuplicationParam(DuplicationParam duplicationParam) {
156 this.duplicationParam = duplicationParam;
157 }
158
159
160
161
162 public List<String> getGuestsEmail() {
163 return guestsEmail;
164 }
165
166
167
168
169 public void setGuestsEmail(List<String> guestsEmail) {
170 this.guestsEmail = guestsEmail;
171 }
172
173
174
175
176
177 @Override
178 public int hashCode() {
179 return new HashCodeBuilder()
180 .append(this.type)
181 .append(this.name)
182 .append(this.description)
183 .append(this.illustration)
184 .append(this.baseProjectId)
185 .append(this.duplicationParam)
186 .toHashCode();
187 }
188
189 @Override
190 public boolean equals(Object obj) {
191 if (this == obj) {
192 return true;
193 }
194 if (obj == null) {
195 return false;
196 }
197 if (getClass() != obj.getClass()) {
198 return false;
199 }
200 final ProjectCreationData other = (ProjectCreationData) obj;
201 return new EqualsBuilder()
202 .append(this.type, other.type)
203 .append(this.name, other.name)
204 .append(this.description, other.description)
205 .append(this.illustration, other.illustration)
206 .append(this.baseProjectId, other.baseProjectId)
207 .append(this.duplicationParam, other.duplicationParam)
208 .isEquals();
209 }
210
211 @Override
212 public String toString() {
213 return "ProjectCreationData{" + " type=" + type.name() + ", name=" + name + ", description="
214 + description
215 + ", illustration=" + illustration
216 + ", baseProjectId=" + baseProjectId + ", duplicationParam=" + duplicationParam
217 + ", guestsEmail=" + guestsEmail + "}";
218 }
219
220 }