From cce09936848b0f1048f848440f12d4816cb3b705 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Sat, 26 Nov 2011 14:52:59 +0100 Subject: [PATCH] move report parameters to separate interface --- composer/report/interfaces.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/composer/report/interfaces.py b/composer/report/interfaces.py index 8d020f2..5d2b42c 100644 --- a/composer/report/interfaces.py +++ b/composer/report/interfaces.py @@ -53,7 +53,20 @@ class IReportManager(Interface): """ -class IReport(ITemplate): +class IReportParams(Interface): + """ Contains the real reporting parameters like query and sort criteria, + column definitions, etc. + """ + + 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.') + + +class IReport(ITemplate, IReportParams): """ A configurable report. """ @@ -90,13 +103,6 @@ class IReport(ITemplate): 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.