Part of lp.services.xref.interfaces View In Hierarchy
Each participant in an xref has an "object ID": a tuple of (str type, str id).
All xrefs are currently between local objects, so links always exist in both directions, but this can't be assumed to hold in future.
| Method | create | Create cross-references. |
| Method | findFromMany | Find all cross-references from multiple objects. |
| Method | delete | Delete cross-references. |
| Method | findFrom | Find all cross-references from an object. |
Create cross-references.
Back-links are automatically created.
:param xrefs: A dict of
{from_object_id: {to_object_id:
{'creator': `IPerson`, 'date_created': `datetime`,
'metadata': value}}}.
The creator, date_created, and metadata keys are optional.
Find all cross-references from multiple objects.
:param object_ids: A collection of object IDs.
:param types: An optional collection of the types to include.
:return: A dict of
{from_object_id: {to_object_id:
{'creator': `IPerson`, 'date_created': `datetime`,
'metadata': value}}}.
The creator, date_created, and metadata keys are optional.
Back-links are automatically deleted.
| Parameters | xrefs | A dict of {from_object_id: [to_object_id]}. |
Find all cross-references from an object.
:param object_id: An object ID.
:param types: An optional collection of the types to include.
:return: A dict of
{to_object_id:
{'creator': `IPerson`, 'date_created': `datetime`,
'metadata': value}}.
The creator, date_created, and metadata keys are optional.