2009-06-29 07:06:01 -05:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
class ToolWrapper:
|
|
|
|
|
|
|
|
def getInitiator(self):
|
|
|
|
'''Retrieves the object that triggered the creation of the object
|
|
|
|
being currently created (if any).'''
|
|
|
|
res = None
|
|
|
|
initiatorUid = self.session['initiator']
|
|
|
|
if initiatorUid:
|
2009-11-06 04:33:56 -06:00
|
|
|
res = self.o.uid_catalog(UID=initiatorUid)[0].getObject().appy()
|
2009-06-29 07:06:01 -05:00
|
|
|
return res
|
2009-11-17 03:05:19 -06:00
|
|
|
|
|
|
|
def getObject(self, uid):
|
|
|
|
'''Allow to retrieve an object from its unique identifier p_uid.'''
|
|
|
|
return self.o.getObject(uid, appy=True)
|
2009-06-29 07:06:01 -05:00
|
|
|
# ------------------------------------------------------------------------------
|