Back to index

plone3  3.1.7
Public Member Functions
plone.locking.browser.locking.LockingOperations Class Reference
Inheritance diagram for plone.locking.browser.locking.LockingOperations:
Inheritance graph
[legend]
Collaboration diagram for plone.locking.browser.locking.LockingOperations:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def force_unlock
def safe_unlock

Detailed Description

Lock acquisition and stealing operations

Definition at line 12 of file locking.py.


Member Function Documentation

def plone.locking.browser.locking.LockingOperations.force_unlock (   self,
  redirect = True 
)
Steal the lock.

If redirect is True, redirect back to the context URL, i.e. reload
the page.

Definition at line 16 of file locking.py.

00016 
00017     def force_unlock(self, redirect=True):
00018         """Steal the lock.
00019 
00020         If redirect is True, redirect back to the context URL, i.e. reload
00021         the page.
00022         """
00023         lockable = ILockable(self.context)
00024         lockable.unlock()
00025         if redirect:
00026             self.request.RESPONSE.redirect(self.context.absolute_url())

Here is the call graph for this function:

Unlock the object if the current user has the lock

Definition at line 27 of file locking.py.

00027 
00028     def safe_unlock(self):
00029         """Unlock the object if the current user has the lock
00030         """
00031         lockable = ILockable(self.context)
00032         if lockable.can_safely_unlock():
00033             lockable.unlock()

Here is the call graph for this function:


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