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

Class _relationClass

source code

                                 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 --+
                                                          |
                                                         RelSchema.ToOne._relationClass

ToOneRelationship represents a to one Relationship on a RelationshipManager

Instance Methods [hide private]
 
__call__(self)
return the related object when a ToOne relation is called
source code
 
__init__(self, id)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_add(self, obj)
add a to one side of a relationship if a relationship already exists clear it
source code
 
_getCopy(self, container)
Create ToOne copy.
source code
 
_remoteRemove(self, obj=None)
clear the remote side of this relationship
source code
 
_remove(self, obj=None)
remove the to one side of a relationship
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 ToOneRelationship...
source code
 
getPrimaryHref(self)
Return the primary URL for our related object.
source code
 
getPrimaryLink(self)
get the link tag of a related object
source code
 
getRelatedId(self)
return the id of the our related object
source code
 
hasobject(self, obj)
does this relation point to the object passed
source code
 
manage_afterAdd(self, item, container)
Don't do anything here because we have on containment
source code
 
manage_afterClone(self, item)
Don't do anything here because we have on containment
source code
 
manage_beforeDelete(self, item, container)
There are 4 possible states during when beforeDelete is called.
source code
 
manage_main(self, REQUEST=None)
ZMI function to redirect to parent relationship manager
source code
 
manage_workspace(self, REQUEST)
ZMI function to return the workspace of the related object
source code

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_editedDialog, objectIds, objectItems, objectValues, 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: __providedBy__, 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', ('getPrimaryLink', 'getRelatedI...
  meta_type = 'ToOneRelationship'

Inherited from RelationshipBase.RelationshipBase (private): _operation

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

Inherited from ZItem.ZItem (private): _manage_editedDialog

Inherited from AccessControl.Role.RoleManager: __ac_local_roles__, __ac_roles__, __implemented__, __provides__, 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 
return the related object when a ToOne relation is called
Overrides: RelationshipBase.RelationshipBase.__call__

__init__(self, id)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

_add(self, obj)

source code 
add a to one side of a relationship if a relationship already exists clear it
Overrides: RelationshipBase.RelationshipBase._add

_getCopy(self, container)

source code 
Create ToOne copy. If this is the one side of one to many we set our side of the relation to point towards the related object (maintain the relationship across the copy).
Overrides: OFS.CopySupport.CopySource._getCopy

_remoteRemove(self, obj=None)

source code 
clear the remote side of this relationship
Overrides: RelationshipBase.RelationshipBase._remoteRemove

_remove(self, obj=None)

source code 
remove the to one 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 ToOneRelationship
<toone id='cricket'>
    /Monitors/Cricket/crk0.srv.hcvlny.cv.net
</toone>

hasobject(self, obj)

source code 
does this relation point to the object passed
Overrides: RelationshipBase.RelationshipBase.hasobject

manage_afterAdd(self, item, container)

source code 
Don't do anything here because we have on containment
Overrides: ZItem.ZItem.manage_afterAdd

manage_afterClone(self, item)

source code 
Don't do anything here because we have on containment
Overrides: ZItem.ZItem.manage_afterClone

manage_beforeDelete(self, item, container)

source code 

There are 4 possible states during when beforeDelete is called.
They are defined by the attribute _operation and can be: 
    -1 = object being deleted remove relation
    0 = copy, 1 = move, 2 = rename
Any state less than 1 will provoke deletion of the remote end of the
relationship.
ToOne doesn't call beforeDelete on its related object because its 
not a container.

Overrides: ZItem.ZItem.manage_beforeDelete

manage_workspace(self, REQUEST)

source code 
ZMI function to return the workspace of the related object
Overrides: App.Management.Tabs.manage_workspace

Class Variable Details [hide private]

__ac_permissions__

Value:
(('View', ('getPrimaryLink', 'getRelatedId')))