Passed
Push — 2.x ( dbaaba...482653 )
by Ramon
05:18
created

IIdServerVariables.get_variables()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nop 2
1
# -*- coding: utf-8 -*-
2
#
3
# This file is part of SENAITE.CORE.
4
#
5
# SENAITE.CORE is free software: you can redistribute it and/or modify it under
6
# the terms of the GNU General Public License as published by the Free Software
7
# Foundation, version 2.
8
#
9
# This program is distributed in the hope that it will be useful, but WITHOUT
10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12
# details.
13
#
14
# You should have received a copy of the GNU General Public License along with
15
# this program; if not, write to the Free Software Foundation, Inc., 51
16
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
#
18
# Copyright 2018-2021 by it's authors.
19
# Some rights reserved, see README and LICENSE.
20
21
from zope.interface import Interface
22
23
# BBB: Only kept for backwards compatibility
24
from senaite.core.interfaces import ISamples as IAnalysisRequestsFolder
25
26
27
class ISenaiteSiteRoot(Interface):
28
    """Marker interface for the Senaite Site Root
29
    """
30
31
32
class IBikaLIMS(Interface):
33
    """Marker interface that defines a Zope 3 browser layer.
34
35
    N.B. Please use ISenaiteSite interface
36
    """
37
38
39
class ISenaiteSite(IBikaLIMS):
40
    """Marker interface for Zope 3 browser layers.
41
    """
42
43
44
class IAutoGenerateID(Interface):
45
    """Auto-generate ID with ID server
46
    """
47
48
49
class IMultiCatalogBehavior(Interface):
50
    """Support multiple catalogs for Dexterity contents
51
    """
52
53
54
class IActionHandlerPool(Interface):
55
    """Marker interface for the ActionHandlerPool utility
56
    """
57
58
59
class IAuditLog(Interface):
60
    """Marker interface for Audit Log
61
    """
62
63
64
class IAuditable(Interface):
65
    """Marker inteface for auditable contents
66
    """
67
68
69
class IDoNotSupportSnapshots(Interface):
70
    """Marker inteface for non-auditable contents
71
    """
72
73
74
class IAuditLogCatalog(Interface):
75
    """Audit Log Catalog
76
    """
77
78
79
class IGenerateID(Interface):
80
    """Marker Interface to generate an ID
81
    """
82
83
84
class IHaveNoBreadCrumbs(Interface):
85
    """Items which do not display breadcrumbs
86
    """
87
88
89
class IAutoImportLog(Interface):
90
    """Auto Import Log
91
    """
92
93
94
class IClientFolder(Interface):
95
    """Client folder
96
    """
97
98
99
class IClient(Interface):
100
    """Client
101
    """
102
103
104
class IBatchFolder(Interface):
105
    """Batch folder
106
    """
107
108
109
class IBatch(Interface):
110
    """Batch
111
    """
112
113
114
class IBatchLabels(Interface):
115
    """Batch label
116
    """
117
118
119
class IAnalysisRequest(Interface):
120
    """Analysis Request
121
    """
122
123
124
class IHaveDescendants(Interface):
125
    """Marker interface for objects that have Descendants
126
    """
127
128
    def getDescendants(self, all_descendants=False):
129
        """Returns descendants of this object
130
        :param all_descendants: if True, returns all descendants from hierarchy
131
        """
132
133
134
class IAnalysisRequestWithPartitions(IHaveDescendants):
135
    """Marker interface for Analysis Requests that have Partitions
136
    """
137
138
139
class IAnalysisRequestPartition(Interface):
140
    """Marker interface for Analysis Requests that are also Partitions
141
    """
142
143
144
class IAnalysisRequestRetest(Interface):
145
    """Marker interface for Analysis Requests that are Retests
146
    """
147
148
149
class IAnalysisRequestSecondary(Interface):
150
    """Marker interface for Secondary Analysis Requests
151
    """
152
153
154
class IAnalysisRequestAddView(Interface):
155
    """AR Add view
156
    """
157
158
159
class IInvoiceView(Interface):
160
    """Invoice View
161
    """
162
163
164
class IAnalysis(Interface):
165
    """Analysis
166
    """
167
168
169
class IRoutineAnalysis(Interface):
170
    """This adapter distinguishes normal analyses from Duplicates, References,
171
    Rejections, etc.
172
    """
173
174
175
class IAnalysisSpec(Interface):
176
    """Analysis Specs
177
    """
178
179
180
class IDuplicateAnalysis(Interface):
181
    """DuplicateAnalysis
182
    """
183
184
185
class IReferenceAnalysis(Interface):
186
    """Reference Analyses
187
    """
188
189
190
class IRejectAnalysis(Interface):
191
    """This adapter distinguishes normal analyses from Duplicates, References,
192
    Rejections, etc.
193
    """
194
195
196
class IReportFolder(Interface):
197
    """Report folder
198
    """
199
200
201
class ISampleCondition(Interface):
202
    """Sample Condition
203
    """
204
205
206
class ISampleConditions(Interface):
207
    """Sample Conditions
208
    """
209
210
211
class ISampleMatrix(Interface):
212
    """Sample Matrix
213
    """
214
215
216
class ISampleMatrices(Interface):
217
    """Sample Matrices
218
    """
219
220
221
class ISamplingDeviation(Interface):
222
    """Sampling Deviation
223
    """
224
225
226
class ISamplingDeviations(Interface):
227
    """Sampling Deviations
228
    """
229
230
231
class IWorksheetFolder(Interface):
232
    """WorksheetFolder
233
    """
234
235
236
class IWorksheet(Interface):
237
    """Worksheet
238
    """
239
240
241
class IReferenceSample(Interface):
242
    """Reference Sample
243
    """
244
245
246
class IReferenceSamplesFolder(Interface):
247
    """Reference Samples Folder
248
    """
249
250
251
class IReportsFolder(Interface):
252
    """Reports Folder
253
    """
254
255
256
class IInvoice(Interface):
257
    """Invoice
258
    """
259
260
261
class IBikaSetup(Interface):
262
    """Marker interface for the LIMS Setup
263
    """
264
265
266
class IAnalysisCategory(Interface):
267
    """Marker interface for an Analysis Category
268
    """
269
270
271
class IAnalysisCategories(Interface):
272
    """Marker interface for Analysis Categories
273
    """
274
275
276
class IBaseAnalysis(Interface):
277
    """Marker interface for base Analysis
278
    """
279
280
281
class IAnalysisService(Interface):
282
    """Marker interface for Analysis Service
283
    """
284
285
286
class IAnalysisServices(Interface):
287
    """Marker interface for Analysis Services
288
    """
289
290
291
class IAttachmentTypes(Interface):
292
    """Marker interface for Attachment types
293
    """
294
295
296
class ICalculation(Interface):
297
    """Marker interface for a Calculation
298
    """
299
300
301
class ICalculations(Interface):
302
    """Marker interface for Calculations
303
    """
304
305
306
class IContacts(Interface):
307
    """Marker interface for Contacts
308
    """
309
310
311
class IContact(Interface):
312
    """Marker interface for a single Contact
313
    """
314
315
316
class IDepartments(Interface):
317
    """Marker interface for a Departments
318
    """
319
320
321
class IContainer(Interface):
322
    """Marker interface for Container
323
    """
324
325
326
class IContainers(Interface):
327
    """Marker interface for Containers
328
    """
329
330
331
class IContainerType(Interface):
332
    """Marker interface for Container Type
333
    """
334
335
336
class IContainerTypes(Interface):
337
    """Marker interface for Container types
338
    """
339
340
341
class IIdentifierTypes(Interface):
342
    """TODO: Remove in senaite.core 1.3.3
343
    """
344
345
346
class IHaveIdentifiers(Interface):
347
    """TODO: Remove in senaite.core 1.3.3
348
    """
349
350
351
class IInstrument(Interface):
352
    """Marker interface for an Instrument
353
    """
354
355
356
class IInstruments(Interface):
357
    """Marker interface for Instruments
358
    """
359
360
361
class IInstrumentType(Interface):
362
    """Marker interface for an instrument type
363
    """
364
365
366
class IInstrumentTypes(Interface):
367
    """Marker interface for instrument types
368
    """
369
370
371
class IInstrumentLocation(Interface):
372
    """A physical place, where instruments can be located
373
    """
374
375
376
class IInstrumentLocations(Interface):
377
    """Physical places, where instruments can be located
378
    """
379
380
381
class IInstrumentCalibration(Interface):
382
    """Instrument Calibration
383
    """
384
385
386
class IInstrumentCertification(Interface):
387
    """Instrument Certification
388
    """
389
390
391
class IInstrumentValidation(Interface):
392
    """Instrument Validation
393
    """
394
395
396
class IAnalysisSpecs(Interface):
397
    """Marker interface for Analysis Specs
398
    """
399
400
401
class IDynamicResultsRange(Interface):
402
    """Marker interface for Dynamic Result Range
403
    """
404
405
406
class IAnalysisProfile(Interface):
407
    """Marker interface for an Analysis Profile
408
    """
409
410
411
class IAnalysisProfiles(Interface):
412
    """Marker interface for analysis profiles
413
    """
414
415
416
class IARTemplate(Interface):
417
    """Marker interface for an AR Template
418
    """
419
420
421
class IARTemplates(Interface):
422
    """Marker interface for AR templates
423
    """
424
425
426
class ILaboratory(Interface):
427
    """Marker interface for Laboratory
428
    """
429
430
431
class ILabContacts(Interface):
432
    """Marker interface for Lab contacts
433
    """
434
435
436
class ILabContact(Interface):
437
    """Marker interface for a lab contact
438
    """
439
440
441
class IManufacturer(Interface):
442
    """Marker interface for Manufacturer
443
    """
444
445
446
class IManufacturers(Interface):
447
    """Marker interface for Manufacturers
448
    """
449
450
451
class IMethods(Interface):
452
    """Marker interface for Methods
453
    """
454
455
456
class IMethod(Interface):
457
    """Marker interface for Method
458
    """
459
460
461
class IMultifile(Interface):
462
    """Marker interface for a Multifile
463
    """
464
465
466
class ILabProducts(Interface):
467
    """Marker interface for Lab Products
468
    """
469
470
471
class ILabProduct(Interface):
472
    """Marker interface for a LabProduct
473
    """
474
475
476
class ISamplePoint(Interface):
477
    """Marker interface for a Sample Point
478
    """
479
480
481
class ISamplePoints(Interface):
482
    """Marker interface for Sample Points
483
    """
484
485
486
class IStorageLocation(Interface):
487
    """Marker interface for a Storage Location
488
    """
489
490
491
class IStorageLocations(Interface):
492
    """Marker interface for Storage Location
493
    """
494
495
496
class ISampleType(Interface):
497
    """Marker interface for a Sample Type
498
    """
499
500
501
class ISampleTypes(Interface):
502
    """Marker interface for Sample Types
503
    """
504
505
506
class ISupplier(Interface):
507
    """Marker interface for a Supplier
508
    """
509
510
511
class ISuppliers(Interface):
512
    """Marker interface for Suplliers
513
    """
514
515
516
class ISupplyOrder(Interface):
517
    """Marker interface for a Supplier Order
518
    """
519
520
521
class ISupplyOrderFolder(Interface):
522
    """Marker interface for Supply Order Folder
523
    """
524
525
526
class ISubGroups(Interface):
527
    """Sub-groups configuration folder
528
    """
529
530
531
class ISubGroup(Interface):
532
    """Sub-Group
533
    """
534
535
536
class IPreservations(Interface):
537
    """Marker interface for Preservations
538
    """
539
540
541
class IReferenceDefinitions(Interface):
542
    """Marker interface for Reference Definitions
543
    """
544
545
546
class IWorksheetTemplates(Interface):
547
    """Marker interface for Worksheet Templates
548
    """
549
550
551
class IWorksheetTemplate(Interface):
552
    """Marker interface for Worksheet Template
553
    """
554
555
556
class IBikaCatalog(Interface):
557
    """Marker interface for bika_catalog
558
    """
559
560
561
class IBikaAnalysisCatalog(Interface):
562
    """Marker interface for bika_analysis_catalog
563
    """
564
565
566
class IBikaSetupCatalog(Interface):
567
    """Marker interface for bika_setup_catalog
568
    """
569
570
571
class IBikaCatalogAnalysisRequestListing(Interface):
572
    """Marker interface for bika_catalog_analysisrequest_listing
573
    """
574
575
576
class IBikaCatalogAutoImportLogsListing(Interface):
577
    """Marker interface for bika_catalog_autoimportlogs_listing
578
    """
579
580
581
class IBikaCatalogWorksheetListing(Interface):
582
    """Marker interface for bika_catalog_worksheet_listing
583
    """
584
585
586
class IBikaCatalogReport(Interface):
587
    """Marker interface for bika_catalog_report
588
    """
589
590
591
class IIdServer(Interface):
592
    """Marker Interface for ID server
593
    """
594
595
    def generate_id(self, portal_type, batch_size=None):
596
        """Generate a new id for 'portal_type'
597
        """
598
599
600
class IIdServerVariables(Interface):
601
    """Marker interfaces for variables generator for ID Server
602
    """
603
604
    def get_variables(self, **kw):
605
        """Returns a dict with variables
606
        """
607
608
609
class IReferenceWidgetVocabulary(Interface):
610
    """Return values for reference widgets in AR contexts
611
    """
612
613
    def __call__(**kwargs):
614
        """Call method
615
        """
616
617
618
class IDisplayListVocabulary(Interface):
619
    """Make vocabulary from catalog query.
620
621
    Return a DisplayList.
622
    kwargs are added to contentFilter.
623
    """
624
625
    def __call__(**kwargs):
626
        """Call method
627
        """
628
629
630
class IFieldIcons(Interface):
631
    """Used to signal an analysis result out of range alert
632
    """
633
634
    def __call__(self, result=None, **kwargs):
635
        """Returns a dictionary: with the keys 'field', 'icon', 'message'.
636
637
        If result is specified, it's checked instead of the database.  This
638
        is for form validations.
639
640
        Analysis range checkers can include a 'specification' in kwargs to
641
        override the spec derived from the context. It should be a dict
642
        w/ 'min', 'max', and 'error' keys.
643
        """
644
645
646
class IResultOutOfRange(Interface):
647
    """Any code which wants to check some condition and flag an Analysis as
648
    out of range, uses this interface
649
    """
650
    def __call(result=None):
651
        """The adapter must return a dictionary to indicate range out of bounds:
652
        {
653
         out_of_range: boolean - the result is out of bounds,
654
         acceptable: boolean - the result is in acceptable error margin,
655
         spec_values: dict - the min/max/error values for the failed spec
656
        }
657
658
        If the adapter returns a value that resolves to boolean False, the
659
        analysis is assumed not to have triggered the out of range conditions
660
661
        If a result is present in the request, it is passed here to be checked.
662
        if result is None, the value from the database is checked.
663
664
        """
665
666
667
class IATWidgetVisibility(Interface):
668
    """Adapter to modify the default list of fields to show on each view.
669
670
    Archetypes uses a widget attribute called 'visible' to decide which fields
671
    are editable or viewable in different contexts (view and edit).
672
673
    This adapter lets you create/use arbitrary keys in the field.widget.visible
674
    attribute, or or any other condition to decide if a particular field is
675
    displayed or not.
676
677
    an attribute named 'sort', if present, is an integer.
678
    It is used to allow some adapters to take preference over others.
679
    It's default is '1000', other lower values will take preference over higher
680
    values.
681
    """
682
683
    def __call__(widget, instance, mode, vis_dict, default=None, field=None):
684
        """Returns the visibility attribute for this particular field, in the
685
        current context.
686
687
        :arg field: the AT schema field object
688
        :arg mode: 'edit', 'view', or some custom mode, eg 'add', 'secondary'
689
        :arg vis_dict: the original schema value of field.widget.visible
690
        :arg default: value returned by the base Archetypes.Widget.isVisible
691
692
        In default Archetypes the value for the attribute on the field may
693
        either be a dict with a mapping for edit and view::
694
695
            visible = { 'edit' :'hidden', 'view': 'invisible' }
696
697
        Or a single value for all modes::
698
699
            True/1:  'visible'
700
            False/0: 'invisible'
701
            -1:      'hidden'
702
703
        visible: The field is shown in the view/edit screen
704
        invisible: The field is skipped when rendering the visVisibleiew/edit
705
                   screen
706
        hidden: The field is added as <input type="hidden" />
707
        The default state is 'visible'.
708
709
        The default rules are always applied, but any IATWidgetVisibility
710
        adapters found are called and permitted to modify the value.
711
        """
712
713
714
class ISetupDataSetList(Interface):
715
    """Allow products to register distributed setup datasets (xlsx files).
716
717
    Each ISetupDataSetList adapter returns a list of values to be included in
718
    the load_setup_data view
719
    """
720
721
722
class IJSONReadExtender(Interface):
723
    """This interface allows an adapter to modify an object's data before
724
    it is sent to the HTTP response.
725
    """
726
727
    def __call__(obj_data):
728
        """obj_data is the current python dictionary that will go to json.
729
        it should be modified in place, there is no need to return a value.
730
        """
731
732
733
class ISetupDataImporter(Interface):
734
    """ISetupDataImporter adapters are responsible for importing sections of
735
    the load_setup_data xlsx workbooks.
736
    """
737
738
739
class IPricelist(Interface):
740
    """Folder view marker for Pricelist
741
    """
742
743
744
class IPricelistFolder(Interface):
745
    """Folder view marker for PricelistFolder instance
746
    """
747
748
749
class IProductivityReport(Interface):
750
    """Reports are enumerated manually in reports/*.pt - but addional reports
751
    can be added to this list by extension packages using this adapter.
752
753
    The adapter must return a dictionary:
754
755
    {
756
     title: text (i18n translated),
757
     description: text (i18n translated),
758
     query_form: html <fieldset> of controls used to enter report
759
                 parameters (excluding <form> tags and <submit> button)
760
     module: The name of the module containing a class named "Report"
761
             an instance of this class will be used to create the report
762
    }
763
    """
764
765
766
class IAdministrationReport(Interface):
767
    """Reports are enumerated manually in reports/*.pt - but addional reports
768
    can be added to this list by extension packages using this adapter.
769
770
    The adapter must return a dictionary:
771
772
    {
773
     title: text (i18n translated),
774
     description: text (i18n translated),
775
     query_form: html <fieldset> of controls used to enter report
776
                 parameters (excluding <form> tags and <submit> button)
777
     module: The name of the module containing a class named "Report"
778
             an instance of this class will be used to create the report
779
    }
780
    """
781
782
783
class IHeaderTableFieldRenderer(Interface):
784
    """
785
    Allows an adapter to return the HTML content of the rendered field view,
786
    in header_table listings. The adapter must be registered with
787
    name=FieldName.
788
789
    If the field is a Reference, and the user has View permission on the
790
    target object, the field is rendered as <a href="absolute_url">Title</a>.
791
792
    If no adapter is found, and the field is not a reference, it is rendered
793
    with the normal AT field view machine.
794
795
    In a ZCML somewhere:
796
797
        <adapter
798
          for="bika.lims.interfaces.IAnalysisRequest"
799
          factory="package.module.spanner"
800
          provides="bika.lims.interfaces.IHeaderTableFieldRenderer"
801
          name="NameOfArchetypesField"
802
        />
803
804
    and the callable:
805
806
        class spanner:
807
            def __init__(self, context):
808
                self.context = context
809
            def __call__(self, field):
810
                field_content = field.get(self.context)
811
                return "<span>%"+field_content+"</span>"
812
813
    """
814
815
    def __call__(field):
816
        """
817
        Accepts an Archetypes Field, returns HTML.
818
        """
819
820
821
# BBB: Backwards compatibility
822
class IReflexRule(Interface):
823
    """Removed in 2.0rc3
824
    """
825
826
827
# BBB: Backwards compatibility
828
class IReflexRuleFolder(Interface):
829
    """Removed in 2.0rc3
830
    """
831
832
833
class IDepartment(Interface):
834
    """Marker interface for a Department
835
    """
836
837
838
class IProxyField(Interface):
839
    """A field that proxies transparently to the field of another object.
840
    Mainly needed for AnalysisRequest fields that are actually stored on the
841
    Sample.
842
    """
843
844
845
class IRemarksField(Interface):
846
    """An append-only TextField which saves information about each edit
847
    """
848
849
850
class IARAnalysesField(Interface):
851
    """A field that manages AR Analyses
852
    """
853
854
855
class IFrontPageAdapter(Interface):
856
    """Front Page Url Finder Adapter's Interface
857
    """
858
859
    def get_front_page_url(self):
860
        """Get url of necessary front-page
861
        """
862
863
864
class INumberGenerator(Interface):
865
    """A utility to generates unique numbers by key
866
    """
867
868
869
class ITopRightHTMLComponentsHook(Interface):
870
    """Marker interface to hook html components in bikalisting
871
    """
872
873
874
class ITopLeftHTMLComponentsHook(Interface):
875
    """Marker interface to hook html components in bikalisting
876
    """
877
878
879
class ITopWideHTMLComponentsHook(Interface):
880
    """Marker interface to hook html components in bikalisting
881
    """
882
883
884
class IGetDefaultFieldValueARAddHook(Interface):
885
    """Marker interface to hook default
886
    """
887
888
889
class IGetStickerTemplates(Interface):
890
    """Marker interface to get stickers for a specific content type.
891
892
    An IGetStickerTemplates adapter should return a result with the
893
    following format:
894
895
    :return: [{'id': <template_id>,
896
             'title': <template_title>}, ...]
897
    """
898
899
900
class IARReport(Interface):
901
    """Marker interface for published AR Reports
902
    """
903
904
905
class ICancellable(Interface):
906
    """Marker for those objects that can be cancelled (have state "cancelled")
907
    """
908
909
910
class IDeactivable(Interface):
911
    """Marker for those objects that can be deactivated (have state "inactive")
912
    """
913
914
915
class IWorkflowActionAdapter(Interface):
916
    """Marker for adapters in charge of processing workflow action requests
917
    from views
918
    """
919
920
921
class IWorkflowActionUIDsAdapter(IWorkflowActionAdapter):
922
    """Marker for adapters in charge of processing workflow action requests
923
    from views, but meant for redirection only
924
    """
925
926
927
class IVerified(Interface):
928
    """Marker interface for verified objects
929
    """
930
931
932
class ISubmitted(Interface):
933
    """Marker interface for submitted objects
934
    """
935
936
937
class IReceived(Interface):
938
    """Marker interface for received objects
939
    """
940
941
942
class IInternalUse(Interface):
943
    """Marker interface for objects only lab personnel must have access
944
    """
945
946
947
class IDetachedPartition(Interface):
948
    """Marker interface for samples that have been detached from its primary
949
    """
950
951
952
class IGuardAdapter(Interface):
953
    """Marker interface for guard adapters
954
    """
955
956
    def guard(self, transition):
957
        """Return False if you want to block the transition
958
        """
959
960
961
class IAddSampleFieldsFlush(Interface):
962
    """Marker interface for field dependencies flush for Add Sample form
963
    """
964
965
    def get_flush_settings(self):
966
        """Returns a dict where the key is the name of the field and the value
967
        is an array dependencies as field names
968
        """
969
970
971
class IAddSampleObjectInfo(Interface):
972
    """Marker interface for objects metadata mapping
973
    """
974
975
    def get_object_info(self):
976
        """Returns the dict representation of the context object for its
977
        correct consumption by Sample Add form:
978
979
        {'id': <id_of_the_object>,
980
         'uid': <uid_of_the_object>,
981
         'title': <title_of_the_object>,
982
         'filter_queries': {
983
             <dependent_field_name>: {
984
                 <catalog_index>: <criteria>
985
             }
986
         },
987
         'field_values': {
988
             <dependent_field_name>: {
989
                <uid>: <dependent_uid>,
990
                <title>: <dependent_title>
991
            }
992
         }
993
994
        Besides the basic keys (id, uid, title), two additional keys can be
995
        provided:
996
        - filter_queries: contains the filter queries for other fields to be
997
          applied when the value of current field changes.
998
        - field_values: contains default values for other fields to be applied
999
          when the value of the current field changes.
1000
        """
1001
1002
1003
class IAddSampleConfirmation(Interface):
1004
    """Marker interface for confirmation Add Sample form confirmation
1005
    """
1006
1007
    def check_confirmation(self, records):
1008
        """Returns a dict when user confirmation is required for the creation
1009
        of samples when the Save button from Add Sample form is pressed. Returns
1010
        None otherwise
1011
        """
1012
1013
1014
class IClientAwareMixin(Interface):
1015
    """Marker interface for objects that can be bound to a Client, either
1016
    because they can be added inside a Client folder or because it can be
1017
    assigned through a Reference field
1018
    """
1019
1020
    def getClient(self):
1021
        """Returns the client this object is bound to, if any
1022
        """
1023
1024
    def getClientUID(self):
1025
        """Returns the client UID this object is bound to, if any
1026
        """
1027
1028
1029
class ISampleTypeAwareMixin(Interface):
1030
    """Marker interface for objects that can be assigned to one, or multiple
1031
    SampleType objects through a ReferenceField
1032
    """
1033
1034
    def getSampleType(self):
1035
        """Returns the sample type(s) assigned to this object, if any
1036
        """
1037
1038
    def getSampleTypeUID(self):
1039
        """Returns the UID(s) of the Sample Type(s) assigned to this object
1040
        """
1041
1042
    def getSampleTypeTitle(self):
1043
        """Returns the title or a comma separated list of sample type titles
1044
        """
1045
1046
1047
class IHavePrice(Interface):
1048
    """Marker interface for objects that have a Price
1049
    """
1050
1051
    def getPrice(self):
1052
        """Returns the price of the instance
1053
        """
1054
1055
    def getTotalPrice(self):
1056
        """Returns the total price of the instance
1057
        """
1058
1059
1060
class IHaveInstrument(Interface):
1061
    """Marker interface for objects that have Instrument(s) assigned
1062
    """
1063
1064
    def getInstrument(self):
1065
        """Returns the instrument or instruments the instance is assigned to
1066
        """
1067
1068
1069
class IHaveDepartment(Interface):
1070
    """Marker interface for objects that have Department(s) assigned
1071
    """
1072
1073
    def getDepartment(self):
1074
        """Returns the department or departments the instance is assigned to
1075
        """
1076
1077
1078
class IOrganisation(Interface):
1079
    """Marker interface for IOrganisation object
1080
    """
1081
1082
    def getName(self):
1083
        """Returns the name of the organisation. Masks Title()
1084
        """
1085
1086
1087
class IHaveAnalysisCategory(Interface):
1088
    """Marker interface for objects that have AnalysisCategory(ies) assigned
1089
    """
1090
1091
    def getCategory(self):
1092
        """Returns the category(ies) assigned to this instance
1093
        """
1094
1095
    def getCategoryUID(self):
1096
        """Returns the UID of the category(ies) assigned to this instance
1097
        """
1098
1099
    def getCategoryTitle(self):
1100
        """Returns the title of the category(ies) assigned to this instance
1101
        """
1102
1103
1104
class IARImportFolder(Interface):
1105
    """Marker interface for a folder that contains ARImports
1106
    TODO: Legacy type. Remove after 1.3.3
1107
    """
1108
1109
1110
class IARImport(Interface):
1111
    """Marker interface for an ARImport
1112
    TODO: Legacy type. Remove after 1.3.3
1113
    """
1114
1115
1116
class ISamplingRoundTemplates(Interface):
1117
    """Marker interface for Sampling Round Templates
1118
    TODO: Legacy type. Remove after 1.3.3
1119
    """
1120
1121
1122
class ISamplingRoundTemplate(Interface):
1123
    """Marker interface for a Sampling Round Template
1124
    TODO: Legacy type. Remove after 1.3.3
1125
    """
1126
1127
1128
class IListingSearchableTextProvider(Interface):
1129
    """Adapter to add additional search values for the listing searchable text
1130
    catalog index
1131
    """
1132
    pass
1133