Back to index

plone3  3.1.7
Functions
CMFPlone.migrations.v3_1.betas Namespace Reference

Functions

def three0_beta1
def addBrowserLayer
def addCollectionAndStaticPortlets
def migratePortletTypeRegistrations
def removeDoubleGenericSetupSteps
def reinstallCMFPlacefulWorkflow

Function Documentation

Definition at line 30 of file betas.py.

00030 
00031 def addBrowserLayer(portal, out):
00032     qi=getToolByName(portal, "portal_quickinstaller")
00033     if not qi.isProductInstalled("plone.browserlayer"):
00034         qi.installProduct("plone.browserlayer", locked=True)
00035         out.append("Installed plone.browserlayer")

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 36 of file betas.py.

00036 
00037 def addCollectionAndStaticPortlets(portal, out):
00038     qi=getToolByName(portal, "portal_quickinstaller")
00039     if not qi.isProductInstalled("plone.portlet.static"):
00040         qi.installProduct("plone.portlet.static", locked=True)
00041         out.append("Installed plone.portlet.static")
00042     if not qi.isProductInstalled("plone.portlet.collection"):
00043         qi.installProduct("plone.portlet.collection", locked=True)
00044         out.append("Installed plone.portlet.collection")

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 45 of file betas.py.

00045 
00046 def migratePortletTypeRegistrations(portal, out):
00047     for name, portletType in getUtilitiesFor(IPortletType):
00048         if portletType.for_ is None:
00049             portletType.for_ = [Interface]
00050         elif type(portletType.for_) is not list:
00051             portletType.for_ = [portletType.for_]
00052     
00053     out.append("Migrated portlet types to support multiple " + \
00054       "portlet manager interfaces.")
00055 

Here is the caller graph for this function:

Definition at line 78 of file betas.py.

00078 
00079 def reinstallCMFPlacefulWorkflow(portal, out):
00080     qi = getToolByName(portal, 'portal_quickinstaller', None)
00081     if qi is not None:
00082         installed = qi.isProductInstalled('CMFPlacefulWorkflow')
00083         if installed:
00084             qi.reinstallProducts(['CMFPlacefulWorkflow'])
00085             out.append('Reinstalled CMFPlacefulWorkflow')

Here is the call graph for this function:

Here is the caller graph for this function:

Remove all GenericSetup steps that are registered both using
zcml and in the persistent registry from the persistent registry.

Definition at line 56 of file betas.py.

00056 
00057 def removeDoubleGenericSetupSteps(portal, out):
00058     """Remove all GenericSetup steps that are registered both using
00059     zcml and in the persistent registry from the persistent registry.
00060     """
00061     st=getToolByName(portal, "portal_setup")
00062     view=ImportStepsView(st, None)
00063     steps=[step["id"] for step in view.doubleSteps()]
00064     if steps:
00065         for step in steps:
00066             st._import_registry.unregisterStep(step)
00067         st._p_changed=True
00068         out.append("Removed doubly registered GenericSetup import steps: %s" %
00069                 " ".join(steps))
00070 
00071     view=ExportStepsView(st, None)
00072     steps=[step["id"] for step in view.doubleSteps()]
00073     if steps:
00074         for step in steps:
00075             st._export_registry.unregisterStep(step)
00076         out.append("Removed doubly registered GenericSetup export steps: %s" %
00077                 " ".join(steps))

Here is the call graph for this function:

Here is the caller graph for this function:

3.0.6 -> 3.1-beta1

Definition at line 13 of file betas.py.

00013 
00014 def three0_beta1(portal):
00015     """3.0.6 -> 3.1-beta1
00016     """
00017     out = []
00018 
00019     loadMigrationProfile(portal, 'profile-Products.CMFPlone.migrations:3.0.6-3.1beta1')
00020 
00021     addBrowserLayer(portal, out)
00022     addCollectionAndStaticPortlets(portal, out)
00023     migratePortletTypeRegistrations(portal, out)
00024     removeDoubleGenericSetupSteps(portal, out)
00025     reinstallCMFPlacefulWorkflow(portal, out)
00026     replace_local_role_manager(portal, out)
00027 
00028     return out
00029 

Here is the call graph for this function: