Package ZenRelations :: Module ToManyRelationship :: Class ToManyRelationship
[show private | hide private]
[frames | no frames]

Type ToManyRelationship

    object --+                    
             |                    
          Base --+                
                 |                
   RoleManager --+                
                 |                
       RoleManager --+            
                     |            
    object --+       |            
             |       |            
          Base --+   |            
                 |   |            
object --+       |   |            
         |       |   |            
      Base --+   |   |            
             |   |   |            
    CopySource --+   |            
                 |   |            
object --+       |   |            
         |       |   |            
      Base --+   |   |            
             |   |   |            
         Owned --+   |            
                 |   |            
object --+       |   |            
         |       |   |            
      Base --+   |   |            
             |   |   |            
          Tabs --+   |            
                 |   |            
   Traversable --+   |            
                 |   |            
             ZItem --+            
                     |            
    object --+       |            
             |       |            
          Base --+   |            
                 |   |            
          Acquirer --+            
                     |            
    PrimaryPathManager --+        
                         |        
          RelationshipBase --+    
                             |    
        object --+           |    
                 |           |    
              Base --+       |    
                     |       |    
         CopyContainer --+   |    
                         |   |    
          RelCopyContainer --+    
                             |    
        ToManyRelationshipBase --+
                                 |
                                ToManyRelationship


ToManyRelationship manages the ToMany side of a bi-directional relation between to objects. It does not return values for any of the object* calls defined on ObjectManager so that Zope can still work with its containment assumptions. It provides object*All calles that return its object in the same way that ObjectManager does.

Related references are maintained in a list.
Method Summary
  __init__(self, id)
ToManyRelationships use an array to store related objects
  __call__(self)
when we are called return our related object in our aq context
  all_meta_types(self, interfaces)
Return empty list not allowed to add objects to a ToManyRelation
  checkRelation(self, repair)
Check to make sure that relationship bidirectionality is ok.
  exportXml(self, ofile, ignorerels)
Return an xml representation of a ToManyRelationship...
  hasobject(self, obj)
check to see if we have this object
  manage_beforeDelete(self, item, container)
there are 4 possible states for _operation during beforeDelete -1 = object being deleted remove relation 0 = copy, 1 = move, 2 = rename ToMany unlinks from its remote relations if its being deleted.
  manage_pasteObjects(self, cb_copy_data, REQUEST)
ToManyRelationships link instead of pasting
  objectIds(self, spec)
ToManyRelationship doesn't publish objectIds to prevent zope recursion problems.
  objectIdsAll(self)
Return object ids as their absolute primaryId.
  objectItems(self, spec)
ToManyRelationship doesn't publish objectItems to prevent zope recursion problems.
  objectItemsAll(self)
Return object items where key is primaryId.
  objectValues(self, spec)
ToManyRelationship doesn't publish objectValues to prevent zope recursion problems.
  objectValuesAll(self)
return all related object values
  objectValuesGen(self)
Generator that returns all related objects.
Inherited from ToManyRelationshipBase: countObjects, findObjectsById, manage_workspace
Inherited from RelCopyContainer: manage_linkObjects, manage_renameObject, manage_unlinkObjects
Inherited from CopyContainer: cb_dataItems, cb_dataValid, manage_clone, manage_CopyContainerAllItems, manage_CopyContainerFirstItem, manage_copyObjects, manage_cutObjects, manage_renameObjects, validClipData
Inherited from RelationshipBase: addRelation, cb_isCopyable, cb_isMoveable, getId, getPrimaryParent, getRelationshipManagerClass, remoteClass, remoteName, remoteType, remoteTypeName, removeRelation
Inherited from PrimaryPathManager: getPrimaryId, getPrimaryPath, getPrimaryUrlPath, primaryAq
Inherited from ZItem: __len__, __repr__, manage, manage_afterAdd, manage_afterClone, manage_editedDialog, manage_FTPlist, manage_FTPstat, raise_standardErrorMessage, this, title_and_id, title_or_id, tpURL, tpValues
Inherited from CopySource: cb_userHasCopyOrMovePermission
Inherited from Tabs: class_manage_path, filtered_manage_options, tabs_path_default, tabs_path_info
Inherited from Traversable: absolute_url, absolute_url_path, getPhysicalPath, restrictedTraverse, unrestrictedTraverse, virtual_url_path
Inherited from Owned: changeOwnership, getOwner, getOwnerTuple, getWrappedOwner, manage_fixupOwnershipAfterAdd, owner_info, userCanTakeOwnership
Inherited from RoleManager: ac_inherited_permissions, access_debug_info, acquiredRolesAreUsedBy, get_local_roles, get_local_roles_for_userid, get_valid_userids, has_local_roles, manage_access, manage_defined_roles, manage_editRoles, manage_role, permission_settings, permissionsOfRole, possible_permissions, rolesOfPermission, userdefined_roles, users_with_local_role, valid_roles, validate_roles, validRoles
Inherited from RoleManager: manage_getPermissionMapping
Inherited from Base: __getattribute__, __getnewargs__, __getstate__, __reduce__, __setstate__
Inherited from object: __delattr__, __hash__, __reduce_ex__, __setattr__, __str__

Class Variable Summary
tuple __ac_permissions__ = (('View', ('objectValuesAll',)),)
tuple manage_beforeDelete__roles__ = ('Manager',)
tuple manage_pasteObjects__roles__ = ('Manager',)
str meta_type = 'ToManyRelationship'
PermissionRole objectValuesAll__roles__ = <PermissionRole object at 0x1...
Inherited from ToManyRelationshipBase: manage_main, manage_main__roles__, manage_options, manage_workspace__roles__
Inherited from CopyContainer: __implemented__, __providedBy__, __provides__, manage_clone__roles__, manage_CopyContainerAllItems__roles__, manage_CopyContainerFirstItem__roles__, manage_copyObjects__roles__, manage_cutObjects__roles__, manage_renameForm, manage_renameForm__roles__, manage_renameObject__roles__, manage_renameObjects__roles__
Inherited from ZItem: __allow_access_to_unprotected_subobjects__, __name__, __propsets__, getId__roles__, icon, id, isPrincipiaFolderish, isTopLevelPrincipiaApplicationObject, REQUEST, title
Inherited from Tabs: class_manage_path__roles__, filtered_manage_options__roles__, manage_tabs, manage_tabs__roles__
Inherited from Traversable: absolute_url__roles__, absolute_url_path__roles__, getPhysicalPath__roles__, getPhysicalRoot, getPhysicalRoot__roles__, restrictedTraverse__roles__, unrestrictedTraverse__roles__, virtual_url_path__roles__
Inherited from Owned: changeOwnership__roles__, getOwner__roles__, getOwnerTuple__roles__, getWrappedOwner__roles__, manage_changeOwnershipType__roles__, manage_fixupOwnershipAfterAdd__roles__, manage_owner, manage_owner__roles__, manage_takeOwnership__roles__, owner_info__roles__
Inherited from RoleManager: __ac_local_roles__, __ac_roles__, ac_inherited_permissions__roles__, access_debug_info__roles__, aclAChecked, aclEChecked, aclPChecked, acquiredRolesAreUsedBy__roles__, manage_access__roles__, manage_acquiredForm, manage_acquiredForm__roles__, manage_acquiredPermissions__roles__, manage_addLocalRoles__roles__, manage_changePermissions__roles__, manage_defined_roles__roles__, manage_delLocalRoles__roles__, manage_editLocalRoles, manage_editLocalRoles__roles__, manage_editRoles__roles__, manage_listLocalRoles, manage_listLocalRoles__roles__, manage_permission__roles__, manage_permissionForm, manage_permissionForm__roles__, manage_role__roles__, manage_roleForm, manage_roleForm__roles__, manage_setLocalRoles__roles__, permission_settings__roles__, permissionMappingPossibleValues, permissionsOfRole__roles__, rolesOfPermission__roles__, selectedRoles, smallRolesWidget, userdefined_roles__roles__
Inherited from RoleManager: manage_getPermissionMapping__roles__, manage_setPermissionMapping__roles__

Method Details

__init__(self, id)
(Constructor)

ToManyRelationships use an array to store related objects
Overrides:
__builtin__.object.__init__

__call__(self)
(Call operator)

when we are called return our related object in our aq context
Overrides:
ZenRelations.RelationshipBase.RelationshipBase.__call__

all_meta_types(self, interfaces=None)

Return empty list not allowed to add objects to a ToManyRelation

checkRelation(self, repair=False)

Check to make sure that relationship bidirectionality is ok.
Overrides:
ZenRelations.RelationshipBase.RelationshipBase.checkRelation

exportXml(self, ofile, ignorerels=[])

Return an xml representation of a ToManyRelationship
<tomany id='interfaces'>
    <link>/Systems/OOL/Mail</link>
</tomany>

hasobject(self, obj)

check to see if we have this object
Overrides:
ZenRelations.RelationshipBase.RelationshipBase.hasobject

manage_beforeDelete(self, item, container)

there are 4 possible states for _operation during beforeDelete -1 = object being deleted remove relation 0 = copy, 1 = move, 2 = rename ToMany unlinks from its remote relations if its being deleted. ToMany will not propagate beforeDelete because its not a container.
Overrides:
ZenRelations.ZItem.ZItem.manage_beforeDelete

manage_pasteObjects(self, cb_copy_data=None, REQUEST=None)

ToManyRelationships link instead of pasting
Overrides:
OFS.CopySupport.CopyContainer.manage_pasteObjects

objectIds(self, spec=None)

ToManyRelationship doesn't publish objectIds to prevent zope recursion problems.
Overrides:
ZenRelations.ZItem.ZItem.objectValues

objectIdsAll(self)

Return object ids as their absolute primaryId.

objectItems(self, spec=None)

ToManyRelationship doesn't publish objectItems to prevent zope recursion problems.
Overrides:
ZenRelations.ZItem.ZItem.objectValues

objectItemsAll(self)

Return object items where key is primaryId.

objectValues(self, spec=None)

ToManyRelationship doesn't publish objectValues to prevent zope recursion problems.
Overrides:
ZenRelations.ZItem.ZItem.objectValues

objectValuesAll(self)

return all related object values

objectValuesGen(self)

Generator that returns all related objects.

Class Variable Details

__ac_permissions__

Type:
tuple
Value:
(('View', ('objectValuesAll',)),)                                      

manage_beforeDelete__roles__

Type:
tuple
Value:
('Manager',)                                                           

manage_pasteObjects__roles__

Type:
tuple
Value:
('Manager',)                                                           

meta_type

Type:
str
Value:
'ToManyRelationship'                                                   

objectValuesAll__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x10bfb30>                                   

Generated by Epydoc 2.1 on Thu Aug 16 09:55:10 2007 http://epydoc.sf.net