Back to index

plone3  3.1.7
Public Member Functions
plone.app.linkintegrity.browser.update.UpdateView Class Reference
Inheritance diagram for plone.app.linkintegrity.browser.update.UpdateView:
Inheritance graph
[legend]
Collaboration diagram for plone.app.linkintegrity.browser.update.UpdateView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __call__
def update

Detailed Description

Definition at line 10 of file update.py.


Member Function Documentation

Definition at line 12 of file update.py.

00012 
00013     def __call__(self):
00014         context = aq_inner(self.context)
00015         request = aq_inner(self.request)
00016         clicked = request.form.has_key
00017         if clicked('update') or clicked('delete_all'):
00018             count = self.update()
00019             msg = _(u'linkintegrity_update_info',
00020                 default=u'Link integrity information updated for ${count} item(s).',
00021                 mapping={'count': count})
00022             IStatusMessage(request).addStatusMessage(msg, type='info')
00023             request.RESPONSE.redirect(getToolByName(context, 'portal_url')())
00024         elif clicked('cancel'):
00025             msg = _(u'Update cancelled.')
00026             IStatusMessage(request).addStatusMessage(msg, type='info')
00027             request.RESPONSE.redirect(getToolByName(context, 'portal_url')())
00028         else:
00029             return self.index()

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 30 of file update.py.

00030 
00031     def update(self):
00032         catalog = getToolByName(self.context, 'portal_catalog')
00033         count = 0
00034         for brain in catalog(Language='all'):
00035             obj = brain.getObject()
00036             if IBaseObject.providedBy(obj):
00037                 modifiedArchetype(obj, 'dummy event parameter')
00038                 count += 1
00039         return count
00040 

Here is the call graph for this function:

Here is the caller graph for this function:


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