Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
plone.app.contentrules.actions.delete.DeleteActionExecutor Class Reference

List of all members.

Public Member Functions

def __init__
def __call__
def error

Public Attributes

 context
 element
 event

Detailed Description

The executor for this action.

Definition at line 33 of file delete.py.


Constructor & Destructor Documentation

def plone.app.contentrules.actions.delete.DeleteActionExecutor.__init__ (   self,
  context,
  element,
  event 
)

Definition at line 39 of file delete.py.

00039 
00040     def __init__(self, context, element, event):
00041         self.context = context
00042         self.element = element
00043         self.event = event

Here is the caller graph for this function:


Member Function Documentation

Definition at line 44 of file delete.py.

00044 
00045     def __call__(self):
00046         obj = self.event.object
00047         parent = aq_parent(aq_inner(obj))
00048         
00049         transaction.savepoint()        
00050         
00051         try:
00052             parent.manage_delObjects(obj.getId())
00053         except ConflictError, e:
00054             raise e
00055         except Exception, e:
00056             self.error(obj, str(e))
00057             return False
00058         
00059         return True 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 60 of file delete.py.

00060 
00061     def error(self, obj, error):
00062         request = getattr(self.context, 'REQUEST', None)
00063         if request is not None:
00064             title = utils.pretty_title_or_id(obj, obj)
00065             message = _(u"Unable to move ${name} as part of content rule 'move' action: ${error}",
00066                           mapping={'name' : title, 'error' : error})
00067             IStatusMessage(request).addStatusMessage(message, type="error")
        

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 40 of file delete.py.

Definition at line 41 of file delete.py.

Definition at line 42 of file delete.py.


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