Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
TargetAccessRuleBean |
|
| 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.bean; | |
11 | ||
12 | ||
13 | import org.openpermis.policy.Predicate; | |
14 | import org.openpermis.policy.TargetAccessRule; | |
15 | ||
16 | ||
17 | ||
18 | /** | |
19 | * A target access rule defines a set of roles that are allowed to access a target. | |
20 | * @since 0.1.0 | |
21 | */ | |
22 | public interface TargetAccessRuleBean | |
23 | extends TargetAccessRule, PartBean | |
24 | { | |
25 | ||
26 | //---- Methods | |
27 | ||
28 | /** | |
29 | * Returns the targets of this access rule. | |
30 | * @return the targets of this access rule. | |
31 | * @since 0.3.0 | |
32 | */ | |
33 | public TargetBeanCollection getTargets (); | |
34 | ||
35 | /** | |
36 | * Sets the targets of this access rule. | |
37 | * @param targets the new targets of this access rule. | |
38 | * @since 0.1.0 | |
39 | */ | |
40 | public void setTargets (TargetBeanCollection targets); | |
41 | ||
42 | /** | |
43 | * Returns the condition of this access rule. | |
44 | * @return a {@link Predicate} the condition of this access rule. | |
45 | * @since 0.1.0 | |
46 | */ | |
47 | public Predicate getCondition (); | |
48 | ||
49 | /** | |
50 | * Sets the condition of this access rule. | |
51 | * @param condition a {@link Predicate}. | |
52 | * @since 0.1.0 | |
53 | */ | |
54 | public void setCondition (Predicate condition); | |
55 | ||
56 | /** | |
57 | * Returns the roles to which this rule grants access. | |
58 | * @return the roles to which this rule grants access. | |
59 | * @since 0.1.0 | |
60 | */ | |
61 | public RoleCollection getRoles (); | |
62 | ||
63 | /** | |
64 | * Sets the roles to which this rule grants access. | |
65 | * @param roles the new roles to which this rule grants access. | |
66 | * @since 0.1.0 | |
67 | */ | |
68 | public void setRoles (RoleCollection roles); | |
69 | ||
70 | /** | |
71 | * Removes a target child element. | |
72 | * @since 0.1.0 | |
73 | */ | |
74 | public void removeTarget (TargetBean part); | |
75 | ||
76 | /** | |
77 | * Removes an obligation child element. | |
78 | * @since 0.3.0 | |
79 | */ | |
80 | public void removeObligation (ObligationBean part); | |
81 | ||
82 | /** | |
83 | * Returns the obligations of this rule. | |
84 | * @return the obligations of this rule. | |
85 | * @since 0.3.0 | |
86 | */ | |
87 | public ObligationBeanCollection getObligations (); | |
88 | ||
89 | /** | |
90 | * Sets the obligations of this rule. | |
91 | * @param obligations the new obligations of this rule. | |
92 | * @since 0.3.0 | |
93 | */ | |
94 | public void setObligations (ObligationBeanCollection obligations); | |
95 | ||
96 | ||
97 | ||
98 | } |