Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes | Private Attributes
PlonePAS.tools.groupdata.GroupDataTool Class Reference
Collaboration diagram for PlonePAS.tools.groupdata.GroupDataTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def wrapGroup
 an exact copy from the base, so that we pick up the new GroupData.

Static Public Attributes

string meta_type = "PlonePAS GroupData Tool"
string toolicon = 'tool.gif'

Private Attributes

 _v_temps

Detailed Description

PAS-specific implementation of groupdata tool. Uses Plone
GroupDataTool as a base.

Definition at line 56 of file groupdata.py.


Member Function Documentation

an exact copy from the base, so that we pick up the new GroupData.

wrapGroup should have a GroupData factory method to over-ride (or even set at run-time!) so that we don't have to do this.

Returns an object implementing the GroupData interface.

Definition at line 68 of file groupdata.py.

00068 
00069     def wrapGroup(self, g):
00070         """Returns an object implementing the GroupData interface."""
00071 
00072         id = g.getId()
00073         members = self._members
00074         if not members.has_key(id):
00075             # Get a temporary member that might be
00076             # registered later via registerMemberData().
00077             temps = self._v_temps
00078             if temps is not None and temps.has_key(id):
00079                 portal_group = temps[id]
00080             else:
00081                 base = aq_base(self)
00082                 portal_group = GroupData(base, id)
00083                 if temps is None:
00084                     self._v_temps = {id:portal_group}
00085                     if hasattr(self, 'REQUEST'):
00086                         # No REQUEST during tests.
00087                         # XXX jcc => CleanupTemp doesn't seem to work
00088                         # on Plone 1.0.3.  Have to find a way to pass
00089                         # around...
00090                         if _have_cleanup_temp:
00091                             self.REQUEST._hold(CleanupTemp(self))
00092                 else:
00093                     temps[id] = portal_group
00094         else:
00095             portal_group = members[id]
00096         # Return a wrapper with self as containment and
00097         # the user as context.
00098         return portal_group.__of__(self).__of__(g)
00099 
00100 InitializeClass(GroupDataTool)
00101 registerToolInterface('portal_groupdata', IGroupDataTool)
00102 

Here is the caller graph for this function:


Member Data Documentation

Definition at line 83 of file groupdata.py.

Definition at line 61 of file groupdata.py.

Definition at line 62 of file groupdata.py.


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