Total Complexity | 1 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | # -*- coding: utf-8 -*- |
||
2 | |||
3 | from App.class_init import InitializeClass |
||
4 | from bika.lims.catalog.bika_catalog_tool import BikaCatalogTool as BaseCatalog |
||
5 | from bika.lims.interfaces import IAuditLogCatalog |
||
6 | from zope.interface import implements |
||
7 | |||
8 | |||
9 | # Using a variable to avoid plain strings in code |
||
10 | CATALOG_AUDITLOG = "auditlog_catalog" |
||
11 | |||
12 | # Defining the indexes for this catalog |
||
13 | _indexes = { |
||
14 | "title": "FieldIndex", |
||
15 | "getId": "FieldIndex", |
||
16 | "portal_type": "FieldIndex", |
||
17 | "object_provides": "KeywordIndex", |
||
18 | "UID": "UUIDIndex", |
||
19 | "review_state": "FieldIndex", |
||
20 | "is_active": "BooleanIndex", |
||
21 | "modified": "DateIndex", |
||
22 | "modifiers": "KeywordIndex", |
||
23 | "actor": "FieldIndex", |
||
24 | "action": "FieldIndex", |
||
25 | "listing_searchable_text": "TextIndexNG3", |
||
26 | "snapshot_created": "DateIndex", |
||
27 | "snapshot_version": "FieldIndex", |
||
28 | "path": "PathIndex", |
||
29 | } |
||
30 | # Defining the columns for this catalog |
||
31 | _columns = [] |
||
32 | # Defining the types for this catalog |
||
33 | _types = [] |
||
34 | |||
35 | catalog_auditlog_definition = { |
||
36 | CATALOG_AUDITLOG: { |
||
37 | "types": _types, |
||
38 | "indexes": _indexes, |
||
39 | "columns": _columns, |
||
40 | } |
||
41 | } |
||
42 | |||
43 | |||
44 | class AuditLogCatalog(BaseCatalog): |
||
45 | """Audit Log Catalog |
||
46 | """ |
||
47 | implements(IAuditLogCatalog) |
||
48 | |||
49 | def __init__(self): |
||
50 | BaseCatalog.__init__( |
||
51 | self, CATALOG_AUDITLOG, "Audit Log Catalog", "AuditLogCatalog") |
||
52 | |||
53 | |||
54 | InitializeClass(AuditLogCatalog) |
||
55 |