From 0ae96854a7d363207732bd64603e228d813be451 Mon Sep 17 00:00:00 2001 From: helmutm Date: Sun, 21 Mar 2010 21:27:28 +0000 Subject: [PATCH] work in progress: generic report configuration: basic field definitions git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3777 fd906abe-77d9-0310-91a1-e0d9ade77398 --- composer/report/interfaces.py | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/composer/report/interfaces.py b/composer/report/interfaces.py index 16abb76..dd96d1e 100644 --- a/composer/report/interfaces.py +++ b/composer/report/interfaces.py @@ -77,8 +77,31 @@ class IReport(ITemplate): manager = Attribute('The manager of this message object') fields = Attribute('An ordered collection of all field definitions ' - 'available for this report.') - renderers = Attribute('An ordered collection of renderers for this report.') + 'available for this report type.') + renderers = Attribute('An ordered collection of renderers available ' + 'for this report type.') + + queryCriteria = Attribute('The criteria to be used for executing the ' + 'query step.') + sortSpec = Attribute('A sequence of fields/sort directions to be used for ' + 'executing the sorting step.') + outputSpec = Attribute('A sequence of output fields (column/cell ' + 'specifications) to be used for presenting the result data.') + + def getQueryFields(): + """ Return a sequence of fields that may be used for setting up + the query criteria. + """ + + def getSortFields(): + """ Return a sequence of fields that may be used for setting up + the sort criteria. + """ + + def getOutputFields(): + """ Return a sequence of fields that may be used for setting up + the output specification. + """ class FieldType(SimpleTerm): @@ -121,3 +144,9 @@ class IField(IComponent): required=True, default='textline', vocabulary=fieldTypes,) + executionSteps = schema.List( + title=_(u'Execution Steps'), + description=_(u'The execution steps for which this field may ' + u'be used.'), + required=True, + default=['query', 'sort', 'output'],)