Passed
Push — master ( 804f45...1fa2c0 )
by Jordi
04:08
created

build.bika.lims.catalog.auditlog_catalog   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 35
dl 0
loc 55
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A AuditLogCatalog.__init__() 0 3 1
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