Products :: ZenRelations :: ToOneRelationship :: ToOneRelationship :: Class ToOneRelationship |
[hide private]
[frames] | no frames]

# Class ToOneRelationship

source code

                            ExtensionClass.Base --+
                                                  |
                        ExtensionClass.Base --+   |
                                              |   |
                     OFS.CopySupport.CopySource --+
                                                  |
                        ExtensionClass.Base --+   |
                                              |   |
                            App.Management.Tabs --+
                                                  |
                    OFS.Traversable.Traversable --+
                                                  |
                        ExtensionClass.Base --+   |
                                              |   |
                      AccessControl.Owned.Owned --+
                                                  |
                                        ZItem.ZItem --+
                                                      |
                               Acquisition.Implicit --+
                                                      |
                            ExtensionClass.Base --+   |
                                                  |   |
    AccessControl.PermissionMapping.RoleManager --+   |
                                                  |   |
                     AccessControl.Role.RoleManager --+
                                                      |
            PrimaryPathObjectManager.PrimaryPathManager --+
                                                          |
                          RelationshipBase.RelationshipBase --+
                                                              |
                                                             ToOneRelationship

ToOneRelationship represents a to one Relationship on a RelationshipManager

Instance Methods | [hide private]
__init__(self, id) | source code
__call__(self) return the related object when a ToOne relation is called | source code
hasobject(self, obj) does this relation point to the object passed | source code
_add(self, obj) add a to one side of a relationship if a relationship already exists clear it | source code
_remove(self, obj=None, suppress_events=False) remove the to one side of a relationship | source code
_remoteRemove(self, obj=None) clear the remote side of this relationship | source code
getRelatedId(self) return the id of the our related object | source code
_getCopy(self, container) Create ToOne copy. | 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_workspace(self, REQUEST) ZMI function to return the workspace of the related object | source code
manage_main(self, REQUEST=None) ZMI function to redirect to parent relationship manager | source code
getPrimaryLink(self, target=None) get the link tag of a related object | source code
getPrimaryHref(self) Return the primary URL for our related object. | source code
exportXml(self, ofile, ignorerels=[]) return an xml representation of a ToOneRelationship... | source code
checkRelation(self, repair=False) Check to make sure that relationship bidirectionality is ok. | 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__`, `__repr__`, `manage`, `manage_FTPlist`, `manage_FTPstat`, `manage_editedDialog`, `objectIds`, `objectItems`, `objectValues`, `this`, `titleOrId`, `title_and_id`, `title_or_id`, `tpURL`, `tpValues` Inherited from `OFS.CopySupport.CopySource`: `cb_userHasCopyOrMovePermission` Inherited from `OFS.CopySupport.CopySource` (private): `_canCopy`, `_notifyOfCopyTo`, `_postCopy`, `_setId` Inherited from `App.Management.Tabs`: `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 `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_getUserRolesAndPermissions`, `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 `AccessControl.PermissionMapping.RoleManager`: `manage_getPermissionMapping`, `manage_setPermissionMapping` Inherited from `AccessControl.PermissionMapping.RoleManager` (private): `_isBeingUsedAsAMethod`

Class Variables | [hide private]
| meta_type = `'ToOneRelationship'`
| security = `ClassSecurityInfo()`
Inherited from `RelationshipBase.RelationshipBase` (private): `_operation` Inherited from `ZItem.ZItem`: `REQUEST`, `__allow_access_to_unprotected_subobjects__`, `__name__`, `__propsets__`, `getId__roles__`, `icon`, `id`, `isPrincipiaFolderish`, `isTopLevelPrincipiaApplicationObject`, `manage_options`, `title` Inherited from `ZItem.ZItem` (private): `_manage_editedDialog` Inherited from `App.Management.Tabs`: `manage_tabs`, `manage_workspace__roles__` Inherited from `OFS.Traversable.Traversable`: `getPhysicalRoot` Inherited from `AccessControl.Owned.Owned`: `manage_owner` Inherited from `AccessControl.Role.RoleManager`: `__ac_local_roles__`, `__ac_roles__`, `aclAChecked`, `aclEChecked`, `aclPChecked`, `manage_acquiredForm`, `manage_editLocalRoles`, `manage_listLocalRoles`, `manage_permissionForm`, `manage_reportUserPermissions`, `manage_roleForm`, `permissionMappingPossibleValues`, `selectedRoles`, `smallRolesWidget` Inherited from `AccessControl.Role.RoleManager` (private): `_normal_manage_access`

Method Details | [hide private]

### __call__(self) (Call operator) | source code
return the related object when a ToOne relation is called Overrides: RelationshipBase.RelationshipBase.__call__

### hasobject(self, obj) | source code
does this relation point to the object passed Overrides: RelationshipBase.RelationshipBase.hasobject

### _add(self, obj) | source code
add a to one side of a relationship if a relationship already exists clear it Overrides: RelationshipBase.RelationshipBase._add

### _remove(self, obj=None, suppress_events=False) | source code
remove the to one side of a relationship Overrides: RelationshipBase.RelationshipBase._remove

### _remoteRemove(self, obj=None) | source code
clear the remote side of this relationship Overrides: RelationshipBase.RelationshipBase._remoteRemove

### _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

### manage_workspace(self, REQUEST) | source code
ZMI function to return the workspace of the related object Overrides: App.Management.Tabs.manage_workspace

### exportXml(self, ofile, ignorerels=[]) | source code
    return an xml representation of a ToOneRelationship
    <toone id='cricket'>
        /Monitors/Cricket/crk0.srv.hcvlny.cv.net
    </toone>

### checkRelation(self, repair=False) | source code
Check to make sure that relationship bidirectionality is ok. Overrides: RelationshipBase.RelationshipBase.checkRelation