Part of elisa.core.metadata_manager View In Hierarchy
It will go sequentially through all the registered metadata capabilities that are able to handle the request until the expected metadata is filled.
Line # | Kind | Name | Docs |
---|---|---|---|
51 | Method | register_component | Register a new metadata capability. |
80 | Method | get_metadata | Try to retrieve the requested metadata and populate the model with it. |
Inherited from Manager:
Line # | Kind | Name | Docs |
---|---|---|---|
65 | Method | __init__ | Undocumented |
73 | Method | clean | Undocumented |
172 | Method | unregister_component | Unregister a component. |
194 | Method | plugin_status_changed_cb | Callback meant to be invoked (by the plugin registry) when the status |
70 | Method | _clean_component | Undocumented |
77 | Method | _load_components | Asynchronously load and register a list of components. |
117 | Method | _unload_components | Asynchronously unregister and unload a list of components. |
The internal list of capabilities is always kept sorted by decreasing rank.
Parameters | capability | an instance of a metadata capability to register
(type: elisa.core.components.metadata_capability.MetadataCapability
) |
Returns | a deferred fired when the capability is registered
(type: elisa.core.utils.defer.Deferred
) |
All the capabilities able to handle the request are tried sequentially in decreasing order of capability rank until all the requested metadata is retrieved or all the capabilities have been tried. If all the capabilities have been tried and the requested metadata remains incomplete, the IncompleteMetadataResponse exception will be raised.
Parameters | model | the model that should be populated with the metadata
(type: a subclass of elisa.core.components.model.Model
) |
check_callback | A function called after each capability.get_metadata was called and has answered. The only parameter is the model itself. The callback should check whether we can stop processing this model as all desired values are set (by returning True) or if the manager should keep on processing the model. (type: callable ) | |
Returns | a deferred fired when the metadata retrieval is complete
(type: elisa.core.utils.defer.Deferred
) | |
Raises | IncompleteMetadataResponse | when the requested metadata remains incomplete |