Back to index

plone3  3.1.7
Public Member Functions | Private Attributes | Static Private Attributes
CMFCore.CatalogTool.IndexableObjectWrapper Class Reference

List of all members.

Public Member Functions

def __init__
def __str__
def __getattr__
def allowedRolesAndUsers
def cmf_uid

Private Attributes

 __vars
 __ob

Static Private Attributes

 __implements__ = z2IIndexableObjectWrapper
tuple __providedBy__ = IndexableObjectSpecification()

Detailed Description

Definition at line 61 of file CatalogTool.py.


Constructor & Destructor Documentation

def CMFCore.CatalogTool.IndexableObjectWrapper.__init__ (   self,
  vars,
  ob 
)

Definition at line 67 of file CatalogTool.py.

00067 
00068     def __init__(self, vars, ob):
00069         self.__vars = vars
00070         self.__ob = ob


Member Function Documentation

Definition at line 78 of file CatalogTool.py.

00078 
00079     def __getattr__(self, name):
00080         vars = self.__vars
00081         if vars.has_key(name):
00082             return vars[name]
00083         return getattr(self.__ob, name)

Here is the caller graph for this function:

Definition at line 71 of file CatalogTool.py.

00071 
00072     def __str__(self):
00073         try:
00074             # __str__ is used to get the data of File objects
00075             return self.__ob.__str__()
00076         except AttributeError:
00077             return object.__str__(self)

Return a list of roles and users with View permission.
Used by PortalCatalog to filter out items you're not allowed to see.

Definition at line 84 of file CatalogTool.py.

00084 
00085     def allowedRolesAndUsers(self):
00086         """
00087         Return a list of roles and users with View permission.
00088         Used by PortalCatalog to filter out items you're not allowed to see.
00089         """
00090         ob = self.__ob
00091         allowed = {}
00092         for r in rolesForPermissionOn(View, ob):
00093             allowed[r] = 1
00094         localroles = _mergedLocalRoles(ob)
00095         for user, roles in localroles.items():
00096             for role in roles:
00097                 if allowed.has_key(role):
00098                     allowed['user:' + user] = 1
00099         if allowed.has_key('Owner'):
00100             del allowed['Owner']
00101         return list(allowed.keys())

Here is the call graph for this function:

Return the CMFUid UID of the object while making sure
it is not accidentally acquired.

Definition at line 102 of file CatalogTool.py.

00102 
00103     def cmf_uid(self):
00104         """
00105         Return the CMFUid UID of the object while making sure
00106         it is not accidentally acquired.
00107         """
00108         cmf_uid = getattr(aq_base(self.__ob), 'cmf_uid', '')
00109         if safe_callable(cmf_uid):
00110             return cmf_uid()
00111         return cmf_uid
00112 

Here is the call graph for this function:


Member Data Documentation

CMFCore.CatalogTool.IndexableObjectWrapper.__implements__ = z2IIndexableObjectWrapper [static, private]

Definition at line 64 of file CatalogTool.py.

Definition at line 69 of file CatalogTool.py.

Definition at line 65 of file CatalogTool.py.

Definition at line 68 of file CatalogTool.py.


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