1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package eu.ehri.project.acl;
21
22 import com.tinkerpop.blueprints.Vertex;
23 import eu.ehri.project.definitions.Entities;
24 import eu.ehri.project.models.PermissionGrant;
25 import eu.ehri.project.models.base.Accessible;
26 import eu.ehri.project.models.base.Entity;
27 import eu.ehri.project.models.base.PermissionScope;
28
29 import java.util.Collection;
30 import java.util.Collections;
31
32
33
34
35
36 public enum SystemScope implements PermissionScope {
37
38 INSTANCE;
39
40
41
42
43
44
45 public static PermissionScope getInstance() {
46 return INSTANCE;
47 }
48
49 @Override
50 public <T extends Entity> T as(Class<T> cls) {
51 throw new UnsupportedOperationException();
52 }
53
54 @Override
55 public String getId() {
56 return Entities.SYSTEM;
57 }
58
59 @Override
60 public String getType() {
61 return Entities.SYSTEM;
62 }
63
64 @Override
65 public String getIdentifier() {
66 return Entities.SYSTEM;
67 }
68
69 @Override
70 public Vertex asVertex() {
71 return null;
72 }
73
74 @Override
75 public Iterable<PermissionGrant> getPermissionGrants() {
76 return Collections.emptyList();
77 }
78
79 public Iterable<PermissionScope> getPermissionScopes() {
80 return Collections.emptyList();
81 }
82
83 @Override
84 public Iterable<Accessible> getContainedItems() {
85 return Collections.emptyList();
86 }
87
88 @Override
89 public Iterable<Accessible> getAllContainedItems() {
90 return Collections.emptyList();
91 }
92
93 @Override
94 public Collection<String> idPath() {
95 return Collections.emptyList();
96 }
97
98 @Override
99 public <T> T getProperty(String key) {
100 return null;
101 }
102
103 @Override
104 public <T> T getProperty(Enum<?> key) {
105 return null;
106 }
107
108 @Override
109 public java.util.Set<String> getPropertyKeys() {
110 return Collections.emptySet();
111 }
112 }