Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
RoleHierarchy |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright (c) 2009, Swiss Federal Department of Defence Civil Protection and Sport | |
3 | * (http://www.vbs.admin.ch) | |
4 | * Copyright (c) 2009, Ergon Informatik AG (http://www.ergon.ch) | |
5 | * All rights reserved. | |
6 | * | |
7 | * Licensed under the Open Permis License which accompanies this distribution, | |
8 | * and is available at http://www.openpermis.org/BSDlicenceKent.txt | |
9 | */ | |
10 | package org.openpermis.policy; | |
11 | ||
12 | import java.util.Set; | |
13 | ||
14 | /** | |
15 | * A hierarchy of roles. | |
16 | * @since 0.1.0 | |
17 | */ | |
18 | public interface RoleHierarchy | |
19 | extends Part, Identifiable | |
20 | { | |
21 | ||
22 | //---- Methods | |
23 | ||
24 | /** | |
25 | * Returns all superior roles of a role including the role itself. | |
26 | * <p>A role is superior to the specified role if it inherits the specified role's privileges. | |
27 | * @param roleName identifies a role in the hierarchy. | |
28 | * @return all superior roles of the role including the role itself. | |
29 | * @since 0.3.0 | |
30 | */ | |
31 | public Set<String> getSuperRoles (String roleName); | |
32 | ||
33 | /** | |
34 | * Returns all subordinate roles of a role including the role itself. | |
35 | * <p>A role is subordinate to the specified role if the specified role inherits its privileges. | |
36 | * @param roleName identifies a role in the hierarchy. | |
37 | * @return all subordinate roles of the role including the role itself. | |
38 | * @since 0.3.0 | |
39 | */ | |
40 | public Set<String> getSubRoles (String roleName); | |
41 | ||
42 | } |