MapPermission.java
1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package fi.codecrew.moya.enums.apps;
import fi.codecrew.moya.enums.BortalApplication;
public enum MapPermission implements IAppPermission {
MANAGE_OTHERS, // ("Manage other users reservations in map"),
BUY_PLACES, // ("Reserve and buy places from map"),
VIEW, // ("View maps"),
MANAGE_MAPS, RELEASE_PLACE, // ("Create and modify maps")
;
public static final String S_MANAGE_OTHERS = "MAP/MANAGE_OTHERS";
public static final String S_BUY_PLACES = "MAP/BUY_PLACES";
public static final String S_VIEW = "MAP/VIEW";
public static final String S_MANAGE_MAPS = "MAP/MANAGE_MAPS";
public static final String S_RELEASE_PLACE = "MAP/RELEASE_PLACE";
private final String fullName;
private final String key;
private static final String I18N_HEADER = "bortalApplication.map.";
private MapPermission() {
key = I18N_HEADER + name();
fullName = new StringBuilder().append(getParent().toString()).append(DELIMITER).append(toString()).toString();
}
@Override
public BortalApplication getParent() {
return BortalApplication.MAP;
}
@Override
public String getFullName() {
return fullName;
}
@Override
public String getI18nKey() {
return key;
}
}