[Zapp-cvs-commit] ZApp/help ZApp_RelatableItem.py,NONE,1.1
Brought to you by:
sspickle
|
From: <ssp...@pr...> - 2004-01-26 00:47:26
|
Update of /cvsroot/zapp/ZApp/help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23833/help Added Files: ZApp_RelatableItem.py Log Message: add some relatable item doc --- NEW FILE: ZApp_RelatableItem.py --- # # ZApp RelatableItem. This is an object that can take part in a relationship # class ZApp_RelatableParentMixin: """ These are just the things we need/like when we're a parent object. """ def getSortedContextIDs(self, objectManagerID=None, referenceAttribute='parentID', parentManager=None, additionalConditions=None): """ get the current contextIDs in some sort of 'sorted' order. """ def nextContextID(self, objectManagerID=None, referenceAttribute='parentID', parentManager=None, additionalConditions=None): """ get the 'next' contextID that makes sense.. """ def nextContextID_QSD(self, objectManagerID=None, referenceAttribute='parentID', parentManager=None, additionalConditions=None): """ get the 'next' contextID that makes sense. Use 'querySearchDirect' method.. """ def getSubItemInits(self, contextID=''): """ get the relationship related properties of s sub item """ def addSubItem_ui(self, beginContextID, numItems, objectManagerID=None, addMethodID=None): """ add some subitems to this item """ def addSubItem(self, subItem=None, contextID=None, objectManagerID = None, **kw): """ Add a new child to this parent. """ class ZApp_RelatableChildMixin: """ Methods and characteristics of a child object.. """ class ZApp_RelatableParent: """ These are simple items that can have many children, but no parents.. """ class ZApp_RelatableChild: """ These are simple items that can have a single parent object, and no children. """ class ZApp_RelatableItem: """ These are simple items that can have a single parent object, and many child objects (and object types!) """ class ZApp_RelatedObject: """ Currently more than half-baked Mixin class that can be managed by an 'object-hub' like thingy called a RelationshipManager """ def findSpecialistsForRelationship(self): """ in base class we just return our relatable_object_types property. """ def getObjectManagerID(self): """ get my object manager ID """ def relationDeleted(self, relationshipItem): """ a relationshipItem has been terminated. """ def getObjectType(self): """ Track down this object's object type """ def createAndAddObject_ui(self, objectProperties=None, objectManager=None, objectRole=None, selfRole=None, createIfNone=0, contextID='', REQUEST=None, **kw): """ A UI method to create and add an object.. """ def createAndAddObject(self, objectProperties=None, objectManager=None, objectRole=None, selfRole=None, createIfNone=0, contextID='', **kw): """ Use object properties to create and object.. and then add it to me. """ def addObject(self, otherObject, objectRole=None, selfRole=None, createIfNone=0, contextID=''): """ Add an object to this object. If objectRole is not None, assign objectRole to the otherObject in this relationship. If selfRole is not None, assign selfRole to self in this relationship. returns the relatioshipItem for self... """ def removeObjectRelations(self, ids=None): """ remove the relationships with the given relationship IDs.. """ def removeObjectRelations_ui(self, ids, REQUEST=None): """ remove the relationships with the given relationship IDs.. + UI fluff.. this method requires ids to be passed... """ def removeObject(self, otherObject=None, selfRole=None, objectRole=None): """ remove a related object. If selfRole is not None, only remove if 'self's role is selfRole. if objectRole is not None, only remove if 'object's role is otherRole. if otherObject is None, remove all objects that match roles.. """ def objectRelations(self, objectTypes=None, objectRoles=None, selfRoles=None, returnObjects=0): """ Get info about the relationships in which I'm involved... returns a list of dictionaries like so: [ { 'relationshipID': the relationshipID, 'otherRIID': other object's relationshipItemID, 'otherObjectID': other object's ID, 'otherManagerID': other object's Manager, 'otherRole': other object's role.. 'otherContextID': other object's contextID, 'selfRole': my roleName, 'selfRIID': my relationshipItemID, 'selfContextID': my contextID, }, {.... }, ... ] if returnObjects is true, each dictionary also has 'otherObject':otherObject as a member. """ def relatedObjects(self, objectTypes=None, objectRoles=None, selfRoles=None): """ Get related objects themselves. """ def relatedObjectContextIDs(self, objectTypes=None, objectRoles=None, selfRoles=None): """ get related object context ids.. """ def editRelations_ui(self, ids, relationInfo, REQUEST=None): """ edit my relationships... """ def nextContextID(self, objectTypes=None, objectRoles=None, selfRoles=None): """ get the 'next' contextID that makes sense.. """ |