collective.documentgenerator 3.46__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- collective/documentgenerator/AT_renderer.py +98 -0
- collective/documentgenerator/DX_renderer.py +52 -0
- collective/documentgenerator/__init__.py +17 -0
- collective/documentgenerator/adapters.py +23 -0
- collective/documentgenerator/browser/__init__.py +0 -0
- collective/documentgenerator/browser/actionspanel.py +19 -0
- collective/documentgenerator/browser/check_pod_templates.pt +63 -0
- collective/documentgenerator/browser/children_pod_template.pt +16 -0
- collective/documentgenerator/browser/configure.zcml +220 -0
- collective/documentgenerator/browser/controlpanel.py +159 -0
- collective/documentgenerator/browser/converter.py +43 -0
- collective/documentgenerator/browser/generation_view.py +532 -0
- collective/documentgenerator/browser/overrides.py +9 -0
- collective/documentgenerator/browser/resources/css/documentgenerator.css +133 -0
- collective/documentgenerator/browser/static/.gitkeep +0 -0
- collective/documentgenerator/browser/static/configurable.svg +1232 -0
- collective/documentgenerator/browser/static/csv.svg +521 -0
- collective/documentgenerator/browser/static/doc.svg +23 -0
- collective/documentgenerator/browser/static/docx.svg +20 -0
- collective/documentgenerator/browser/static/download_icon.svg +54 -0
- collective/documentgenerator/browser/static/libreoffice-blanck.svg +481 -0
- collective/documentgenerator/browser/static/mailinglooptemplate.svg +1207 -0
- collective/documentgenerator/browser/static/missing_use.svg +42 -0
- collective/documentgenerator/browser/static/nok.svg +38 -0
- collective/documentgenerator/browser/static/nok_use.svg +38 -0
- collective/documentgenerator/browser/static/nok_used.svg +38 -0
- collective/documentgenerator/browser/static/odp.svg +1264 -0
- collective/documentgenerator/browser/static/ods.svg +1354 -0
- collective/documentgenerator/browser/static/odt.svg +1347 -0
- collective/documentgenerator/browser/static/ok.svg +38 -0
- collective/documentgenerator/browser/static/ok_use.svg +38 -0
- collective/documentgenerator/browser/static/ok_used.svg +38 -0
- collective/documentgenerator/browser/static/pdf.svg +557 -0
- collective/documentgenerator/browser/static/podtemplate.svg +1197 -0
- collective/documentgenerator/browser/static/rtf.svg +521 -0
- collective/documentgenerator/browser/static/style.svg +1207 -0
- collective/documentgenerator/browser/static/subtemplate.svg +1250 -0
- collective/documentgenerator/browser/static/xls.svg +159 -0
- collective/documentgenerator/browser/static/xlsx.svg +48 -0
- collective/documentgenerator/browser/table.py +277 -0
- collective/documentgenerator/browser/templates_listing.pt +23 -0
- collective/documentgenerator/browser/views.py +365 -0
- collective/documentgenerator/config.py +162 -0
- collective/documentgenerator/configure.zcml +41 -0
- collective/documentgenerator/content/__init__.py +0 -0
- collective/documentgenerator/content/condition.py +60 -0
- collective/documentgenerator/content/conditions.zcml +29 -0
- collective/documentgenerator/content/configure.zcml +25 -0
- collective/documentgenerator/content/document_factory.py +73 -0
- collective/documentgenerator/content/file_representation.py +73 -0
- collective/documentgenerator/content/file_representation.zcml +28 -0
- collective/documentgenerator/content/merge_templates.py +15 -0
- collective/documentgenerator/content/merge_templates.zcml +10 -0
- collective/documentgenerator/content/pod_template.py +547 -0
- collective/documentgenerator/content/style_template.py +52 -0
- collective/documentgenerator/content/vocabulary.py +315 -0
- collective/documentgenerator/content/vocabulary.zcml +104 -0
- collective/documentgenerator/demo/__init__.py +0 -0
- collective/documentgenerator/demo/archetypes.zcml +10 -0
- collective/documentgenerator/demo/configure.zcml +19 -0
- collective/documentgenerator/demo/helper.py +198 -0
- collective/documentgenerator/events/__init__.py +0 -0
- collective/documentgenerator/events/configure.zcml +30 -0
- collective/documentgenerator/events/pod_templates_events.py +66 -0
- collective/documentgenerator/events/styles_events.py +122 -0
- collective/documentgenerator/helper/__init__.py +9 -0
- collective/documentgenerator/helper/archetypes-adapter.zcml +10 -0
- collective/documentgenerator/helper/archetypes-page.zcml +9 -0
- collective/documentgenerator/helper/archetypes.py +67 -0
- collective/documentgenerator/helper/base.py +266 -0
- collective/documentgenerator/helper/configure.zcml +38 -0
- collective/documentgenerator/helper/dexterity.py +174 -0
- collective/documentgenerator/interfaces.py +165 -0
- collective/documentgenerator/locales/collective.documentgenerator.pot +564 -0
- collective/documentgenerator/locales/es/LC_MESSAGES/collective.documentgenerator.po +572 -0
- collective/documentgenerator/locales/es/LC_MESSAGES/plone.po +32 -0
- collective/documentgenerator/locales/fr/LC_MESSAGES/collective.documentgenerator.po +566 -0
- collective/documentgenerator/locales/fr/LC_MESSAGES/plone.po +27 -0
- collective/documentgenerator/locales/manual.pot +30 -0
- collective/documentgenerator/locales/plone-manual.pot +22 -0
- collective/documentgenerator/locales/plone.pot +30 -0
- collective/documentgenerator/locales/update.sh +22 -0
- collective/documentgenerator/migrations/__init__.py +0 -0
- collective/documentgenerator/migrations/migrate_to_11.py +53 -0
- collective/documentgenerator/migrations/migrate_to_12.py +30 -0
- collective/documentgenerator/migrations/migrate_to_13.py +37 -0
- collective/documentgenerator/migrations/migrate_to_3.py +36 -0
- collective/documentgenerator/migrations/migrate_to_5.py +30 -0
- collective/documentgenerator/migrations/migrate_to_6.py +27 -0
- collective/documentgenerator/migrations/migrate_to_7.py +32 -0
- collective/documentgenerator/migrations/migrate_to_8.py +34 -0
- collective/documentgenerator/migrations/migrate_to_9.py +48 -0
- collective/documentgenerator/profiles/base/browserlayer.xml +7 -0
- collective/documentgenerator/profiles/base/controlpanel.xml +20 -0
- collective/documentgenerator/profiles/base/metadata.xml +7 -0
- collective/documentgenerator/profiles/base/types/ConfigurablePODTemplate.xml +43 -0
- collective/documentgenerator/profiles/base/types/MailingLoopTemplate.xml +42 -0
- collective/documentgenerator/profiles/base/types/PODTemplate.xml +42 -0
- collective/documentgenerator/profiles/base/types/StyleTemplate.xml +42 -0
- collective/documentgenerator/profiles/base/types/SubTemplate.xml +42 -0
- collective/documentgenerator/profiles/base/types.xml +10 -0
- collective/documentgenerator/profiles/base/viewlets.xml +6 -0
- collective/documentgenerator/profiles/demo/browserlayer.xml +7 -0
- collective/documentgenerator/profiles/demo/collectivedocumentgenerator_demo_marker.txt +0 -0
- collective/documentgenerator/profiles/demo/import_steps.xml +11 -0
- collective/documentgenerator/profiles/demo/metadata.xml +7 -0
- collective/documentgenerator/profiles/demo/registry.xml +13 -0
- collective/documentgenerator/profiles/demo/templates/mailing.odt +0 -0
- collective/documentgenerator/profiles/demo/templates/modele_general.ods +0 -0
- collective/documentgenerator/profiles/demo/templates/modele_general.odt +0 -0
- collective/documentgenerator/profiles/demo/templates/mod/303/250le_collection.odt +0 -0
- collective/documentgenerator/profiles/demo/templates/possibly_mailed_model.odt +0 -0
- collective/documentgenerator/profiles/demo/templates/styles.odt +0 -0
- collective/documentgenerator/profiles/demo/templates/styles_2.odt +0 -0
- collective/documentgenerator/profiles/demo/templates/sub_template.odt +0 -0
- collective/documentgenerator/profiles/demo/viewlets.xml +3 -0
- collective/documentgenerator/profiles/plone4/collectivedocumentgenerator_marker.txt +0 -0
- collective/documentgenerator/profiles/plone4/cssregistry.xml +11 -0
- collective/documentgenerator/profiles/plone4/metadata.xml +7 -0
- collective/documentgenerator/profiles/plone4/registry.xml +6 -0
- collective/documentgenerator/profiles/plone5/metadata.xml +7 -0
- collective/documentgenerator/profiles/plone5/registry.xml +15 -0
- collective/documentgenerator/profiles/testing/metadata.xml +7 -0
- collective/documentgenerator/profiles/testing/propertiestool.xml +5 -0
- collective/documentgenerator/profiles/testing/types/member.xml +85 -0
- collective/documentgenerator/profiles/testing/types.xml +5 -0
- collective/documentgenerator/profiles.zcml +186 -0
- collective/documentgenerator/renderer.zcml +145 -0
- collective/documentgenerator/search_replace/__init__.py +0 -0
- collective/documentgenerator/search_replace/configure.zcml +19 -0
- collective/documentgenerator/search_replace/pod_template.py +146 -0
- collective/documentgenerator/search_replace/search_result_form.pt +48 -0
- collective/documentgenerator/search_replace/searchreplace_panel.pt +22 -0
- collective/documentgenerator/search_replace/searchreplace_panel.py +261 -0
- collective/documentgenerator/setuphandlers.py +287 -0
- collective/documentgenerator/testing.py +324 -0
- collective/documentgenerator/testing.zcml +16 -0
- collective/documentgenerator/tests/__init__.py +0 -0
- collective/documentgenerator/tests/failing_template.odt +0 -0
- collective/documentgenerator/tests/robot/.gitkeep +0 -0
- collective/documentgenerator/tests/template_to_clean.odt +0 -0
- collective/documentgenerator/tests/template_without_style_page.odt +0 -0
- collective/documentgenerator/tests/test_AT_helper_view.py +276 -0
- collective/documentgenerator/tests/test_DX_helper_view.py +355 -0
- collective/documentgenerator/tests/test_base_helper_view.py +128 -0
- collective/documentgenerator/tests/test_check_podtemplates_view.py +138 -0
- collective/documentgenerator/tests/test_config.py +106 -0
- collective/documentgenerator/tests/test_configurable_pod_template.py +383 -0
- collective/documentgenerator/tests/test_demo_profile.py +115 -0
- collective/documentgenerator/tests/test_events.py +169 -0
- collective/documentgenerator/tests/test_file.odt +0 -0
- collective/documentgenerator/tests/test_generation_view.py +652 -0
- collective/documentgenerator/tests/test_mailing.odt +0 -0
- collective/documentgenerator/tests/test_mailing_loop_template.py +48 -0
- collective/documentgenerator/tests/test_pod_template.py +178 -0
- collective/documentgenerator/tests/test_robot.py +26 -0
- collective/documentgenerator/tests/test_search_replace.py +419 -0
- collective/documentgenerator/tests/test_setup.py +49 -0
- collective/documentgenerator/tests/test_style_template.py +19 -0
- collective/documentgenerator/tests/test_sub_template.py +49 -0
- collective/documentgenerator/tests/test_templates_listing_view.py +91 -0
- collective/documentgenerator/tests/test_utils.py +244 -0
- collective/documentgenerator/tests/test_vocabulary.py +154 -0
- collective/documentgenerator/utils.py +396 -0
- collective/documentgenerator/viewlets/__init__.py +0 -0
- collective/documentgenerator/viewlets/batchactions.py +14 -0
- collective/documentgenerator/viewlets/configure.zcml +16 -0
- collective/documentgenerator/viewlets/generationlinks.pt +28 -0
- collective/documentgenerator/viewlets/generationlinks.py +58 -0
- collective.documentgenerator-3.46-py3.13-nspkg.pth +1 -0
- collective_documentgenerator-3.46.dist-info/METADATA +1142 -0
- collective_documentgenerator-3.46.dist-info/RECORD +176 -0
- collective_documentgenerator-3.46.dist-info/WHEEL +5 -0
- collective_documentgenerator-3.46.dist-info/entry_points.txt +5 -0
- collective_documentgenerator-3.46.dist-info/namespace_packages.txt +1 -0
- collective_documentgenerator-3.46.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
from Acquisition import aq_inner
|
|
3
|
+
from Acquisition import aq_parent
|
|
4
|
+
from collections import OrderedDict
|
|
5
|
+
from collective.documentgenerator.browser.table import TemplatesTable
|
|
6
|
+
from collective.documentgenerator.content.pod_template import IPODTemplate
|
|
7
|
+
from collective.documentgenerator.content.pod_template import MailingLoopTemplate
|
|
8
|
+
from collective.documentgenerator.content.pod_template import SubTemplate
|
|
9
|
+
from collective.documentgenerator.content.style_template import IStyleTemplate
|
|
10
|
+
from collective.documentgenerator.utils import translate as _
|
|
11
|
+
from OFS.interfaces import IOrderedContainer
|
|
12
|
+
from plone import api
|
|
13
|
+
from plone.app.uuid.utils import uuidToObject
|
|
14
|
+
from plone.dexterity.browser.edit import DefaultEditForm
|
|
15
|
+
from plone.dexterity.browser.view import DefaultView
|
|
16
|
+
from Products.Five import BrowserView
|
|
17
|
+
from z3c.form.contentprovider import ContentProviders
|
|
18
|
+
from z3c.form.interfaces import IFieldsAndContentProvidersForm
|
|
19
|
+
from zope.browserpage import ViewPageTemplateFile
|
|
20
|
+
from zope.contentprovider.provider import ContentProviderBase
|
|
21
|
+
from zope.interface import alsoProvides
|
|
22
|
+
from zope.interface import implementer
|
|
23
|
+
|
|
24
|
+
import os
|
|
25
|
+
import plone
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class ResetMd5(BrowserView):
|
|
29
|
+
def __call__(self):
|
|
30
|
+
self.context.style_modification_md5 = self.context.current_md5
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class TemplatesListing(BrowserView):
|
|
34
|
+
|
|
35
|
+
__table__ = TemplatesTable
|
|
36
|
+
provides = [IPODTemplate.__identifier__, IStyleTemplate.__identifier__]
|
|
37
|
+
depth = None
|
|
38
|
+
local_search = True
|
|
39
|
+
|
|
40
|
+
def __init__(self, context, request):
|
|
41
|
+
super(TemplatesListing, self).__init__(context, request)
|
|
42
|
+
|
|
43
|
+
def query_dict(self):
|
|
44
|
+
crit = {"object_provides": self.provides}
|
|
45
|
+
if self.local_search:
|
|
46
|
+
container_path = "/".join(self.context.getPhysicalPath())
|
|
47
|
+
crit["path"] = {"query": container_path}
|
|
48
|
+
if self.depth is not None:
|
|
49
|
+
crit["path"]["depth"] = self.depth
|
|
50
|
+
# crit['sort_on'] = ['path', 'getObjPositionInParent']
|
|
51
|
+
# how to sort by parent path
|
|
52
|
+
# crit['sort_on'] = 'path'
|
|
53
|
+
return crit
|
|
54
|
+
|
|
55
|
+
def update(self):
|
|
56
|
+
self.table = self.__table__(self.context, self.request)
|
|
57
|
+
self.table.__name__ = u"dg-templates-listing"
|
|
58
|
+
catalog = api.portal.get_tool("portal_catalog")
|
|
59
|
+
brains = catalog.searchResults(**self.query_dict())
|
|
60
|
+
res = [
|
|
61
|
+
(brain.getObject(), os.path.dirname(brain.getPath())) for brain in brains
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
def keys(param):
|
|
65
|
+
""" Goal: order by level of folder, parent folder, position in folder,"""
|
|
66
|
+
(obj, path) = param
|
|
67
|
+
level = len(path.split("/"))
|
|
68
|
+
parent = aq_parent(aq_inner(obj))
|
|
69
|
+
ordered = IOrderedContainer(parent, None)
|
|
70
|
+
if ordered is not None:
|
|
71
|
+
return (level, parent.Title(), ordered.getObjectPosition(obj.getId()))
|
|
72
|
+
return (level, parent.Title(), 0)
|
|
73
|
+
|
|
74
|
+
# sort by parent path and by position
|
|
75
|
+
self.table.results = [tup[0] for tup in sorted(res, key=keys)]
|
|
76
|
+
self.table.update()
|
|
77
|
+
|
|
78
|
+
def __call__(self, local_search=None, search_depth=None):
|
|
79
|
+
"""
|
|
80
|
+
search_depth = int value (0)
|
|
81
|
+
local_search = bool value
|
|
82
|
+
"""
|
|
83
|
+
if search_depth is not None:
|
|
84
|
+
self.depth = search_depth
|
|
85
|
+
else:
|
|
86
|
+
sd = self.request.get("search_depth", "")
|
|
87
|
+
if sd:
|
|
88
|
+
self.depth = int(sd)
|
|
89
|
+
if local_search is not None:
|
|
90
|
+
self.local_search = local_search
|
|
91
|
+
else:
|
|
92
|
+
self.local_search = "local_search" in self.request or self.local_search
|
|
93
|
+
self.update()
|
|
94
|
+
return self.index()
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class DisplayChildrenPodTemplateProvider(ContentProviderBase):
|
|
98
|
+
template = ViewPageTemplateFile("children_pod_template.pt")
|
|
99
|
+
|
|
100
|
+
@property
|
|
101
|
+
def name(self):
|
|
102
|
+
""" """
|
|
103
|
+
return self.__name__
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def value(self):
|
|
107
|
+
""" """
|
|
108
|
+
return self.render()
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def label(self):
|
|
112
|
+
return ""
|
|
113
|
+
|
|
114
|
+
def get_children(self):
|
|
115
|
+
return self.context.get_children_pod_template()
|
|
116
|
+
|
|
117
|
+
def render_child(self, child):
|
|
118
|
+
return "{0} ({1})".format(child.Title(), child.absolute_url())
|
|
119
|
+
|
|
120
|
+
def render(self):
|
|
121
|
+
return self.template()
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
@implementer(IFieldsAndContentProvidersForm)
|
|
125
|
+
class ViewConfigurablePodTemplate(DefaultView):
|
|
126
|
+
contentProviders = ContentProviders()
|
|
127
|
+
|
|
128
|
+
contentProviders["children_pod_template"] = DisplayChildrenPodTemplateProvider
|
|
129
|
+
contentProviders["children_pod_template"].position = 4
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
@implementer(IFieldsAndContentProvidersForm)
|
|
133
|
+
class EditConfigurablePodTemplate(DefaultEditForm):
|
|
134
|
+
contentProviders = ContentProviders()
|
|
135
|
+
|
|
136
|
+
contentProviders["children_pod_template"] = DisplayChildrenPodTemplateProvider
|
|
137
|
+
contentProviders["children_pod_template"].position = 4
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
class CheckPodTemplatesView(BrowserView):
|
|
141
|
+
"""
|
|
142
|
+
Check existing pod templates to try to find one out that is generating errors.
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
def __init__(self, context, request):
|
|
146
|
+
self.context = context
|
|
147
|
+
self.request = request
|
|
148
|
+
|
|
149
|
+
def __call__(self):
|
|
150
|
+
# Disable CSRF protection for this request
|
|
151
|
+
if "IDisableCSRFProtection" in dir(plone.protect.interfaces):
|
|
152
|
+
alsoProvides(self.request, plone.protect.interfaces.IDisableCSRFProtection)
|
|
153
|
+
|
|
154
|
+
self.error = {}
|
|
155
|
+
self.no_obj_found = {}
|
|
156
|
+
self.no_pod_portal_types = {}
|
|
157
|
+
self.not_enabled = {}
|
|
158
|
+
self.not_managed = {}
|
|
159
|
+
self.clean = {}
|
|
160
|
+
self.mailing_loop_templates = {}
|
|
161
|
+
self.sub_templates = {}
|
|
162
|
+
self.left_to_verify = self.find_pod_templates()
|
|
163
|
+
self.check_all_pod_templates()
|
|
164
|
+
self.messages = self.manage_messages
|
|
165
|
+
return self.index()
|
|
166
|
+
|
|
167
|
+
def _add_by_path(self, obj, dictionary, context=None, message=None):
|
|
168
|
+
path = "/".join(obj.aq_parent.getPhysicalPath())
|
|
169
|
+
if path not in dictionary:
|
|
170
|
+
dictionary[path] = []
|
|
171
|
+
dictionary[path].append((obj, context, message))
|
|
172
|
+
|
|
173
|
+
def excluded_pod_portal_types(self):
|
|
174
|
+
return [
|
|
175
|
+
"StyleTemplate",
|
|
176
|
+
]
|
|
177
|
+
|
|
178
|
+
def check_all_pod_templates(self):
|
|
179
|
+
pod_templates = list(self.left_to_verify)
|
|
180
|
+
|
|
181
|
+
for pod_template in pod_templates:
|
|
182
|
+
|
|
183
|
+
if not pod_template.enabled:
|
|
184
|
+
self._add_by_path(pod_template, self.not_enabled)
|
|
185
|
+
self.left_to_verify.remove(pod_template)
|
|
186
|
+
continue
|
|
187
|
+
|
|
188
|
+
# we do not manage 'StyleTemplate' automatically for now...
|
|
189
|
+
if pod_template.portal_type in self.excluded_pod_portal_types():
|
|
190
|
+
self._add_by_path(pod_template, self.not_managed)
|
|
191
|
+
self.left_to_verify.remove(pod_template)
|
|
192
|
+
continue
|
|
193
|
+
|
|
194
|
+
if isinstance(pod_template, MailingLoopTemplate):
|
|
195
|
+
self.mailing_loop_templates[pod_template.UID()] = pod_template
|
|
196
|
+
continue
|
|
197
|
+
|
|
198
|
+
if isinstance(pod_template, SubTemplate):
|
|
199
|
+
self.sub_templates[pod_template.UID()] = pod_template
|
|
200
|
+
continue
|
|
201
|
+
|
|
202
|
+
if (
|
|
203
|
+
hasattr(pod_template, "pod_portal_types")
|
|
204
|
+
and not pod_template.pod_portal_types
|
|
205
|
+
):
|
|
206
|
+
self._add_by_path(pod_template, self.no_pod_portal_types)
|
|
207
|
+
self.left_to_verify.remove(pod_template)
|
|
208
|
+
continue
|
|
209
|
+
|
|
210
|
+
objs = self.find_context_for(pod_template)
|
|
211
|
+
if not objs:
|
|
212
|
+
self._add_by_path(pod_template, self.no_obj_found)
|
|
213
|
+
self.left_to_verify.remove(pod_template)
|
|
214
|
+
continue
|
|
215
|
+
|
|
216
|
+
for obj in objs:
|
|
217
|
+
self.request.set("template_uid", pod_template.UID())
|
|
218
|
+
if hasattr(pod_template, "pod_formats"):
|
|
219
|
+
output_format = pod_template.pod_formats[0]
|
|
220
|
+
else:
|
|
221
|
+
output_format = "odt"
|
|
222
|
+
self.request.set("output_format", output_format)
|
|
223
|
+
|
|
224
|
+
self.check_pod_template(pod_template, obj, output_format)
|
|
225
|
+
|
|
226
|
+
if (
|
|
227
|
+
hasattr(pod_template, "merge_templates")
|
|
228
|
+
and pod_template.merge_templates
|
|
229
|
+
):
|
|
230
|
+
for merged_template in pod_template.merge_templates:
|
|
231
|
+
sub_template_uid = merged_template["template"]
|
|
232
|
+
if sub_template_uid not in self.sub_templates:
|
|
233
|
+
self.sub_templates[sub_template_uid] = uuidToObject(
|
|
234
|
+
sub_template_uid
|
|
235
|
+
)
|
|
236
|
+
self._add_by_path(
|
|
237
|
+
self.sub_templates[sub_template_uid], self.clean, obj
|
|
238
|
+
)
|
|
239
|
+
if self.sub_templates[sub_template_uid] in self.left_to_verify:
|
|
240
|
+
self.left_to_verify.remove(
|
|
241
|
+
self.sub_templates[sub_template_uid]
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
if (
|
|
245
|
+
hasattr(pod_template, "mailing_loop_template")
|
|
246
|
+
and pod_template.mailing_loop_template
|
|
247
|
+
):
|
|
248
|
+
self.check_mailing_loop(pod_template, obj, output_format)
|
|
249
|
+
|
|
250
|
+
def check_pod_template(self, pod_template, obj, output_format):
|
|
251
|
+
try:
|
|
252
|
+
view = obj.restrictedTraverse("@@document-generation")
|
|
253
|
+
view()
|
|
254
|
+
view._generate_doc(
|
|
255
|
+
pod_template, output_format=output_format, raiseOnError=True
|
|
256
|
+
)
|
|
257
|
+
self._add_by_path(pod_template, self.clean, obj)
|
|
258
|
+
|
|
259
|
+
except Exception as exc:
|
|
260
|
+
self._add_by_path(pod_template, self.error, obj, (_("Error"), str(exc)))
|
|
261
|
+
self.left_to_verify.remove(pod_template)
|
|
262
|
+
|
|
263
|
+
def check_mailing_loop(self, mailed_template, obj, output_format):
|
|
264
|
+
folder = api.content.create(
|
|
265
|
+
type="Folder", title=u"Folder", id="temp_folder", container=self.context
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
def do_nothing(ignored_param):
|
|
269
|
+
pass
|
|
270
|
+
|
|
271
|
+
mailing_loop_template_uid = mailed_template.mailing_loop_template
|
|
272
|
+
try:
|
|
273
|
+
if mailing_loop_template_uid not in self.mailing_loop_templates.keys():
|
|
274
|
+
mailing_loop_template = uuidToObject(mailing_loop_template_uid)
|
|
275
|
+
self.mailing_loop_templates[
|
|
276
|
+
mailing_loop_template_uid
|
|
277
|
+
] = mailing_loop_template
|
|
278
|
+
generation_view = folder.restrictedTraverse(
|
|
279
|
+
"@@persistent-document-generation"
|
|
280
|
+
)
|
|
281
|
+
generation_view.redirects = do_nothing
|
|
282
|
+
generation_view(mailed_template.UID(), "odt")
|
|
283
|
+
persistant_doc = folder.listFolderContents()[0]
|
|
284
|
+
view = folder.restrictedTraverse(
|
|
285
|
+
"@@mailing-loop-persistent-document-generation"
|
|
286
|
+
)
|
|
287
|
+
view.redirects = do_nothing
|
|
288
|
+
view(document_uid=persistant_doc.UID())
|
|
289
|
+
# double check anyway just in case there is an error inside the result file
|
|
290
|
+
view._generate_doc(
|
|
291
|
+
self.mailing_loop_templates[mailing_loop_template_uid],
|
|
292
|
+
output_format=output_format,
|
|
293
|
+
raiseOnError=True,
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
self._add_by_path(
|
|
297
|
+
self.mailing_loop_templates[mailing_loop_template_uid], self.clean, obj
|
|
298
|
+
)
|
|
299
|
+
except Exception as exc:
|
|
300
|
+
self._add_by_path(
|
|
301
|
+
self.mailing_loop_templates[mailing_loop_template_uid],
|
|
302
|
+
self.error,
|
|
303
|
+
obj,
|
|
304
|
+
(_("Error"), str(exc)),
|
|
305
|
+
)
|
|
306
|
+
finally:
|
|
307
|
+
api.content.delete(obj=folder)
|
|
308
|
+
self.left_to_verify.remove(
|
|
309
|
+
self.mailing_loop_templates[mailing_loop_template_uid]
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
def find_pod_templates(self):
|
|
313
|
+
"""
|
|
314
|
+
This will find all potamplates in this site.
|
|
315
|
+
"""
|
|
316
|
+
brains = api.content.find(context=self.context,
|
|
317
|
+
object_provides=IPODTemplate.__identifier__)
|
|
318
|
+
res = []
|
|
319
|
+
for brain in brains:
|
|
320
|
+
pod_template = brain.getObject()
|
|
321
|
+
res.append(pod_template)
|
|
322
|
+
return res
|
|
323
|
+
|
|
324
|
+
def find_context_for(self, pod_template):
|
|
325
|
+
"""
|
|
326
|
+
This will find context objects working with given p_pod_template.
|
|
327
|
+
We return one obj of each pod_portal_types respecting the TAL condition.
|
|
328
|
+
"""
|
|
329
|
+
|
|
330
|
+
def _search_context(portal_types):
|
|
331
|
+
catalog = api.portal.get_tool("portal_catalog")
|
|
332
|
+
for portal_type in portal_types:
|
|
333
|
+
# get an element for which the TAL condition is True
|
|
334
|
+
brains = catalog(portal_type=portal_type)
|
|
335
|
+
for brain in brains:
|
|
336
|
+
ctx = brain.getObject()
|
|
337
|
+
if pod_template.can_be_generated(ctx):
|
|
338
|
+
return ctx
|
|
339
|
+
return None
|
|
340
|
+
|
|
341
|
+
res = []
|
|
342
|
+
if hasattr(pod_template, "pod_portal_types"):
|
|
343
|
+
pod_portal_types = pod_template.pod_portal_types
|
|
344
|
+
else:
|
|
345
|
+
ttool = api.portal.get_tool("portal_types")
|
|
346
|
+
pod_portal_types = ttool.listContentTypes()
|
|
347
|
+
found_context = _search_context(pod_portal_types)
|
|
348
|
+
if found_context:
|
|
349
|
+
res.append(found_context)
|
|
350
|
+
return res
|
|
351
|
+
|
|
352
|
+
@property
|
|
353
|
+
def manage_messages(self):
|
|
354
|
+
messages = OrderedDict()
|
|
355
|
+
for left_over in self.left_to_verify:
|
|
356
|
+
self._add_by_path(
|
|
357
|
+
left_over, self.error, None, (_("Error"), _("Could not check"))
|
|
358
|
+
)
|
|
359
|
+
messages["check_pod_template_error"] = self.error
|
|
360
|
+
messages["check_pod_template_no_obj_found"] = self.no_obj_found
|
|
361
|
+
messages["check_pod_template_no_pod_portal_types"] = self.no_pod_portal_types
|
|
362
|
+
messages["check_pod_template_not_enabled"] = self.not_enabled
|
|
363
|
+
messages["check_pod_template_not_managed"] = self.not_managed
|
|
364
|
+
messages["check_pod_template_clean"] = self.clean
|
|
365
|
+
return messages
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
from imio.helpers import HAS_PLONE_5_2
|
|
4
|
+
from plone import api
|
|
5
|
+
from Products.CMFPlone.utils import safe_unicode
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
import re
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
ODS_FORMATS = (('ods', 'LibreOffice Calc (.ods)'),
|
|
12
|
+
('csv', 'Comma Separated Values (.csv)'),
|
|
13
|
+
('xls', 'Microsoft Excel (.xls)'),
|
|
14
|
+
('xlsx', 'Microsoft Excel (.xlsx)'),)
|
|
15
|
+
|
|
16
|
+
ODT_FORMATS = (('odt', 'LibreOffice Writer (.odt)'),
|
|
17
|
+
('doc', 'Microsoft Word (.doc)'),
|
|
18
|
+
('docx', 'Microsoft Word XML (.docx)'),
|
|
19
|
+
('rtf', 'Rich Text Format (.RTF)'),)
|
|
20
|
+
|
|
21
|
+
NEUTRAL_FORMATS = (('pdf', 'Adobe PDF (.pdf)'),)
|
|
22
|
+
|
|
23
|
+
POD_FORMATS = ODS_FORMATS + ODT_FORMATS + NEUTRAL_FORMATS
|
|
24
|
+
|
|
25
|
+
DEFAULT_PYTHON_UNO_PATH = u'/usr/bin/python'
|
|
26
|
+
|
|
27
|
+
VIEWLET_TYPES = ['PODTemplate', 'ConfigurablePODTemplate']
|
|
28
|
+
|
|
29
|
+
DEFAULT_OO_SERVER = u'localhost'
|
|
30
|
+
DEFAULT_OO_PORT = 2002
|
|
31
|
+
DEFAULT_PYTHON_UNO = u'/usr/bin/python3'
|
|
32
|
+
DEFAULT_COLUMN_MODIFIER = u'nothing'
|
|
33
|
+
|
|
34
|
+
DEFAULT_CSV_FIELD_DELIMITERS = {
|
|
35
|
+
u'Comma': u',', u'Semicolon': u';', u'Colon': u':', u'Space': u' ', u'Tabulation': u'\t'}
|
|
36
|
+
DEFAULT_CSV_STRING_DELIMITERS = {u"Double Quote": u'"', u"Single Quote": u"'"}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
if HAS_PLONE_5_2:
|
|
40
|
+
import sys
|
|
41
|
+
from zope.deprecation import deprecation
|
|
42
|
+
sys.modules['collective.documentgenerator.demo.helper.ATDemoHelperView'] = \
|
|
43
|
+
deprecation.deprecated(deprecation, 'Archetypes was removed from Plone 5.2.')
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def get_uno_path():
|
|
47
|
+
return api.portal.get_registry_record(
|
|
48
|
+
'collective.documentgenerator.browser.controlpanel.IDocumentGeneratorControlPanelSchema.uno_path'
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def get_oo_server():
|
|
53
|
+
return api.portal.get_registry_record(
|
|
54
|
+
'collective.documentgenerator.browser.controlpanel.IDocumentGeneratorControlPanelSchema.oo_server'
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def get_oo_port_list():
|
|
59
|
+
"""
|
|
60
|
+
@return the LibreOffice ports numbers to use as a list of int.
|
|
61
|
+
"""
|
|
62
|
+
oo_port_list = api.portal.get_registry_record(
|
|
63
|
+
'collective.documentgenerator.browser.controlpanel.IDocumentGeneratorControlPanelSchema.oo_port_list'
|
|
64
|
+
)
|
|
65
|
+
return [int(port) for port in re.findall('([0-9]+)', oo_port_list)]
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def get_column_modifier():
|
|
69
|
+
return api.portal.get_registry_record(
|
|
70
|
+
'collective.documentgenerator.browser.controlpanel.IDocumentGeneratorControlPanelSchema.column_modifier'
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def get_raiseOnError_for_non_managers():
|
|
75
|
+
return api.portal.get_registry_record(
|
|
76
|
+
'collective.documentgenerator.browser.controlpanel.'
|
|
77
|
+
'IDocumentGeneratorControlPanelSchema.raiseOnError_for_non_managers'
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def get_use_stream():
|
|
82
|
+
use_stream = api.portal.get_registry_record(
|
|
83
|
+
'collective.documentgenerator.browser.controlpanel.IDocumentGeneratorControlPanelSchema.use_stream'
|
|
84
|
+
)
|
|
85
|
+
return use_stream
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def get_csv_field_delimiters():
|
|
89
|
+
csv_field_delimiters = api.portal.get_registry_record(
|
|
90
|
+
'collective.documentgenerator.browser.controlpanel.IDocumentGeneratorControlPanelSchema.csv_field_delimiters',
|
|
91
|
+
default=DEFAULT_CSV_FIELD_DELIMITERS
|
|
92
|
+
)
|
|
93
|
+
return csv_field_delimiters
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def get_csv_string_delimiters():
|
|
97
|
+
csv_string_delimiters = api.portal.get_registry_record(
|
|
98
|
+
'collective.documentgenerator.browser.controlpanel.'
|
|
99
|
+
'IDocumentGeneratorControlPanelSchema.csv_string_delimiters',
|
|
100
|
+
default=DEFAULT_CSV_STRING_DELIMITERS
|
|
101
|
+
)
|
|
102
|
+
return csv_string_delimiters
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def set_oo_server():
|
|
106
|
+
""" Get environment value in buildout to define port """
|
|
107
|
+
oo_server = os.getenv('OO_SERVER', DEFAULT_OO_SERVER)
|
|
108
|
+
if oo_server:
|
|
109
|
+
api.portal.set_registry_record('collective.documentgenerator.browser.controlpanel.'
|
|
110
|
+
'IDocumentGeneratorControlPanelSchema.oo_server', safe_unicode(oo_server))
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def set_oo_port():
|
|
114
|
+
""" Get environment value in buildout to define port """
|
|
115
|
+
oo_port = unicode(os.getenv('OO_PORT', DEFAULT_OO_PORT))
|
|
116
|
+
if oo_port:
|
|
117
|
+
api.portal.set_registry_record('collective.documentgenerator.browser.controlpanel.'
|
|
118
|
+
'IDocumentGeneratorControlPanelSchema.oo_port_list', oo_port)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def set_uno_path():
|
|
122
|
+
""" Get environment value in buildout to define path """
|
|
123
|
+
python_uno = os.getenv('PYTHON_UNO', DEFAULT_PYTHON_UNO)
|
|
124
|
+
if python_uno:
|
|
125
|
+
api.portal.set_registry_record('collective.documentgenerator.browser.controlpanel.'
|
|
126
|
+
'IDocumentGeneratorControlPanelSchema.uno_path', safe_unicode(python_uno))
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def set_column_modifier(value):
|
|
130
|
+
api.portal.set_registry_record(
|
|
131
|
+
'collective.documentgenerator.browser.controlpanel.IDocumentGeneratorControlPanelSchema.column_modifier',
|
|
132
|
+
value
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def set_raiseOnError_for_non_managers(value):
|
|
137
|
+
api.portal.set_registry_record(
|
|
138
|
+
'collective.documentgenerator.browser.controlpanel.'
|
|
139
|
+
'IDocumentGeneratorControlPanelSchema.raiseOnError_for_non_managers',
|
|
140
|
+
value)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def set_use_stream(value):
|
|
144
|
+
api.portal.set_registry_record(
|
|
145
|
+
'collective.documentgenerator.browser.controlpanel.IDocumentGeneratorControlPanelSchema.use_stream',
|
|
146
|
+
value
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def set_csv_field_delimiters(value):
|
|
151
|
+
api.portal.set_registry_record(
|
|
152
|
+
'collective.documentgenerator.browser.controlpanel.IDocumentGeneratorControlPanelSchema.csv_field_delimiters',
|
|
153
|
+
value
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def set_csv_string_delimiters(value):
|
|
158
|
+
api.portal.set_registry_record(
|
|
159
|
+
'collective.documentgenerator.browser.controlpanel.'
|
|
160
|
+
'IDocumentGeneratorControlPanelSchema.csv_string_delimiters',
|
|
161
|
+
value
|
|
162
|
+
)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<configure
|
|
2
|
+
xmlns="http://namespaces.zope.org/zope"
|
|
3
|
+
xmlns:five="http://namespaces.zope.org/five"
|
|
4
|
+
xmlns:i18n="http://namespaces.zope.org/i18n"
|
|
5
|
+
xmlns:zcml="http://namespaces.zope.org/zcml"
|
|
6
|
+
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
|
|
7
|
+
i18n_domain="collective.documentgenerator">
|
|
8
|
+
|
|
9
|
+
<i18n:registerTranslations directory="locales" />
|
|
10
|
+
|
|
11
|
+
<five:registerPackage package="." initialize=".initialize" />
|
|
12
|
+
|
|
13
|
+
<include package="collective.behavior.talcondition" />
|
|
14
|
+
<include package="collective.excelexport" />
|
|
15
|
+
<include package="collective.z3cform.datagridfield"/>
|
|
16
|
+
<include zcml:condition="installed imio.actionspanel" package="imio.actionspanel" />
|
|
17
|
+
<include package="plone.api" />
|
|
18
|
+
<include package="plone.app.dexterity" />
|
|
19
|
+
<include package="plone.app.lockingbehavior"/>
|
|
20
|
+
|
|
21
|
+
<include package=".browser" />
|
|
22
|
+
<include package=".content" />
|
|
23
|
+
<include package=".demo" />
|
|
24
|
+
<include package=".events" />
|
|
25
|
+
<include package=".search_replace"/>
|
|
26
|
+
<include package=".helper"/>
|
|
27
|
+
<include package=".viewlets" />
|
|
28
|
+
|
|
29
|
+
<include file="profiles.zcml"/>
|
|
30
|
+
<include file="renderer.zcml"/>
|
|
31
|
+
|
|
32
|
+
<adapter
|
|
33
|
+
for="*"
|
|
34
|
+
provides=".interfaces.IGenerablePODTemplates"
|
|
35
|
+
factory=".adapters.GenerablePODTemplatesAdapter"/>
|
|
36
|
+
|
|
37
|
+
<configure zcml:condition="installed collective.big.bang">
|
|
38
|
+
<subscriber for="collective.big.bang.interface.IDarwinStartedEvent"
|
|
39
|
+
handler=".utils.update_oo_config_after_bigbang"/>
|
|
40
|
+
</configure>
|
|
41
|
+
</configure>
|
|
File without changes
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
from collective.behavior.talcondition.behavior import ITALCondition
|
|
4
|
+
from collective.documentgenerator.interfaces import IPODTemplateCondition
|
|
5
|
+
from zope.interface import implementer
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@implementer(IPODTemplateCondition)
|
|
9
|
+
class PODTemplateCondition(object):
|
|
10
|
+
""" """
|
|
11
|
+
|
|
12
|
+
def __init__(self, pod_template, context):
|
|
13
|
+
self.pod_template = pod_template
|
|
14
|
+
self.context = context
|
|
15
|
+
|
|
16
|
+
def evaluate(self):
|
|
17
|
+
enabled = self.pod_template.enabled
|
|
18
|
+
return enabled
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class SubTemplateCondition(PODTemplateCondition):
|
|
22
|
+
""" """
|
|
23
|
+
|
|
24
|
+
def evaluate(self):
|
|
25
|
+
"""
|
|
26
|
+
By default, subtemplates are not supposed to be rendered by users.
|
|
27
|
+
"""
|
|
28
|
+
return False
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class ConfigurablePODTemplateCondition(PODTemplateCondition):
|
|
32
|
+
"""
|
|
33
|
+
Check the permission and the TAL expression of a PODTemplate
|
|
34
|
+
on a context.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def evaluate(self):
|
|
38
|
+
"""
|
|
39
|
+
Check if :
|
|
40
|
+
- template is enabled;
|
|
41
|
+
- template is restricted to specific portal_types;
|
|
42
|
+
- the tal_condition is True.
|
|
43
|
+
"""
|
|
44
|
+
return self.pod_template.enabled and \
|
|
45
|
+
self.evaluate_allowed_context(self.context) and \
|
|
46
|
+
ITALCondition(self.pod_template).evaluate(extra_expr_ctx=self._extra_expr_ctx())
|
|
47
|
+
|
|
48
|
+
def _extra_expr_ctx(self):
|
|
49
|
+
""" """
|
|
50
|
+
return {'here': self.context,
|
|
51
|
+
'context': self.context,
|
|
52
|
+
'template': self.pod_template}
|
|
53
|
+
|
|
54
|
+
def evaluate_allowed_context(self, context):
|
|
55
|
+
"""
|
|
56
|
+
Evaluate if context is in pt selected list
|
|
57
|
+
If not use, return True
|
|
58
|
+
"""
|
|
59
|
+
allowed_types = self.pod_template.pod_portal_types
|
|
60
|
+
return not allowed_types or context.portal_type in allowed_types
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<configure
|
|
2
|
+
xmlns="http://namespaces.zope.org/zope"
|
|
3
|
+
i18n_domain="collective.documentgenerator">
|
|
4
|
+
|
|
5
|
+
<adapter
|
|
6
|
+
for="collective.documentgenerator.content.pod_template.IPODTemplate
|
|
7
|
+
zope.interface.Interface"
|
|
8
|
+
factory=".condition.PODTemplateCondition"
|
|
9
|
+
/>
|
|
10
|
+
|
|
11
|
+
<adapter
|
|
12
|
+
for="collective.documentgenerator.content.pod_template.ISubTemplate
|
|
13
|
+
zope.interface.Interface"
|
|
14
|
+
factory=".condition.SubTemplateCondition"
|
|
15
|
+
/>
|
|
16
|
+
|
|
17
|
+
<adapter
|
|
18
|
+
for="collective.documentgenerator.content.pod_template.IMailingLoopTemplate
|
|
19
|
+
zope.interface.Interface"
|
|
20
|
+
factory=".condition.PODTemplateCondition"
|
|
21
|
+
/>
|
|
22
|
+
|
|
23
|
+
<adapter
|
|
24
|
+
for="collective.documentgenerator.content.pod_template.IConfigurablePODTemplate
|
|
25
|
+
zope.interface.Interface"
|
|
26
|
+
factory=".condition.ConfigurablePODTemplateCondition"
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
</configure>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<configure
|
|
2
|
+
xmlns="http://namespaces.zope.org/zope"
|
|
3
|
+
xmlns:zcml="http://namespaces.zope.org/zcml"
|
|
4
|
+
i18n_domain="collective.documentgenerator">
|
|
5
|
+
|
|
6
|
+
<include file="conditions.zcml" />
|
|
7
|
+
<include file="file_representation.zcml"/>
|
|
8
|
+
<include file="merge_templates.zcml"/>
|
|
9
|
+
<include file="vocabulary.zcml" />
|
|
10
|
+
|
|
11
|
+
<adapter
|
|
12
|
+
zcml:condition="not-have plone-5"
|
|
13
|
+
for="zope.interface.Interface"
|
|
14
|
+
factory=".document_factory.ATCTFileDocumentFactory"
|
|
15
|
+
provides="collective.documentgenerator.interfaces.IDocumentFactory"
|
|
16
|
+
/>
|
|
17
|
+
|
|
18
|
+
<adapter
|
|
19
|
+
zcml:condition="have plone-5"
|
|
20
|
+
for="zope.interface.Interface"
|
|
21
|
+
factory=".document_factory.PACTFileDocumentFactory"
|
|
22
|
+
provides="collective.documentgenerator.interfaces.IDocumentFactory"
|
|
23
|
+
/>
|
|
24
|
+
|
|
25
|
+
</configure>
|