source: products/quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/exportadapters.txt @ 275

Last change on this file since 275 was 275, checked in by mylan, 18 years ago

Removed file/folder

File size: 1.5 KB
Line 
1Export adapters section
2=======================
3
4The export adapters section blueprint name is
5``quintagroup.transmogrifier.exportadapters``.
6
7Export adapters needs at least 2 piece of information: the path to the object
8to update and data dictionary which determine, what adapters will be queried and
9what data they will consume. To determine the path, the marshall section inspects
10each item and looks for one key, as described below. Any item missing this piece of
11information will be skipped. Similarly, items with a path that doesn't exist
12or without data dictionary will be skipped too.
13
14Paths to objects are always interpreted as relative to the context.
15
16>>> exportadapters = """
17... [transmogrifier]
18... pipeline =
19...     exportadapterssource
20...     exportadapters
21...     printer
22...     
23... [exportadapterssource]
24... blueprint = quintagroup.transmogrifier.tests.exportadapterssource
25...
26... [exportadapters]
27... blueprint = quintagroup.transmogrifier.exportadapters
28... data-key = _files
29...
30... [printer]
31... blueprint = collective.transmogrifier.sections.tests.pprinter
32...
33... """
34>>> registerConfig(u'quintagroup.transmogrifier.tests.exportadapters', exportadapters)
35>>> transmogrifier(u'quintagroup.transmogrifier.tests.exportadapters') # doctest: +ELLIPSIS, +REPORT_NDIFF
36{'_files': {'unchanged': 'this must be unchanged', 'mock': 'modified data'},
37 '_path': 'spam/eggs/foo'}
38{'_path': 'not/existing/bar'}
39{}
40{'_files': {'mock': "item hasn't path"}}
41{'_files': {'mock': "object isn't adaptable"},
42 '_path': 'spam/eggs/notadaptable'}
Note: See TracBrowser for help on using the repository browser.