Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
CMFQuickInstallerTool.QuickInstallerTool.QuickInstallerTool Class Reference
Inheritance diagram for CMFQuickInstallerTool.QuickInstallerTool.QuickInstallerTool:
Inheritance graph
[legend]
Collaboration diagram for CMFQuickInstallerTool.QuickInstallerTool.QuickInstallerTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def getInstallProfiles
def getInstallProfile
def getInstallMethod
def getBrokenInstalls
def isProductInstallable
def listInstallableProfiles
def listInstallableProducts
def listInstalledProducts
def getProductFile
def getProductDescription
def getProductVersion
def snapshotPortal
def deriveSettingsFromSnapshots
def installProduct
def installProducts
def isProductInstalled
def notifyInstalled
def uninstallProducts
def reinstallProducts
def getQIElements
def getAlreadyRegistered
def isDevelopmentMode
def getInstanceHome

Public Attributes

 id
 errors

Static Public Attributes

string meta_type = 'CMF QuickInstaller Tool'
string id = 'portal_quickinstaller'
tuple security = ClassSecurityInfo()
tuple manage_options
tuple manage_installProductsForm
 isProductAvailable = isProductInstallable
 getProductReadme = getProductFile
tuple uninstallProducts = postonly(uninstallProducts)
tuple reinstallProducts = postonly(reinstallProducts)

Detailed Description

  Let's make sure that this implementation actually fulfills the
  'IQuickInstallerTool' API.

  >>> from zope.interface.verify import verifyClass
  >>> verifyClass(IQuickInstallerTool, QuickInstallerTool)
  True

Definition at line 56 of file QuickInstallerTool.py.


Constructor & Destructor Documentation

Definition at line 83 of file QuickInstallerTool.py.

00083 
00084     def __init__(self):
00085         self.id = 'portal_quickinstaller'


Member Function Documentation

Definition at line 408 of file QuickInstallerTool.py.

00408 
00409     def deriveSettingsFromSnapshots(self, before, after):
00410         actions = [a for a in (after['actions'] - before['actions'])]
00411 
00412         adapters = []
00413         if len(after['adapters']) > len(before['adapters']):
00414             registrations = [reg for reg in after['adapters']
00415                                   if reg not in before['adapters']]
00416             # TODO: expand this to actually cover adapter registrations
00417 
00418         utilities = []
00419         if len(after['utilities']) > len(before['utilities']):
00420             registrations = [reg for reg in after['utilities']
00421                                   if reg not in before['utilities']]
00422 
00423             for registration in registrations:
00424                 reg = (_getDottedName(registration.provided), registration.name)
00425                 utilities.append(reg)
00426 
00427         settings=dict(
00428             types=[t for t in after['types'] if t not in before['types']],
00429             skins=[s for s in after['skins'] if s not in before['skins']],
00430             actions=actions,
00431             workflows=[w for w in after['workflows'] if w not in before['workflows']],
00432             portalobjects=[a for a in after['portalobjects']
00433                            if a not in before['portalobjects']],
00434             leftslots=[s for s in after['leftslots'] if s not in before['leftslots']],
00435             rightslots=[s for s in after['rightslots'] if s not in before['rightslots']],
00436             adapters=adapters,
00437             utilities=utilities,
00438             registrypredicates=[s for s in after['registrypredicates']
00439                                 if s not in before['registrypredicates']],
00440             )
00441 
00442         jstool = getToolByName(self,'portal_javascripts', None)
00443         if jstool is not None:
00444             settings['resources_js']=[r for r in after['resources_js'] if r not in before['resources_js']]
00445             settings['resources_css']=[r for r in after['resources_css'] if r not in before['resources_css']]
00446 
00447         return settings
00448 

Here is the call graph for this function:

Here is the caller graph for this function:

Get a list of already registered elements

Definition at line 656 of file QuickInstallerTool.py.

00656 
00657     def getAlreadyRegistered(self):
00658         """Get a list of already registered elements
00659         """
00660         result = {}
00661         products = [p for p in self.objectValues() if p.isInstalled() ]
00662         for element in self.getQIElements():
00663             v = result.setdefault(element, [])
00664             for product in products:
00665                 pv = getattr(aq_base(product), element, None)
00666                 if pv:
00667                     v.extend(list(pv))
00668         return result

Here is the call graph for this function:

Return all the broken installs 

Definition at line 161 of file QuickInstallerTool.py.

00161 
00162     def getBrokenInstalls(self):
00163         """ Return all the broken installs """
00164         errs = getattr(self, "errors", {})
00165         return errs.values()
    
Return the installer method

Definition at line 121 of file QuickInstallerTool.py.

00121 
00122     def getInstallMethod(self, productname):
00123         """ Return the installer method
00124         """
00125         import_error_announced = False
00126         for mod, func in (('Install','install'),
00127                           ('Install','Install'),
00128                           ('install','install'),
00129                           ('install','Install')):
00130             if productname in self.Control_Panel.Products.objectIds():
00131                 productInCP = self.Control_Panel.Products[productname]
00132 
00133                 if mod in productInCP.objectIds():
00134                     modFolder = productInCP[mod]
00135                     if func in modFolder.objectIds():
00136                         return modFolder[func]
00137 
00138                 try:
00139                     try:
00140                         return ExternalMethod('temp',
00141                                               'temp',
00142                                               productname+'.'+mod,
00143                                               func)
00144                     except NotFound:
00145                         continue
00146                     except ImportError, e:
00147                         if not import_error_announced:
00148                             # do not announce the error 4 times
00149                             import_error_announced = True
00150                             msg = "%s, ImportError: %s" % (productname, str(e))
00151                             logger.log(logging.ERROR, msg)
00152                         continue
00153                 except RuntimeError, msg:
00154                     # external method can throw a bunch of these
00155                     msg = "%s, RuntimeError: %s" % (productname, msg)
00156                     logger.log(logging.ERROR, msg)
00157 
00158         raise AttributeError, ('No Install method found for '
00159                                'product %s' % productname)

Here is the caller graph for this function:

Return the installer profile

Definition at line 103 of file QuickInstallerTool.py.

00103 
00104     def getInstallProfile(self, productname):
00105         """ Return the installer profile
00106         """
00107         portal_setup = getToolByName(self, 'portal_setup')
00108         profiles = portal_setup.listProfileInfo()
00109 
00110         # We are only interested in extension profiles for the product
00111         profiles = [prof for prof in profiles if
00112             prof['type'] == EXTENSION and
00113             (prof['product'] == productname or 
00114              prof['product'] == 'Products.%s' % productname)]
00115 
00116         # XXX Currently QI always uses the first profile
00117         if profiles:
00118             return profiles[0]
00119         return None

Here is the call graph for this function:

Here is the caller graph for this function:

Return the installer profile id

Definition at line 87 of file QuickInstallerTool.py.

00087 
00088     def getInstallProfiles(self, productname):
00089         """ Return the installer profile id
00090         """
00091         portal_setup = getToolByName(self, 'portal_setup')
00092         profiles = portal_setup.listProfileInfo()
00093 
00094         # We are only interested in extension profiles for the product
00095         # TODO Remove the manual Products.* check here. It is still needed.
00096         profiles = [prof['id'] for prof in profiles if
00097             prof['type'] == EXTENSION and
00098             (prof['product'] == productname or 
00099              prof['product'] == 'Products.%s' % productname)]
00100 
00101         return profiles

Here is the call graph for this function:

Here is the caller graph for this function:

Return location of $INSTANCE_HOME

Definition at line 676 of file QuickInstallerTool.py.

00676 
00677     def getInstanceHome(self):
00678         """Return location of $INSTANCE_HOME
00679         """
00680         return INSTANCE_HOME
00681 
00682 InitializeClass(QuickInstallerTool)
Returns the profile description for a given product.

Definition at line 336 of file QuickInstallerTool.py.

00336 
00337     def getProductDescription(self, p):
00338         """Returns the profile description for a given product.
00339         """
00340         profile = self.getInstallProfile(p)
00341         if profile is None:
00342             return None
00343         return profile.get('description', None)

Here is the call graph for this function:

def CMFQuickInstallerTool.QuickInstallerTool.QuickInstallerTool.getProductFile (   self,
  p,
  fname = 'readme.txt' 
)
Return the content of a file of the product
case-insensitive, if it does not exist -> None

Definition at line 305 of file QuickInstallerTool.py.

00305 
00306     def getProductFile(self,p,fname='readme.txt'):
00307         """Return the content of a file of the product
00308         case-insensitive, if it does not exist -> None
00309         """
00310         try:
00311             prodpath=self.Control_Panel.Products._getOb(p).home
00312         except AttributeError:
00313             return None
00314 
00315         #now list the directory to get the readme.txt case-insensitive
00316         try:
00317             files=os.listdir(prodpath)
00318         except OSError:
00319             return None
00320 
00321         for f in files:
00322             if f.lower()==fname:
00323                 text = open(os.path.join(prodpath,f)).read()
00324                 try:
00325                     return unicode(text)
00326                 except UnicodeDecodeError:
00327                     try:
00328                         return unicode(text, 'utf-8')
00329                     except UnicodeDecodeError:
00330                         return unicode(text, 'utf-8', 'replace')
00331         return None

Here is the caller graph for this function:

Return the version string stored in version.txt or the one found
in the GS profile.

Definition at line 345 of file QuickInstallerTool.py.

00345 
00346     def getProductVersion(self,p):
00347         """Return the version string stored in version.txt or the one found
00348         in the GS profile.
00349         """
00350         res = self.getProductFile(p, 'version.txt')
00351         if res is not None:
00352             res = res.strip()
00353         else:
00354             # Try to look up the version from the GS profile
00355             profiles = self.getInstallProfiles(p)
00356             if profiles:
00357                 profile = profiles[0]
00358                 portal_setup = getToolByName(self, 'portal_setup')
00359                 version = portal_setup.getVersionForProfile(profile)
00360                 if isinstance(version, basestring):
00361                     res = str(version.strip())
00362         return res
00363 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 650 of file QuickInstallerTool.py.

00650 
00651     def getQIElements(self):
00652         res = ['types', 'skins', 'actions', 'portalobjects', 'workflows', 
00653                   'leftslots', 'rightslots', 'registrypredicates',
00654                   'resources_js', 'resources_css']
00655         return res

Here is the caller graph for this function:

def CMFQuickInstallerTool.QuickInstallerTool.QuickInstallerTool.installProduct (   self,
  p,
  locked = False,
  hidden = False,
  swallowExceptions = None,
  reinstall = False,
  forceProfile = False,
  omitSnapshots = True,
  profile = None 
)
Install a product by name

Definition at line 453 of file QuickInstallerTool.py.

00453 
00454                        profile=None):
00455         """Install a product by name
00456         """
00457         __traceback_info__ = (p,)
00458 
00459         if profile is not None:
00460             forceProfile = True
00461 
00462         if self.isProductInstalled(p):
00463             prod = self._getOb(p)
00464             msg = ('This product is already installed, '
00465                    'please uninstall before reinstalling it.')
00466             prod.log(msg)
00467             return msg
00468 
00469         portal=aq_parent(self)
00470 
00471         before=self.snapshotPortal(portal)
00472 
00473         if hasattr(self, "REQUEST"):
00474             reqstorage=IAnnotatable(self.REQUEST, None)
00475             if reqstorage is not None:
00476                 key="Products.CMFQUickInstaller.Installing"
00477                 if reqstorage.has_key(key):
00478                     installing=reqstorage[key]
00479                 else:
00480                     installing=reqstorage[key]=set()
00481                 installing.add(p)
00482         else:
00483             reqstorage=None
00484 
00485         # XXX We can not use getToolByName since that returns a utility
00486         # without a RequestContainer. This breaks import steps that need
00487         # to run tools which request self.REQUEST.
00488         portal_setup = aq_get(portal, 'portal_setup', None, 1)
00489         status=None
00490         res=''
00491 
00492         # Create a snapshot before installation
00493         before_id = portal_setup._mangleTimestampName('qi-before-%s' % p)
00494         if not omitSnapshots:
00495             portal_setup.createSnapshot(before_id)
00496 
00497         install = False
00498         if not forceProfile:
00499             try:
00500                 # Install via external method
00501                 install = self.getInstallMethod(p).__of__(portal)
00502             except AttributeError:
00503                 # No classic install method found
00504                 pass
00505 
00506         if install and not forceProfile:
00507             try:
00508                 res=install(portal, reinstall=reinstall)
00509             except TypeError:
00510                 res=install(portal)
00511             status='installed'
00512         else:
00513             profiles = self.getInstallProfiles(p)
00514             if profiles:
00515                 if profile is None:
00516                     profile = profiles[0]
00517                     if len(profiles) > 1:
00518                         logger.log(logging.INFO,
00519                                    'Multiple extension profiles found for product '
00520                                    '%s. Used profile: %s' % (p, profile))
00521 
00522                 portal_setup.runAllImportStepsFromProfile('profile-%s' % profile)
00523                 status='installed'
00524             else:
00525                 # No install method and no profile, log / abort?
00526                 pass
00527 
00528         if reqstorage is not None:
00529             installing.remove(p)
00530 
00531         # Create a snapshot after installation
00532         after_id = portal_setup._mangleTimestampName('qi-after-%s' % p)
00533         if not omitSnapshots:
00534             portal_setup.createSnapshot(after_id)
00535 
00536         after=self.snapshotPortal(portal)
00537 
00538         settings=self.deriveSettingsFromSnapshots(before, after)
00539 
00540         jstool = getToolByName(self,'portal_javascripts', None)
00541         if jstool is not None:
00542             if len(settings['types']) > 0:
00543                 rr_css=getToolByName(portal,'portal_css')
00544                 rr_css.cookResources()
00545 
00546         msg=str(res)
00547         version=self.getProductVersion(p)
00548 
00549         # add the product
00550         self.notifyInstalled(p,
00551                       settings=settings,
00552                       installedversion=version,
00553                       logmsg=res,
00554                       status=status,
00555                       error=False,
00556                       locked=locked,
00557                       hidden=hidden,
00558                       afterid=after_id,
00559                       beforeid=before_id)
00560 
00561         prod = getattr(self, p)
00562         afterInstall = prod.getAfterInstallMethod()
00563         if afterInstall is not None:
00564             afterInstall = afterInstall.__of__(portal)
00565             afterRes=afterInstall(portal, reinstall=reinstall, product=prod)
00566             if afterRes:
00567                 res = res + '\n' + str(afterRes)
00568         return res

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFQuickInstallerTool.QuickInstallerTool.QuickInstallerTool.installProducts (   self,
  products = [],
  stoponerror = True,
  reinstall = False,
  REQUEST = None,
  forceProfile = False,
  omitSnapshots = True 
)

Definition at line 571 of file QuickInstallerTool.py.

00571 
00572                         REQUEST=None, forceProfile=False, omitSnapshots=True):
00573         """ """
00574         res = """
00575     Installed Products
00576     ====================
00577     """
00578         ok = True
00579         # return products
00580         for p in products:
00581             res += p +':'
00582             r=self.installProduct(p, swallowExceptions=not stoponerror,
00583                                   reinstall=reinstall,
00584                                   forceProfile=forceProfile,
00585                                   omitSnapshots=omitSnapshots)
00586             res +='ok:\n'
00587             if r:
00588                 res += str(r)+'\n'
00589         if REQUEST :
00590             REQUEST.RESPONSE.redirect(REQUEST['HTTP_REFERER'])
00591 
00592         return res

Here is the call graph for this function:

Here is the caller graph for this function:

Is the Zope server in debug mode?

Definition at line 670 of file QuickInstallerTool.py.

00670 
00671     def isDevelopmentMode(self):
00672         """Is the Zope server in debug mode?
00673         """
00674         return not not DevelopmentMode

Asks wether a product is installable by trying to get its install
   method or an installation profile.

Definition at line 167 of file QuickInstallerTool.py.

00167 
00168     def isProductInstallable(self, productname):
00169         """Asks wether a product is installable by trying to get its install
00170            method or an installation profile.
00171         """
00172         not_installable = []
00173         utils = getAllUtilitiesRegisteredFor(INonInstallable)
00174         for util in utils:
00175             not_installable.extend(util.getNonInstallableProducts())
00176         if productname in not_installable:
00177             return False
00178         try:
00179             meth=self.getInstallMethod(productname)
00180             return True
00181         except AttributeError:
00182             profiles = self.getInstallProfiles(productname)
00183             if not profiles:
00184                 return False
00185             setup_tool = getToolByName(self, 'portal_setup')
00186             try:
00187                 # XXX Currently QI always uses the first profile 
00188                 setup_tool.getProfileDependencyChain(profiles[0])
00189             except KeyError, e:
00190                 if not getattr(self, "errors", {}):
00191                     self.errors = {}
00192                 # Don't show twice the same error: old install and profile
00193                 # oldinstall is test in first in other methods we may have an
00194                 # extra 'Products.' in the namespace
00195                 checkname = productname
00196                 if checkname.startswith('Products.'):
00197                     checkname = checkname[9:]
00198                 else:
00199                     checkname = 'Products.' + checkname
00200                 if self.errors.has_key(checkname):
00201                     if self.errors[checkname]['value'] == e.args[0]:
00202                         return False
00203                     else:
00204                         # A new error is found, register it
00205                         self.errors[productname] = dict(
00206                             type= _(u"dependency_missing", default=u"Missing dependency"),
00207                             value = e.args[0],
00208                             productname = productname)
00209                 else:
00210                     self.errors[productname] = dict(
00211                         type= _(u"dependency_missing", default=u"Missing dependency"),
00212                         value = e.args[0],
00213                         productname = productname)
00214 
00215                 return False
00216 
00217             return True

Here is the call graph for this function:

Here is the caller graph for this function:

Check wether a product is installed (by name)

Definition at line 593 of file QuickInstallerTool.py.

00593 
00594     def isProductInstalled(self, productname):
00595         """Check wether a product is installed (by name)
00596         """
00597         o = self._getOb(productname, None)
00598         return o is not None and o.isInstalled()

Here is the call graph for this function:

Here is the caller graph for this function:

List candidate CMF products for installation -> list of dicts
   with keys:(id,title,hasError,status)

Definition at line 234 of file QuickInstallerTool.py.

00234 
00235     def listInstallableProducts(self, skipInstalled=True):
00236         """List candidate CMF products for installation -> list of dicts
00237            with keys:(id,title,hasError,status)
00238         """
00239         # reset the list of broken products
00240         self.errors = {}
00241 
00242         # Get product list from control panel
00243         pids = self.Control_Panel.Products.objectIds()
00244         pids = [p for p in pids if self.isProductInstallable(p)]
00245 
00246         # Get product list from the extension profiles
00247         profile_pids = self.listInstallableProfiles()
00248         profile_pids = [p for p in profile_pids if self.isProductInstallable(p)]
00249         for p in profile_pids:
00250             if p.startswith('Products.'):
00251                 p = p[9:]
00252             if p not in pids:
00253                 pids.append(p)
00254 
00255         if skipInstalled:
00256             installed=[p['id'] for p in self.listInstalledProducts(showHidden=True)]
00257             pids=[r for r in pids if r not in installed]
00258 
00259         res=[]
00260         for r in pids:
00261             p=self._getOb(r,None)
00262             name = r
00263             profile = self.getInstallProfile(r)
00264             if profile:
00265                 name = profile['title']
00266             if p:
00267                 res.append({'id':r, 'title':name, 'status':p.getStatus(),
00268                             'hasError':p.hasError()})
00269             else:
00270                 res.append({'id':r, 'title':name,'status':'new', 'hasError':False})
00271         res.sort(lambda x,y: cmp(x.get('title', x.get('id', None)),
00272                                  y.get('title', y.get('id', None))))
00273         return res

Here is the call graph for this function:

List candidate products which have a GS profiles.

Definition at line 222 of file QuickInstallerTool.py.

00222 
00223     def listInstallableProfiles(self):
00224         """List candidate products which have a GS profiles.
00225         """
00226         portal_setup = getToolByName(self, 'portal_setup')
00227         profiles = portal_setup.listProfileInfo()
00228 
00229         # We are only interested in extension profiles
00230         profiles = [prof['product'] for prof in profiles if
00231             prof['type'] == EXTENSION]
00232         return set(profiles)

Here is the call graph for this function:

Here is the caller graph for this function:

Returns a list of products that are installed -> list of
dicts with keys:(id, title, hasError, status, isLocked, isHidden,
installedVersion)

Definition at line 275 of file QuickInstallerTool.py.

00275 
00276     def listInstalledProducts(self, showHidden=False):
00277         """Returns a list of products that are installed -> list of
00278         dicts with keys:(id, title, hasError, status, isLocked, isHidden,
00279         installedVersion)
00280         """
00281         pids = [o.id for o in self.objectValues()
00282                 if o.isInstalled() and (o.isVisible() or showHidden)]
00283         pids = [pid for pid in pids if self.isProductInstallable(pid)]
00284 
00285         res=[]
00286 
00287         for r in pids:
00288             p = self._getOb(r,None)
00289             name = r
00290             profile = self.getInstallProfile(r)
00291             if profile:
00292                 name = profile['title']
00293             
00294             res.append({'id':r,
00295                         'title':name,
00296                         'status':p.getStatus(),
00297                         'hasError':p.hasError(),
00298                         'isLocked':p.isLocked(),
00299                         'isHidden':p.isHidden(),
00300                         'installedVersion':p.getInstalledVersion()})
00301         res.sort(lambda x,y: cmp(x.get('title', x.get('id', None)),
00302                                  y.get('title', y.get('id', None))))
00303         return res

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFQuickInstallerTool.QuickInstallerTool.QuickInstallerTool.notifyInstalled (   self,
  p,
  locked = True,
  hidden = False,
  settings = {},
  kw 
)
Marks a product that has been installed
without QuickInstaller as installed

Definition at line 600 of file QuickInstallerTool.py.

00600 
00601     def notifyInstalled(self,p,locked=True,hidden=False,settings={},**kw):
00602         """Marks a product that has been installed
00603         without QuickInstaller as installed
00604         """
00605 
00606         if not p in self.objectIds():
00607             ip = InstalledProduct(p)
00608             self._setObject(p,ip)
00609             
00610         p = getattr(self, p)
00611         p.update(settings,locked=locked, hidden=hidden, **kw)

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFQuickInstallerTool.QuickInstallerTool.QuickInstallerTool.reinstallProducts (   self,
  products,
  REQUEST = None,
  omitSnapshots = True 
)
Reinstalls a list of products, the main difference to
uninstall/install is that it does not remove portal objects
created during install (e.g. tools, etc.)

Definition at line 628 of file QuickInstallerTool.py.

00628 
00629     def reinstallProducts(self, products, REQUEST=None, omitSnapshots=True):
00630         """Reinstalls a list of products, the main difference to
00631         uninstall/install is that it does not remove portal objects
00632         created during install (e.g. tools, etc.)
00633         """
00634         if isinstance(products, basestring):
00635             products=[products]
00636 
00637         # only delete everything EXCEPT portalobjects (tools etc) for reinstall
00638         cascade=[c for c in InstalledProduct.default_cascade
00639                  if c != 'portalobjects']
00640         self.uninstallProducts(products, cascade, reinstall=True)
00641         self.installProducts(products,
00642                              stoponerror=True,
00643                              reinstall=True,
00644                              omitSnapshots=omitSnapshots)
00645 
00646         if REQUEST:
00647             return REQUEST.RESPONSE.redirect(REQUEST['HTTP_REFERER'])

Here is the call graph for this function:

Definition at line 365 of file QuickInstallerTool.py.

00365 
00366     def snapshotPortal(self, portal):
00367         portal_types=getToolByName(portal,'portal_types')
00368         portal_skins=getToolByName(portal,'portal_skins')
00369         portal_actions=getToolByName(portal,'portal_actions')
00370         portal_workflow=getToolByName(portal,'portal_workflow')
00371         type_registry=getToolByName(portal,'content_type_registry')
00372 
00373         state={}
00374         state['leftslots']=getattr(portal,'left_slots',[])
00375         if callable(state['leftslots']):
00376             state['leftslots']=state['leftslots']()
00377         state['rightslots']=getattr(portal,'right_slots',[])
00378         if callable(state['rightslots']):
00379             state['rightslots']=state['rightslots']()
00380         state['registrypredicates']=[pred[0] for pred in type_registry.listPredicates()]
00381 
00382         state['types']=portal_types.objectIds()
00383         state['skins']=portal_skins.objectIds()
00384         actions= set()
00385         for category in portal_actions.objectIds():
00386             for action in portal_actions[category].objectIds():
00387                 actions.add((category, action))
00388         state['actions']=actions
00389         state['workflows']=portal_workflow.objectIds()
00390         state['portalobjects']=portal.objectIds()
00391         state['adapters']= tuple(getSiteManager().registeredAdapters())
00392         state['utilities']= tuple(getSiteManager().registeredUtilities())
00393 
00394         jstool = getToolByName(portal,'portal_javascripts', None)
00395         if jstool is not None:
00396             state['resources_js']= jstool.getResourceIds()
00397         else:
00398             state['resources_js']= []
00399         csstool = getToolByName(portal,'portal_css', None)
00400         if jstool is not None:
00401             state['resources_css']= csstool.getResourceIds()
00402         else:
00403             state['resources_css']= []
00404 
00405         return state
00406 

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFQuickInstallerTool.QuickInstallerTool.QuickInstallerTool.uninstallProducts (   self,
  products = [],
  cascade = InstalledProduct.default_cascade,
  reinstall = False,
  REQUEST = None 
)
Removes a list of products

Definition at line 616 of file QuickInstallerTool.py.

00616 
00617                           REQUEST=None):
00618         """Removes a list of products
00619         """
00620         for pid in products:
00621             prod=getattr(self,pid)
00622             prod.uninstall(cascade=cascade, reinstall=reinstall)
00623 
00624         if REQUEST:
            return REQUEST.RESPONSE.redirect(REQUEST['HTTP_REFERER'])

Member Data Documentation

Definition at line 190 of file QuickInstallerTool.py.

Definition at line 333 of file QuickInstallerTool.py.

string CMFQuickInstallerTool.QuickInstallerTool.QuickInstallerTool.id = 'portal_quickinstaller' [static]

Definition at line 68 of file QuickInstallerTool.py.

Definition at line 84 of file QuickInstallerTool.py.

Definition at line 219 of file QuickInstallerTool.py.

Initial value:
PageTemplateFile(
        'forms/install_products_form', globals(),
        __name__='manage_installProductsForm')

Definition at line 77 of file QuickInstallerTool.py.

Initial value:
(
        {'label':'Install', 'action':'manage_installProductsForm'},
        )

Definition at line 72 of file QuickInstallerTool.py.

string CMFQuickInstallerTool.QuickInstallerTool.QuickInstallerTool.meta_type = 'CMF QuickInstaller Tool' [static]

Definition at line 67 of file QuickInstallerTool.py.

Definition at line 648 of file QuickInstallerTool.py.

Definition at line 70 of file QuickInstallerTool.py.

Definition at line 625 of file QuickInstallerTool.py.


The documentation for this class was generated from the following file: