Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
GenericSetup.upgrade.UpgradeStep Class Reference

List of all members.

Public Member Functions

def __init__
def versionMatch
def isProposed
def doStep

Public Attributes

 id
 title
 source
 dest
 description
 handler
 checker
 sortkey
 profile

Detailed Description

A step to upgrade a component.

Definition at line 71 of file upgrade.py.


Constructor & Destructor Documentation

def GenericSetup.upgrade.UpgradeStep.__init__ (   self,
  title,
  profile,
  source,
  dest,
  desc,
  handler,
  checker = None,
  sortkey = 0 
)

Definition at line 75 of file upgrade.py.

00075 
00076                  checker=None, sortkey=0):
00077         self.id = str(abs(hash('%s%s%s%s' % (title, source, dest, sortkey))))
00078         self.title = title
00079         if source == '*':
00080             source = None
00081         elif isinstance(source, basestring):
00082             source = tuple(source.split('.'))
00083         self.source = source
00084         if dest == '*':
00085             dest = None
00086         elif isinstance(dest, basestring):
00087             dest = tuple(dest.split('.'))
00088         self.dest = dest
00089         self.description = desc
00090         self.handler = handler
00091         self.checker = checker
00092         self.sortkey = sortkey
00093         self.profile = profile


Member Function Documentation

def GenericSetup.upgrade.UpgradeStep.doStep (   self,
  tool 
)

Definition at line 111 of file upgrade.py.

00111 
00112     def doStep(self, tool):
00113         self.handler(tool)

def GenericSetup.upgrade.UpgradeStep.isProposed (   self,
  tool,
  source 
)
Check if a step can be applied.

False means already applied or does not apply.
True means can be applied.

Definition at line 99 of file upgrade.py.

00099 
00100     def isProposed(self, tool, source):
00101         """Check if a step can be applied.
00102 
00103         False means already applied or does not apply.
00104         True means can be applied.
00105         """
00106         checker = self.checker
00107         if checker is None:
00108             return self.versionMatch(source)
00109         else:
00110             return checker(tool)

Here is the call graph for this function:

def GenericSetup.upgrade.UpgradeStep.versionMatch (   self,
  source 
)

Definition at line 94 of file upgrade.py.

00094 
00095     def versionMatch(self, source):
00096         return (source is None or
00097                 self.source is None or
00098                 source <= self.source)

Here is the caller graph for this function:


Member Data Documentation

Definition at line 90 of file upgrade.py.

Definition at line 88 of file upgrade.py.

Definition at line 87 of file upgrade.py.

Definition at line 89 of file upgrade.py.

Definition at line 76 of file upgrade.py.

Definition at line 92 of file upgrade.py.

Definition at line 91 of file upgrade.py.

Definition at line 82 of file upgrade.py.

Definition at line 77 of file upgrade.py.


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