1
|
package eu.dnetlib.openaire.community;
|
2
|
|
3
|
import java.util.List;
|
4
|
|
5
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
6
|
import io.swagger.annotations.ApiModelProperty;
|
7
|
|
8
|
@JsonAutoDetect
|
9
|
public class CommunityWritableProperties {
|
10
|
|
11
|
@ApiModelProperty("community name")
|
12
|
private String name;
|
13
|
|
14
|
@ApiModelProperty("community short name")
|
15
|
private String shortName;
|
16
|
|
17
|
@ApiModelProperty("community description")
|
18
|
private String description;
|
19
|
|
20
|
@ApiModelProperty("http url for the community logo")
|
21
|
private String logoUrl;
|
22
|
|
23
|
@ApiModelProperty("list of community manager emails")
|
24
|
private List<String> managers;
|
25
|
|
26
|
@ApiModelProperty("list of subjects (keywords) that characterise this community")
|
27
|
private List<String> subjects;
|
28
|
|
29
|
@ApiModelProperty("status of the community, drives its visibility")
|
30
|
private CommunityStatus status;
|
31
|
|
32
|
|
33
|
public static CommunityWritableProperties fromDetails(final CommunityDetails details) {
|
34
|
CommunityWritableProperties p = new CommunityWritableProperties();
|
35
|
p.setName(details.getName());
|
36
|
p.setShortName(details.getShortName());
|
37
|
p.setDescription(details.getDescription());
|
38
|
p.setLogoUrl(details.getLogoUrl());
|
39
|
p.setManagers(details.getManagers());
|
40
|
p.setSubjects(details.getSubjects());
|
41
|
p.setStatus(details.getStatus());
|
42
|
return p;
|
43
|
}
|
44
|
|
45
|
public String getName() {
|
46
|
return name;
|
47
|
}
|
48
|
|
49
|
public void setName(final String name) {
|
50
|
this.name = name;
|
51
|
}
|
52
|
|
53
|
public String getShortName() {
|
54
|
return shortName;
|
55
|
}
|
56
|
|
57
|
public void setShortName(final String shortName) {
|
58
|
this.shortName = shortName;
|
59
|
}
|
60
|
|
61
|
public String getDescription() {
|
62
|
return description;
|
63
|
}
|
64
|
|
65
|
public void setDescription(final String description) {
|
66
|
this.description = description;
|
67
|
}
|
68
|
|
69
|
public List<String> getManagers() {
|
70
|
return managers;
|
71
|
}
|
72
|
|
73
|
public void setManagers(final List<String> managers) {
|
74
|
this.managers = managers;
|
75
|
}
|
76
|
|
77
|
public String getLogoUrl() {
|
78
|
return logoUrl;
|
79
|
}
|
80
|
|
81
|
public void setLogoUrl(final String logoUrl) {
|
82
|
this.logoUrl = logoUrl;
|
83
|
}
|
84
|
|
85
|
public List<String> getSubjects() {
|
86
|
return subjects;
|
87
|
}
|
88
|
|
89
|
public void setSubjects(final List<String> subjects) {
|
90
|
this.subjects = subjects;
|
91
|
}
|
92
|
|
93
|
public CommunityStatus getStatus() {
|
94
|
return status;
|
95
|
}
|
96
|
|
97
|
public void setStatus(final CommunityStatus status) {
|
98
|
this.status = status;
|
99
|
}
|
100
|
|
101
|
}
|