Passed
Push — master ( 98a6fb...9891f0 )
by Jordi
07:41
created

bika.lims.exportimport.genericsetup.interfaces   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 6
eloc 11
dl 0
loc 38
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A IFieldNode.get_field_value() 0 2 1
A IFieldNode.set_node_value() 0 2 1
A IFieldNode.parse_json_value() 0 2 1
A IFieldNode.get_node_value() 0 2 1
A IFieldNode.set_field_value() 0 2 1
A IFieldNode.get_json_value() 0 2 1
1
# -*- coding: utf-8 -*-
2
3
from Products.GenericSetup.interfaces import INode
4
from zope.interface import Interface
5
6
7
class IFieldNode(INode):
8
    """Import/Export fields
9
    """
10
11
    def get_field_value():
12
        """Get the field value with the accessor
13
        """
14
15
    def set_field_value():
16
        """Set the field value with the mutator
17
        """
18
19
    def get_json_value():
20
        """Get the JSON converted field value
21
        """
22
23
    def parse_json_value(value):
24
        """Parse the JSON value
25
        """
26
27
    def set_node_value(node):
28
        """Set the value of the node to the field
29
        """
30
31
    def get_node_value(value):
32
        """Get a node from the value
33
        """
34
35
36
class IRecordField(Interface):
37
    """Marker interface for Record Fields
38
39
    N.B. There is no official interface provided by this Field!
40
    """
41