Last change
on this file was
489,
checked in by piv, 18 years ago
|
edit any number of items at the same time
|
File size:
889 bytes
|
Line | |
---|
1 | from zope.interface import implements |
---|
2 | from zope.component import adapts |
---|
3 | |
---|
4 | from plone.locking.interfaces import ILockable |
---|
5 | from plone.locking.interfaces import ITTWLockable |
---|
6 | from plone.locking.interfaces import STEALABLE_LOCK |
---|
7 | |
---|
8 | class DummyTTWLockable(object): |
---|
9 | """ This class provides all methods needed of ILockable adapter. |
---|
10 | """ |
---|
11 | |
---|
12 | implements(ILockable) |
---|
13 | adapts(ITTWLockable) |
---|
14 | |
---|
15 | def __init__(self, context): |
---|
16 | self.context = context |
---|
17 | |
---|
18 | def lock(self, lock_type=STEALABLE_LOCK, children=False): |
---|
19 | pass |
---|
20 | |
---|
21 | def unlock(self, lock_type=STEALABLE_LOCK, stealable_only=True): |
---|
22 | pass |
---|
23 | |
---|
24 | def clear_locks(self): |
---|
25 | pass |
---|
26 | |
---|
27 | def locked(self): |
---|
28 | return False |
---|
29 | |
---|
30 | def can_safely_unlock(self, lock_type=STEALABLE_LOCK): |
---|
31 | return True |
---|
32 | |
---|
33 | def stealable(self, lock_type=STEALABLE_LOCK): |
---|
34 | return True |
---|
35 | |
---|
36 | def lock_info(self): |
---|
37 | return [] |
---|
Note: See
TracBrowser
for help on using the repository browser.