-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from plone/refactor-utility
Refactor exporter/importer utilities to site adapters
- Loading branch information
Showing
19 changed files
with
196 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from plone.exportimport.interfaces import IExportImportRequestMarker | ||
from plone.restapi.behaviors import IBlocks | ||
from plone.restapi.deserializer.dxfields import DefaultFieldDeserializer | ||
from plone.restapi.interfaces import IFieldDeserializer | ||
from plone.schema import IJSONField | ||
from zope.component import adapter | ||
from zope.interface import implementer | ||
|
||
|
||
@implementer(IFieldDeserializer) | ||
@adapter(IJSONField, IBlocks, IExportImportRequestMarker) | ||
class ExportImportBlocksDeserializer(DefaultFieldDeserializer): | ||
"""We skip the subscribers that deserialize the blocks from the frontend. | ||
We only need the raw data. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<configure xmlns="http://namespaces.zope.org/zope"> | ||
<adapter factory=".blob.ExportImportNamedFieldDeserializer" /> | ||
<adapter factory=".blocks.ExportImportBlocksDeserializer" /> | ||
</configure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.