Back to index

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

List of all members.

Public Member Functions

def __init__
def wrapGroup
def registerGroupData

Static Public Attributes

string id = 'portal_groupdata'
string meta_type = 'CMF Group Data Tool'
tuple security = ClassSecurityInfo()
tuple manage_options
tuple manage_overview = DTMLFile('dtml/explainGroupDataTool', globals())

Private Attributes

 _members

Static Private Attributes

tuple __implements__ = (IGroupDataTool, ActionProviderBase.__implements__)
tuple _actions = ()
 _v_temps = None
tuple _properties = ({'id':'title', 'type': 'string', 'mode': 'wd'},)

Detailed Description

This tool wraps group objects, allowing transparent access to properties.

Definition at line 60 of file GroupDataTool.py.


Constructor & Destructor Documentation

Definition at line 90 of file GroupDataTool.py.

00090 
00091     def __init__(self):
00092         self._members = OOBTree()
00093         # Create the default properties.
00094         self._setProperty('description', '', 'text')
00095         self._setProperty('email', '', 'string')


Member Function Documentation

Adds the given member data to the _members dict.
This is done as late as possible to avoid side effect
transactions and to reduce the necessary number of
entries.

Definition at line 127 of file GroupDataTool.py.

00127 
00128     def registerGroupData(self, g, id):
00129         '''
00130         Adds the given member data to the _members dict.
00131         This is done as late as possible to avoid side effect
00132         transactions and to reduce the necessary number of
00133         entries.
00134         '''
00135         self._members[id] = aq_base(g)
00136 
00137 InitializeClass(GroupDataTool)
00138 

Returns an object implementing the GroupData interface

Definition at line 100 of file GroupDataTool.py.

00100 
00101     def wrapGroup(self, g):
00102         """Returns an object implementing the GroupData interface"""
00103         id = g.getId()
00104         members = self._members
00105         if not members.has_key(id):
00106             # Get a temporary member that might be
00107             # registered later via registerMemberData().
00108             temps = self._v_temps
00109             if temps is not None and temps.has_key(id):
00110                 portal_group = temps[id]
00111             else:
00112                 base = aq_base(self)
00113                 portal_group = GroupData(base, id)
00114                 if temps is None:
00115                     self._v_temps = {id:portal_group}
00116                     if hasattr(self, 'REQUEST'):
00117                         # No REQUEST during tests.
00118                         self.REQUEST._hold(CleanupTemp(self))
00119                 else:
00120                     temps[id] = portal_group
00121         else:
00122             portal_group = members[id]
00123         # Return a wrapper with self as containment and
00124         # the user as context.
00125         return portal_group.__of__(self).__of__(g)

Here is the caller graph for this function:


Member Data Documentation

tuple GroupUserFolder.GroupDataTool.GroupDataTool.__implements__ = (IGroupDataTool, ActionProviderBase.__implements__) [static, private]

Definition at line 64 of file GroupDataTool.py.

Definition at line 68 of file GroupDataTool.py.

Definition at line 91 of file GroupDataTool.py.

tuple GroupUserFolder.GroupDataTool.GroupDataTool._properties = ({'id':'title', 'type': 'string', 'mode': 'wd'},) [static, private]

Definition at line 71 of file GroupDataTool.py.

Definition at line 70 of file GroupDataTool.py.

string GroupUserFolder.GroupDataTool.GroupDataTool.id = 'portal_groupdata' [static]

Definition at line 66 of file GroupDataTool.py.

Initial value:
( ActionProviderBase.manage_options +
                     ({ 'label' : 'Overview'
                       , 'action' : 'manage_overview'
                       },
                     )
                   + PropertyManager.manage_options
                   + SimpleItem.manage_options
                   )

Definition at line 75 of file GroupDataTool.py.

tuple GroupUserFolder.GroupDataTool.GroupDataTool.manage_overview = DTMLFile('dtml/explainGroupDataTool', globals()) [static]

Definition at line 88 of file GroupDataTool.py.

string GroupUserFolder.GroupDataTool.GroupDataTool.meta_type = 'CMF Group Data Tool' [static]

Definition at line 67 of file GroupDataTool.py.

tuple GroupUserFolder.GroupDataTool.GroupDataTool.security = ClassSecurityInfo() [static]

Definition at line 73 of file GroupDataTool.py.


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