Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
Archetypes.UIDCatalog.UIDCatalogBrains Class Reference
Inheritance diagram for Archetypes.UIDCatalog.UIDCatalogBrains:
Inheritance graph
[legend]
Collaboration diagram for Archetypes.UIDCatalog.UIDCatalogBrains:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def getObject

Static Public Attributes

tuple security = ClassSecurityInfo()

Detailed Description

fried my little brains

Definition at line 72 of file UIDCatalog.py.


Member Function Documentation

def Archetypes.UIDCatalog.UIDCatalogBrains.getObject (   self,
  REQUEST = None 
)
Used to resolve UIDs into real objects. This also must be
annotation aware. The protocol is:
We have the path to an object. We get this object. If its
UID is not the UID in the brains then we need to pull it
from the reference annotation and return that object

Thus annotation objects store the path to the source object

Definition at line 77 of file UIDCatalog.py.

00077 
00078     def getObject(self, REQUEST=None):
00079         """
00080         Used to resolve UIDs into real objects. This also must be
00081         annotation aware. The protocol is:
00082         We have the path to an object. We get this object. If its
00083         UID is not the UID in the brains then we need to pull it
00084         from the reference annotation and return that object
00085 
00086         Thus annotation objects store the path to the source object
00087         """
00088         obj = None
00089         try:
00090             path = self.getPath()
00091             try:
00092                 portal = getToolByName(self, 'portal_url').getPortalObject()
00093                 obj = portal.unrestrictedTraverse(self.getPath())
00094                 obj = aq_inner( obj )
00095             except (ConflictError, KeyboardInterrupt):
00096                 raise
00097             except: #NotFound # XXX bare exception
00098                 pass
00099 
00100             if obj is None:
00101                 if REQUEST is None:
00102                     REQUEST = self.REQUEST
00103                 obj = self.aq_parent.resolve_url(self.getPath(), REQUEST)
00104 
00105             return obj
00106         except (ConflictError, KeyboardInterrupt):
00107             raise
00108         except:
00109             log('UIDCatalogBrains getObject raised an error:\n %s' %
00110                 '\n'.join(traceback.format_exception(*sys.exc_info())))
00111             pass
00112 
00113 InitializeClass(UIDCatalogBrains)

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

tuple Archetypes.UIDCatalog.UIDCatalogBrains.security = ClassSecurityInfo() [static]

Definition at line 75 of file UIDCatalog.py.


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