Logo Search packages:      
Sourcecode: zope-cmfquickinstallertool version File versions  Download package

portal_quickinstaller.py

from interface import Interface, Attribute

00003 class IQuickInstallerTool(Interface):
    ''' the QuickInstaller Tool
        contains 'InstalledProduct' instances
    '''

    id = Attribute('id', 'Must be set to "portal_quickinstaller"')

00010     def listInstallableProducts(skipInstalled=1):
        ''' list candidate CMF products for installation -> list of dicts with
            keys:(id,hasError,status)'''

00014     def listInstalledProducts(showHidden=0):
        ''' returns a list of products that are installed -> list of dicts with
            keys:(id,hasError,status,,isLocked,isHidden)'''

00018     def isProductInstallable(productname):
        ''' is the product directory present and ready for installation '''

00021     def isProductAvailable(productname):
        ''' is the product directory present (to check if it has been deleted
            from the Filesystem '''

00025     def installProduct(p,locked=0,hidden=0,swallowExceptions=0):
        ''' installs a product by name
            throws AlreadyInstalled exception, if components of the product are
            already installed

            if swallowExceptions is true, exceptions are caught and logged
        '''

00033     def installProducts(products=[], stoponerror=0, REQUEST=None):
        ''' installs the products specified in the products list'''

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

00040     def getProductReadme(p):
        ''' returns the readme file of the product case-insensitive '''

00043     def getProductVersion(p):
        ''' returns the version string stored in version.txt'''

00046     def isProductInstalled(productname):
        ''' checks wether a product is installed (by name) '''

00049     def notifyInstalled(p,locked=1, hidden=0, **kw):
        ''' marks a product that has been installed without QuickInstaller
         as installed
         if locked is set -> the prod cannot be uninstalled
         if hidden is set -> the prod is not listed in the UI
         the **kw param is passed to the constructor of InstalledProduct
         '''


00058     def uninstallProducts( products, cascade=['types','skins','actions',
        'portalobjects','workflows','slots','registrypredicates'],REQUEST=None):
        ''' removes a list of products, cascade defines which items created by
            the install shall be uninstalled '''

00063     def reinstallProducts( products, REQUEST=None):
        ''' reinstalls a list of products, the main difference to
            ininstall/reinstall is that it does not remove portal objects
            created  during install (e.g. tools, etc.)'''

00068 class IInstalledProduct(Interface):
    ''' represents the installed product
        is contained inside the QuickInstallerTool '''

    id = Attribute('id', 'Must be set to the same name as the product directory')

    types = Attribute('types','default: []')
    skins = Attribute('types','default: []')
    actions = Attribute('types','default: []')
    portalobjects = Attribute('types','default: []')
    workflows = Attribute('types','default: []')
    leftslots = Attribute('types','default: []')
    rightslots = Attribute('types','default: []')

00082     def __init__(id,types=[],skins=[],actions=[],portalobjects=[],
        workflows=[],leftslots=[],rightslots=[],registrypredicates=[],logmsg='',
        status='installed', error=0, locked=0, hidden=0):
        ''' constructor '''

00087     def update(types=[],skins=[],actions=[],portalobjects=[],workflows=[],
        leftslots=[],rightslots=[],registrypredicates=[],logmsg='',
        status='installed',error=0,locked=0,hidden=0):
        ''' updates the product attributes '''

00092     def log(logmsg):
        ''' adds a log to the transcript '''

00095     def hasError():
        ''' returns if the prod is in error state '''

00098     def isLocked():
        ''' is the product locked for uninstall '''

00101     def isHidden():
        ''' is the product hidden'''

00104     def isInstalled():
        ''' determines if the product is in already installed '''

00107     def getTranscriptAsText():
        ''' return the product's install log as plain text '''

00110     def uninstall(cascade=['types','skins','actions','portalobjects',
            'workflows','slots','registrypredicates'],REQUEST=None):
        '''uninstalls the prod and removes its deps
           the parameter 'cascade' specifies what should be deleted while
           uninstalling the product

           if the Product has an uninstall() method in its Install.py it gets
           called automatically
        '''
00119     def getInstalledVersion():
        ''' returns the version of the prod in the moment of installation '''

00122     def getValue(name):
        ''' returns a value that is tracked by QuickInstaller '''

Generated by  Doxygen 1.6.0   Back to index