Package ZenRelations :: Module RelSchema :: Class ToMany :: Class _relationClass
[hide private]
[frames] | no frames]

Class _relationClass

source code

                                     object --+                
                                              |                
                            ExtensionClass.Base --+            
                                                  |            
                      OFS.CopySupport.CopyContainer --+        
                                                      |        
                        RelCopySupport.RelCopyContainer --+    
                                                          |    
                                 object --+               |    
                                          |               |    
                        ExtensionClass.Base --+           |    
                                              |           |    
                             object --+       |           |    
                                      |       |           |    
                    ExtensionClass.Base --+   |           |    
                                          |   |           |    
                 OFS.CopySupport.CopySource --+           |    
                                              |           |    
                             object --+       |           |    
                                      |       |           |    
                    ExtensionClass.Base --+   |           |    
                                          |   |           |    
                        App.Management.Tabs --+           |    
                                              |           |    
                OFS.Traversable.Traversable --+           |    
                                              |           |    
                             object --+       |           |    
                                      |       |           |    
                    ExtensionClass.Base --+   |           |    
                                          |   |           |    
                  AccessControl.Owned.Owned --+           |    
                                              |           |    
                                    ZItem.ZItem --+       |    
                                                  |       |    
                                 object --+       |       |    
                                          |       |       |    
                        ExtensionClass.Base --+   |       |    
                                              |   |       |    
                 ZenEvents.EventDetail.Implicit --+       |    
                                                  |       |    
                                 object --+       |       |    
                                          |       |       |    
                        ExtensionClass.Base --+   |       |    
                                              |   |       |    
AccessControl.PermissionMapping.RoleManager --+   |       |    
                                              |   |       |    
                 AccessControl.Role.RoleManager --+       |    
                                                  |       |    
        PrimaryPathObjectManager.PrimaryPathManager --+   |    
                                                      |   |    
                      RelationshipBase.RelationshipBase --+    
                                                          |    
              ToManyRelationshipBase.ToManyRelationshipBase --+
                                                              |
                                                             RelSchema.ToMany._relationClass

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.

Instance Methods [hide private]
 
__call__(self)
when we are called return our related object in our aq context
source code
 
__init__(self, id)
ToManyRelationships use an array to store related objects
source code
 
_add(self, obj)
add an object to one side of this toMany relationship
source code
 
_delObject(self, id)
Delete object by its absolute id (ie /zport/dmd/bla/bla) (this is sent out in the object*All API)
source code
 
_getCopy(self, container)
create copy and link remote objects if remote side is TO_MANY
source code
 
_getOb(self, id, default='__ZENMARKER__')
Return object based on its primaryId.
source code
 
_remoteRemove(self, obj=None)
remove an object from the far side of this relationship if no object is passed in remove all objects
source code
 
_remove(self, obj=None)
remove object from our side of a relationship
source code
 
_setObject(self, id, object, roles=None, user=None, set_owner=1)
Set and object onto a ToMany by calling addRelation
source code
 
all_meta_types(self, interfaces=None)
Return empty list not allowed to add objects to a ToManyRelation
source code
 
checkRelation(self, repair=False)
Check to make sure that relationship bidirectionality is ok.
source code
 
exportXml(self, ofile, ignorerels=[])
Return an xml representation of a ToManyRelationship...
source code
 
hasobject(self, obj)
check to see if we have this object
source code
 
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.
source code
 
manage_pasteObjects(self, cb_copy_data=None, REQUEST=None)
ToManyRelationships link instead of pasting
source code
 
objectIds(self, spec=None)
ToManyRelationship doesn't publish objectIds to prevent zope recursion problems.
source code
 
objectIdsAll(self)
Return object ids as their absolute primaryId.
source code
 
objectItems(self, spec=None)
ToManyRelationship doesn't publish objectItems to prevent zope recursion problems.
source code
 
objectItemsAll(self)
Return object items where key is primaryId.
source code
 
objectValues(self, spec=None)
ToManyRelationship doesn't publish objectValues to prevent zope recursion problems.
source code
 
objectValuesAll(self)
return all related object values
source code
 
objectValuesGen(self)
Generator that returns all related objects.
source code

Inherited from ToManyRelationshipBase.ToManyRelationshipBase: countObjects, findObjectsById, manage_workspace

Inherited from RelCopySupport.RelCopyContainer: manage_linkObjects, manage_renameObject, manage_unlinkObjects

Inherited from OFS.CopySupport.CopyContainer: __providedBy__, cb_dataItems, cb_dataValid, manage_CopyContainerAllItems, manage_CopyContainerFirstItem, manage_clone, manage_copyObjects, manage_cutObjects, manage_renameObjects, validClipData

Inherited from OFS.CopySupport.CopyContainer (private): _get_id

Inherited from RelationshipBase.RelationshipBase: addRelation, cb_isCopyable, cb_isMoveable, getId, getPrimaryParent, getRelationshipManagerClass, remoteClass, remoteName, remoteType, remoteTypeName, removeRelation

Inherited from PrimaryPathObjectManager.PrimaryPathManager: getPrimaryId, getPrimaryPath, getPrimaryUrlPath, primaryAq

Inherited from ZItem.ZItem: __len__, __name__, __repr__, manage, manage_FTPlist, manage_FTPstat, manage_afterAdd, manage_afterClone, manage_editedDialog, raise_standardErrorMessage, this, title_and_id, title_or_id, tpURL, tpValues

Inherited from ZenEvents.EventDetail.Implicit: __new__, __of__

Inherited from AccessControl.Role.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_acquiredPermissions, manage_addLocalRoles, manage_changePermissions, manage_defined_roles, manage_delLocalRoles, manage_editRoles, manage_permission, manage_role, manage_setLocalRoles, permission_settings, permissionsOfRole, possible_permissions, rolesOfPermission, userdefined_roles, users_with_local_role, validRoles, valid_roles, validate_roles

Inherited from AccessControl.Role.RoleManager (private): _addRole, _delRoles, _has_user_defined_role, _setRoles

Inherited from ExtensionClass.Base: __getattribute__, __getnewargs__, __getstate__, __reduce__, __setstate__

Inherited from OFS.CopySupport.CopySource: cb_userHasCopyOrMovePermission

Inherited from OFS.CopySupport.CopySource (private): _canCopy, _notifyOfCopyTo, _postCopy, _setId

Inherited from App.Management.Tabs: class_manage_path, filtered_manage_options, tabs_path_default, tabs_path_info

Inherited from OFS.Traversable.Traversable: absolute_url, absolute_url_path, getPhysicalPath, restrictedTraverse, unrestrictedTraverse, virtual_url_path

Inherited from AccessControl.Owned.Owned: changeOwnership, getOwner, getOwnerTuple, getWrappedOwner, manage_changeOwnershipType, manage_fixupOwnershipAfterAdd, manage_takeOwnership, owner_info, userCanTakeOwnership

Inherited from AccessControl.Owned.Owned (private): _deleteOwnershipAfterAdd

Inherited from ExtensionClass.Base: __getattribute__, __getnewargs__, __getstate__, __reduce__, __setstate__

Inherited from object: __delattr__, __hash__, __reduce_ex__, __setattr__, __str__

Inherited from AccessControl.PermissionMapping.RoleManager: manage_getPermissionMapping, manage_setPermissionMapping

Inherited from AccessControl.PermissionMapping.RoleManager (private): _isBeingAccessedAsZClassDefinedInstanceMethod, _isBeingUsedAsAMethod

Class Variables [hide private]
  __ac_permissions__ = (('View', ('objectValuesAll')))
  meta_type = 'ToManyRelationship'

Inherited from ToManyRelationshipBase.ToManyRelationshipBase: manage_main, manage_options, security

Inherited from OFS.CopySupport.CopyContainer: __implemented__, __provides__, manage_renameForm

Inherited from ZItem.ZItem: REQUEST, __allow_access_to_unprotected_subobjects__, __propsets__, icon, id, isPrincipiaFolderish, isTopLevelPrincipiaApplicationObject, title

Inherited from ZItem.ZItem (private): _manage_editedDialog

Inherited from AccessControl.Role.RoleManager: __ac_local_roles__, __ac_roles__, aclAChecked, aclEChecked, aclPChecked, manage_acquiredForm, manage_editLocalRoles, manage_listLocalRoles, manage_permissionForm, manage_roleForm, permissionMappingPossibleValues, selectedRoles, smallRolesWidget

Inherited from AccessControl.Role.RoleManager (private): _method_manage_access, _normal_manage_access

Inherited from App.Management.Tabs: manage_tabs

Inherited from OFS.Traversable.Traversable: getPhysicalRoot

Inherited from AccessControl.Owned.Owned: manage_owner

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(self)
(Call operator)

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

__init__(self, id)
(Constructor)

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

_add(self, obj)

source code 
add an object to one side of this toMany relationship
Overrides: RelationshipBase.RelationshipBase._add

_delObject(self, id)

source code 
Delete object by its absolute id (ie /zport/dmd/bla/bla) (this is sent out in the object*All API)
Overrides: ToManyRelationshipBase.ToManyRelationshipBase._delObject

_getCopy(self, container)

source code 
create copy and link remote objects if remote side is TO_MANY
Overrides: OFS.CopySupport.CopySource._getCopy

_getOb(self, id, default='__ZENMARKER__')

source code 
Return object based on its primaryId. plain id will not work!!!
Overrides: ToManyRelationshipBase.ToManyRelationshipBase._getOb

_remoteRemove(self, obj=None)

source code 
remove an object from the far side of this relationship if no object is passed in remove all objects
Overrides: RelationshipBase.RelationshipBase._remoteRemove

_remove(self, obj=None)

source code 
remove object from our side of a relationship
Overrides: RelationshipBase.RelationshipBase._remove

checkRelation(self, repair=False)

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

exportXml(self, ofile, ignorerels=[])

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

hasobject(self, obj)

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

manage_beforeDelete(self, item, container)

source code 
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: ZItem.ZItem.manage_beforeDelete

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

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

objectIds(self, spec=None)

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

objectItems(self, spec=None)

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

objectValues(self, spec=None)

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