{ "info": { "author": "Giacomo Spettoli", "author_email": "giacomo.spettoli@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Plone", "Framework :: Zope2", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Introduction\r\n============\r\n\r\nby Giacomo Spettoli and `Regione Emilia-Romagna\r\n`_\r\n\r\nThis product is a user interface for migrate content based on framework `Products.contentmigration\r\n`_.\r\n\r\nThe wizard will guide the site administrator with 3 step:\r\n\r\n1. select the desired migration from a list\r\n2. select in which contents apply the migration from a filtered site map\r\n3. confirm the migration. \r\n\r\nThis product also provide an easy way to register new migration. In \"allmigration\" folder you can\r\nfind some example.\r\nHere the folderToLargeFolder migration::\r\n\r\n class FolderToLargePloneFolder(object, ATFolderMigrator):\r\n \"\"\"Migrate the old item type to the new item type\r\n \"\"\"\r\n implements(IContentMigrator)\r\n \r\n walker = CustomQueryWalker\r\n src_meta_type = \"ATFolder\"\r\n src_portal_type = \"Folder\"\r\n dst_meta_type = \"ATBTreeFolder\"\r\n dst_portal_type = \"Large Plone Folder\"\r\n description = \"Document to Document\"\r\n safeMigration = True\r\n \r\n def __init__(self, *args, **kwargs):\r\n ATFolderMigrator.__init__(self, *args, **kwargs)\r\n self.fields_map = BASE_AT_PROPERTIES\r\n\r\n FolderToLargePloneFolderMigrator = FolderToLargePloneFolder\r\n\r\nIn order to create your own migration you must create a class that extend ATFolderMigrator or ATItemMigrator::\r\n\r\n from Products.contentmigration.archetypes import ATFolderMigrator,ATItemMigrator\r\n\r\nThis new class must implements IContentMigrator interface::\r\n\r\n implements(IContentMigrator)\r\n\r\nNext you insert source and destination portal_type and meta_type (you can find these values in zmi/portal_types)::\r\n\r\n src_meta_type = \"ATFolder\"\r\n src_portal_type = \"Folder\"\r\n dst_meta_type = \"ATBTreeFolder\"\r\n dst_portal_type = \"Large Plone Folder\"\r\n\r\nYou can set the migration as \"safe\" or \"unsafe\". A \"safe\" migration is a migration where\r\nthe destination content type has equal/more fields than origin content type. You can also insert a warning message in description::\r\n\r\n safeMigration = True\r\n description = \"Document to Document\"\r\n\r\nAnd than,in the __init__ method you must map source fields in destination fields. Basic archetypes fields are already mapped in BASE_AT_PROPERTIES::\r\n\r\n self.fields_map = BASE_AT_PROPERTIES\r\n\r\nAt last insert this line to create a named utility::\r\n Migrator = \r\n\r\nIn a zcml file register the new utility::\r\n\r\n \r\n \r\nChangelog\r\n=========\r\n\r\n0.1\r\n---------------------\r\n\r\n- Initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/collective.contentmigrationui", "keywords": "web zope plone content migration", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "collective.contentmigrationui", "package_url": "https://pypi.org/project/collective.contentmigrationui/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/collective.contentmigrationui/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/collective.contentmigrationui" }, "release_url": "https://pypi.org/project/collective.contentmigrationui/0.1/", "requires_dist": null, "requires_python": null, "summary": "A content migration wizard based on Products.contentmigration", "version": "0.1" }, "last_serial": 787715, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "4b3b0183b51acc7e6d7cc3ea0741abfd", "sha256": "d3e239e841cff097d7e825c34bc8b44951812663afe7527731f559142bc8e89b" }, "downloads": -1, "filename": "collective.contentmigrationui-0.1-py2.4.egg", "has_sig": false, "md5_digest": "4b3b0183b51acc7e6d7cc3ea0741abfd", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 52140, "upload_time": "2010-08-19T16:35:57", "url": "https://files.pythonhosted.org/packages/f3/e1/76da27b1ef6f74b01b51b37e99679c31164bc642fcfa81611694f516e8be/collective.contentmigrationui-0.1-py2.4.egg" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4b3b0183b51acc7e6d7cc3ea0741abfd", "sha256": "d3e239e841cff097d7e825c34bc8b44951812663afe7527731f559142bc8e89b" }, "downloads": -1, "filename": "collective.contentmigrationui-0.1-py2.4.egg", "has_sig": false, "md5_digest": "4b3b0183b51acc7e6d7cc3ea0741abfd", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 52140, "upload_time": "2010-08-19T16:35:57", "url": "https://files.pythonhosted.org/packages/f3/e1/76da27b1ef6f74b01b51b37e99679c31164bc642fcfa81611694f516e8be/collective.contentmigrationui-0.1-py2.4.egg" } ] }