1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.profiler.rules;
18
19 import java.io.Serializable;
20
21 /***
22 * PrincipalRule is a paired association from principal to rule.
23 * This pair is unique in that there can only be a one entry for a principal which maps to a rule.
24 * This association is used by the profiler to determine which profiling rule to apply for a principal.
25 * If a rule is not found, there should be a default system wide rule.
26 *
27 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
28 * @version $Id: PrincipalRule.java 516448 2007-03-09 16:25:47Z ate $
29 */
30 public interface PrincipalRule extends Serializable
31 {
32 /***
33 * Gets the name of the principal in this principal/rule/locator pair association.
34 * The principal name identifies the uniqueness of the relationship.
35 * It is used for keyed lookups to find the rule associated with this principal.
36 *
37 * @return The name of the principal in this association.
38 */
39 String getPrincipalName();
40
41 /***
42 * Sets the name of the principal in this principal/rule/locator pair association.
43 * The principal name identifies the uniqueness of the relationship.
44 * It is used for keyed lookups to find the rule associated with this principal.
45 *
46 * @param name The name of the principal in this association.
47 */
48 void setPrincipalName(String name);
49
50 /***
51 * Gets the name of the locator in this principal/rule/locator pair association.
52 * The principal + locator name identifies the uniqueness of the relationship.
53 * It is used for keyed lookups to find the rule associated with this principal
54 * for a given locator
55 *
56 * @return The name of the locator in this association.
57 */
58 String getLocatorName();
59
60 /***
61 * Sets the name of the locator in this principal/locator/rule pair association.
62 * The principal name + locator name identifies the uniqueness of the relationship.
63 * It is used for keyed lookups to find the rule associated with this principal
64 * for a given locator
65 *
66 * @param name The name of the locator in this association.
67 */
68 void setLocatorName(String name);
69
70
71 /***
72 * Gets the profiling rule associated with the principal name
73 *
74 * @return The profiling rule associated with the principal name
75 */
76 ProfilingRule getProfilingRule();
77
78 /***
79 * Sets the profiling rule associated with the principal name
80 *
81 * @param rule The profiling rule associated with the principal name
82 */
83 void setProfilingRule(ProfilingRule rule);
84
85 }