1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.logging.log4j.audit.catalog;
18
19 import org.apache.logging.log4j.catalog.api.Attribute;
20 import org.apache.logging.log4j.catalog.api.Event;
21
22 import java.util.List;
23 import java.util.Map;
24
25 import static org.apache.logging.log4j.catalog.api.constant.Constants.DEFAULT_CATALOG;
26
27
28
29
30 public interface CatalogManager {
31
32 default Event getEvent(String eventName) {
33 return getEvent(eventName, DEFAULT_CATALOG);
34 }
35
36 Event getEvent(String eventName, String catalogId);
37
38 default List<String> getRequiredContextAttributes(String eventName) {
39 return getRequiredContextAttributes(eventName, DEFAULT_CATALOG);
40 }
41
42 List<String> getRequiredContextAttributes(String eventName, String catalogId);
43
44 default List<String> getAttributeNames(String eventName) {
45 return getAttributeNames(eventName, DEFAULT_CATALOG);
46 }
47
48 List<String> getAttributeNames(String eventName, String catalogId);
49
50 default Map<String, Attribute> getAttributes(String eventName) {
51 return getAttributes(eventName, DEFAULT_CATALOG);
52 }
53
54 Map<String, Attribute> getAttributes(String eventName, String catalogId);
55
56 Map<String, Attribute> getRequestContextAttributes();
57
58 default Attribute getAttribute(String attributeName) {
59 return getAttribute(attributeName, DEFAULT_CATALOG);
60 }
61
62 Attribute getAttribute(String attributeName, String catalogId);
63 }