Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
CMFCore.interfaces._tools.IMemberDataTool Class Reference
Inheritance diagram for CMFCore.interfaces._tools.IMemberDataTool:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.interfaces._tools.IMemberDataTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def wrapUser
def getMemberDataContents
def pruneMemberDataContents
def searchMemberData
def registerMemberData
def deleteMemberData

Static Public Attributes

tuple id

Detailed Description

Decorate user objects with site-local data.

Definition at line 524 of file _tools.py.


Member Function Documentation

Delete member data of specified member.

o Return True if a record was deleted, else False.

o Permission:  Private (Python only)

Definition at line 604 of file _tools.py.

00604 
00605     def deleteMemberData(member_id):
00606         """ Delete member data of specified member.
00607 
00608         o Return True if a record was deleted, else False.
00609 
00610         o Permission:  Private (Python only)
00611         """

Returns a list containing a dictionary with information
about the _members BTree contents

o The key 'member_count' is the total number of member instances
  stored in the memberdata-tool

o The key 'orphan_count' is the number of member instances
  that for are no longer in the underlying acl_users user folder.

o The result is designed to be iterated over in a dtml-in

o XXX:  why a sequence?

o Permission:  Private (Python-only)

Definition at line 545 of file _tools.py.

00545 
00546     def getMemberDataContents():
00547         """ Returns a list containing a dictionary with information
00548         about the _members BTree contents
00549 
00550         o The key 'member_count' is the total number of member instances
00551           stored in the memberdata-tool
00552 
00553         o The key 'orphan_count' is the number of member instances
00554           that for are no longer in the underlying acl_users user folder.
00555 
00556         o The result is designed to be iterated over in a dtml-in
00557 
00558         o XXX:  why a sequence?
00559 
00560         o Permission:  Private (Python-only)
00561         """

Delete member data of all members not findable in acl_users.

o Compare the user IDs stored in the member data tool with the
  list in the actual underlying acl_users and delete any records whose
  user cannot be found.

o Permission:  Private (Python only)

Definition at line 562 of file _tools.py.

00562 
00563     def pruneMemberDataContents():
00564         """ Delete member data of all members not findable in acl_users.
00565 
00566         o Compare the user IDs stored in the member data tool with the
00567           list in the actual underlying acl_users and delete any records whose
00568           user cannot be found.
00569 
00570         o Permission:  Private (Python only)
00571         """

Add the given member data to the _members btree.

o 'm' is an object whose attributes are the memberdata for the member.

o 'id' is the userid of the member.

o Add the record late as possible to avoid side effect transactions
  and to reduce the necessary number of entries.

o XXX: these argument names are silly;  can we use more sensible
  ones (i.e., does anyone actually depend on them)?

o Permission:  Private (Python only)

Definition at line 588 of file _tools.py.

00588 
00589     def registerMemberData(m, id):
00590         """ Add the given member data to the _members btree.
00591 
00592         o 'm' is an object whose attributes are the memberdata for the member.
00593 
00594         o 'id' is the userid of the member.
00595 
00596         o Add the record late as possible to avoid side effect transactions
00597           and to reduce the necessary number of entries.
00598 
00599         o XXX: these argument names are silly;  can we use more sensible
00600           ones (i.e., does anyone actually depend on them)?
00601 
00602         o Permission:  Private (Python only)
00603         """

def CMFCore.interfaces._tools.IMemberDataTool.searchMemberData (   search_param,
  search_term,
  attributes = () 
)
Return a sequence of mappings of memberdata for the given criteria.

o 'search_param' is the property ID to be searched.

o 'search_term' is the property value to be searched.

o 'attributes', if passed, controls the keys in the returned mappings;
  by default the returned keys are 'username' and 'email'.

o XXX:  that default is silly;  if it is truly needed, then it should
  be the default value of the 'attributes' argument.

o Permission:  Private (Python only)

Definition at line 572 of file _tools.py.

00572 
00573     def searchMemberData(search_param, search_term, attributes=()):
00574         """ Return a sequence of mappings of memberdata for the given criteria.
00575 
00576         o 'search_param' is the property ID to be searched.
00577 
00578         o 'search_term' is the property value to be searched.
00579 
00580         o 'attributes', if passed, controls the keys in the returned mappings;
00581           by default the returned keys are 'username' and 'email'.
00582 
00583         o XXX:  that default is silly;  if it is truly needed, then it should
00584           be the default value of the 'attributes' argument.
00585 
00586         o Permission:  Private (Python only)
00587         """

Returns an IMember corresponding to the given user object.

o Permission:  Private (Python-only)

Definition at line 539 of file _tools.py.

00539 
00540     def wrapUser(user):
00541         """Returns an IMember corresponding to the given user object.
00542 
00543         o Permission:  Private (Python-only)
00544         """

Here is the caller graph for this function:


Member Data Documentation

Initial value:
Attribute('id',
            """ The tool's ID.o BBB:  for use in 'getToolByName';  in the future, prefer  'zapi.getUtility(IMemberDataTool)'.o Must be set to 'portal_memberdata'""",
            )
Decorate user objects with site-local data.

Definition at line 529 of file _tools.py.


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