Back to index

plone3  3.1.7
Classes | Functions | Variables
GenericSetup.zcml Namespace Reference

Classes

class  IRegisterProfileDirective
 genericsetup:registerProfile More...
class  IExportStepDirective
 genericsetup:exportStep More...
class  IImportStepDirective
 genericsetup:importStep More...
class  IImportStepDependsDirective
class  importStep
class  IUpgradeStepsDirective
class  IUpgradeStepsStepSubDirective
class  IUpgradeStepDirective
class  upgradeSteps

Functions

def registerProfile
def exportStep
def upgradeStep
def cleanUpProfiles
def cleanUpImportSteps
def cleanUpExportSteps

Variables

list _profile_regs = []
list _export_step_regs = []
list _import_step_regs = []

Function Documentation

Definition at line 309 of file zcml.py.

00309 
00310 def cleanUpExportSteps():
00311     global _export_step_regs
00312     for name in  _export_step_regs:
00313         try:
00314              _export_step_registry.unregisterStep( name )
00315         except KeyError:
00316             pass
00317 
00318     _export_step_regs=[]

Definition at line 299 of file zcml.py.

00299 
00300 def cleanUpImportSteps():
00301     global _import_step_regs
00302     for name in  _import_step_regs:
00303         try:
00304              _import_step_registry.unregisterStep( name )
00305         except KeyError:
00306             pass
00307 
00308     _import_step_regs=[]

Definition at line 289 of file zcml.py.

00289 
00290 def cleanUpProfiles():
00291     global _profile_regs
00292     for profile_id in _profile_regs:
00293         del _profile_registry._profile_info[profile_id]
00294         _profile_registry._profile_ids.remove(profile_id)
00295     _profile_regs = []
00296 
00297     _upgrade_registry.clear()
00298 

def GenericSetup.zcml.exportStep (   context,
  name,
  handler,
  title = None,
  description = None 
)

Definition at line 123 of file zcml.py.

00123 
00124 def exportStep(context, name, handler, title=None, description=None):
00125     global _export_step_regs
00126     _export_step_regs.append(name)
00127 
00128     context.action(
00129         discriminator = ('exportStep', name),
00130         callable = _export_step_registry.registerStep,
00131         args = (name, handler, title, description),
        )
def GenericSetup.zcml.registerProfile (   _context,
  name = u'default',
  title = None,
  description = None,
  directory = None,
  provides = BASE,
  for_ = None 
)
Add a new profile to the registry.

Definition at line 75 of file zcml.py.

00075 
00076                     directory=None, provides=BASE, for_=None):
00077     """ Add a new profile to the registry.
00078     """
00079     product = _context.package.__name__
00080     if directory is None:
00081         directory = 'profiles/%s' % name
00082 
00083     if title is None:
00084         title = u"Profile '%s' from '%s'" % (name, product)
00085 
00086     if description is None:
00087         description = u''
00088 
00089     _profile_regs.append('%s:%s' % (product, name))
00090 
00091     _context.action(
00092         discriminator = ('registerProfile', product, name),
00093         callable = _profile_registry.registerProfile,
00094         args = (name, title, description, directory, product, provides, for_)
00095         )
00096 

def GenericSetup.zcml.upgradeStep (   _context,
  title,
  profile,
  handler,
  description = None,
  source = '*',
  destination = '*',
  sortkey = 0,
  checker = None 
)

Definition at line 250 of file zcml.py.

00250 
00251                 destination='*', sortkey=0, checker=None):
00252     step = UpgradeStep(title, profile, source, destination, description, handler,
00253                        checker, sortkey)
00254     _context.action(
00255         discriminator = ('upgradeStep', source, destination, handler, sortkey),
00256         callable = _registerUpgradeStep,
00257         args = (step,),
00258         )


Variable Documentation

Definition at line 121 of file zcml.py.

Definition at line 166 of file zcml.py.

Definition at line 73 of file zcml.py.