Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
RoleAssignmentRule |
|
| 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 | import org.openpermis.Subject; | |
15 | ||
16 | ||
17 | /** | |
18 | * A rule for assigning roles to subjects. | |
19 | * @since 0.1.0 | |
20 | */ | |
21 | public interface RoleAssignmentRule | |
22 | extends Part | |
23 | { | |
24 | ||
25 | //---- Methods | |
26 | ||
27 | /** | |
28 | * Verifies the assignment of the given roles to the given subject according to this rule, | |
29 | * using the clock. | |
30 | * @param subject a {@link Subject}. | |
31 | * @param assertedRoles a set of {@link Role}s. | |
32 | * @param timeStamp a {@link TimeStamp}. | |
33 | * @return the roles which are correctly assigned. | |
34 | * @since 0.1.0 | |
35 | */ | |
36 | public Set<Role> verifyRoleAssignment ( | |
37 | Subject subject, | |
38 | Set<Role> assertedRoles, | |
39 | TimeStamp timeStamp | |
40 | ); | |
41 | ||
42 | } |