1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.neethi;
17
18 /**
19 * PolicyRegistry contains (URI,Policy) pairs and it is used to resolve explicit
20 * Policy references.
21 *
22 */
23 public interface PolicyRegistry {
24
25 /**
26 * Associates a key with a Policy
27 *
28 * @param key
29 * the key that the specified Policy to be associated
30 * @param policy
31 * the policy to be associated with the key
32 */
33 public void register(String key, Policy policy);
34
35 /**
36 * Returns the Policy that the specified key is mapped. Retruns null if no
37 * Policy is associated with that key.
38 *
39 * @param key
40 * the key whose associated Policy is to be returned.
41 * @return the policy associated with the specified key.
42 */
43 public Policy lookup(String key);
44
45 /**
46 * Removes the mapping for this key if present.
47 *
48 * @param key
49 * the key whose mapping is to be removed
50 */
51 public void remove(String key);
52
53 }