Project

General

Profile

1
package eu.dnetlib.uoaadmintoolslibrary.entities.fullEntities;
2

    
3
import com.fasterxml.jackson.annotation.JsonProperty;
4
import eu.dnetlib.uoaadmintoolslibrary.entities.PortalType;
5
import org.springframework.data.annotation.Id;
6

    
7
import java.util.List;
8

    
9
import eu.dnetlib.uoaadmintoolslibrary.entities.Entity;
10
import eu.dnetlib.uoaadmintoolslibrary.entities.Page;
11

    
12
public class PortalPage {
13

    
14
    @Id
15
    @JsonProperty("_id")
16
    private String id;
17

    
18
    private String route;
19
    private String name;
20
    private String type;
21
    private List<Entity> entities;
22
    private Boolean isEnabled;
23
    private PortalType portalType; // explore, connect, community, monitor
24

    
25
//    private Boolean connect;
26
//    private Boolean communities;
27
//    private Boolean openaire;
28

    
29
    // Posiitions where help texts are allowed for this page
30
    private Boolean top = false;
31
    private Boolean bottom = false;
32
    private Boolean left = false;
33
    private Boolean right = false;
34

    
35
    public PortalPage() {}
36

    
37
    public PortalPage(Page page) {
38
        this.setId(page.getId());
39
        this.setRoute(page.getRoute());
40
        this.setName(page.getName());
41
        this.setType(page.getType());
42
        this.setPortalType(page.getPortalType());
43
        this.setTop(page.getTop());
44
        this.setBottom(page.getBottom());
45
        this.setLeft(page.getLeft());
46
        this.setRight(page.getRight());
47
    }
48

    
49
    public String getId() {
50
        return id;
51
    }
52

    
53
    public void setId(String id) {
54
        this.id = id;
55
    }
56

    
57
    public String getRoute() {
58
        return route;
59
    }
60

    
61
    public void setRoute(String route) {
62
        this.route = route;
63
    }
64

    
65
    public String getName() {
66
        return name;
67
    }
68

    
69
    public void setName(String name) {
70
        this.name = name;
71
    }
72

    
73
    public String getType() {
74
        return type;
75
    }
76

    
77
    public void setType(String type) {
78
        this.type = type;
79
    }
80

    
81
    public List<Entity> getEntities() { return entities; }
82

    
83
    public void setEntities(List<Entity> entities) { this.entities = entities; }
84

    
85
    public Boolean getIsEnabled() { return isEnabled; }
86

    
87
    public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; }
88

    
89
    public String getPortalType() {
90
        if(portalType == null) {
91
            return null;
92
        }
93
        return portalType.name();
94
    }
95

    
96
    public void setPortalType(String portalType) {
97
        if(portalType == null) {
98
            this.portalType = null;
99
        } else {
100
            PortalType pType = PortalType.valueOf(portalType);
101
            this.portalType = pType;
102
        }
103
    }
104

    
105
    public Boolean getTop() {
106
        return top;
107
    }
108

    
109
    public void setTop(Boolean top) {
110
        this.top = top;
111
    }
112

    
113
    public Boolean getBottom() {
114
        return bottom;
115
    }
116

    
117
    public void setBottom(Boolean bottom) {
118
        this.bottom = bottom;
119
    }
120

    
121
    public Boolean getLeft() {
122
        return left;
123
    }
124

    
125
    public void setLeft(Boolean left) {
126
        this.left = left;
127
    }
128

    
129
    public Boolean getRight() {
130
        return right;
131
    }
132

    
133
    public void setRight(Boolean right) {
134
        this.right = right;
135
    }
136
}
(5-5/6)