Last change
on this file since 1604 was
1604,
checked in by mylan, 14 years ago
|
Updated constructor section for possibility to construct not only CMF objects, registered in fti
|
File size:
999 bytes
|
Line | |
---|
1 | from zope.interface import Interface |
---|
2 | |
---|
3 | class IExportDataCorrector(Interface): |
---|
4 | """ Inteface for components that do some data correction on export. |
---|
5 | """ |
---|
6 | |
---|
7 | def __call__(data): |
---|
8 | """ Correct data given in 'data' argument and return it. |
---|
9 | """ |
---|
10 | |
---|
11 | class IImportDataCorrector(Interface): |
---|
12 | """ Inteface for components that do some data correction on import. |
---|
13 | """ |
---|
14 | |
---|
15 | def __call__(data): |
---|
16 | """ Correct data given in 'data' argument and return it. |
---|
17 | """ |
---|
18 | |
---|
19 | class IFTIConstructor4MetaType(Interface): |
---|
20 | """FTI utility analogy for constuct instance for not CMF objects""" |
---|
21 | |
---|
22 | def _constructInstance(self, container, id, *args, **kw): |
---|
23 | """Build a bare instance of the appropriate type. |
---|
24 | Does not do any security checks. |
---|
25 | Returns the object without calling _finishConstruction(). |
---|
26 | """ |
---|
27 | |
---|
28 | def _finishConstruction(obj): |
---|
29 | """Finish the construction of a content object. |
---|
30 | Set its portal_type, insert it into the workflows. |
---|
31 | """ |
---|
Note: See
TracBrowser
for help on using the repository browser.