class Monitor |
|
Monitors an Item or Collection for changes and emits signals if some
of these objects are changed or removed or new ones are added to the storage
backend.
Optionally, the changed objects can be fetched automatically from the server. To enable this, see fetchCollection(), fetchItemMetaData(), fetchItemData(). @todo: support un-monitoring @todo: distinguish between monitoring collection properties and collection content. @todo: special case for collection content counts changed |
|
Creates a new monitor.
parent - The parent object. |
|
|
Emitted if a new collection was added in the storage and if
a monitored collection got this new collection as a child.
collection - The new collection. parent - The parent collection. |
|
Emitted if a monitored collection changed (properties and
content). Also emitted if the collection was reparented.
collection - The changed collection. |
|
Emitted if a monitored collection has been removed from the storage.
collection - The removed collection. |
|
Emitted if the statistics information of a monitored collection
has changed.
id - The collection identifier of the changed collection. statistics - The updated collection statistics, invalid if automatic fetching of statistics changes is disabled. |
|
Enable automatic fetching of changed collections from the server.
enable - true enables auto-fetching, false disables auto-fetching. |
|
Enable automatic fetching of changed collection statistics information.
enable - true to enable. |
|
Ignore all notifications caused by the given session.
session - The session you want to ignore. |
|
Emitted if a item has been added to the storage, in a monitored collection.
item - The new item. collection - The collection the item is added to. |
|
Emitted if a monitored item has changed: item parts have been modified.
item - The changed item. partIdentifiers - The identifiers of the item parts that has been changed. |
|
Returns the item fetch scope.
Since this returns a reference it can be used to conveniently modify the current scope in-place, i.e. by calling a method on the returned reference without storing it in a local variable. See the ItemFetchScope documentation for an example. Returns a reference to the current item fetch scope See also setItemFetchScope() for replacing the current item fetch scope |
|
Emitted if a monitored item has been moved between two collections
item - The moved item collectionSource - The collection the item has been moved from collectionDestination - The collection the item has been moved to |
|
Emitted if a monitored object has been removed from the storage and from a monitored collection.
item - The removed item. |
|
Monitor all items. |
|
Monitors the specified collection for changes.
Monitoring Collection.root() monitors all collections.
collection - The collection to monitor. |
|
Sets the item fetch scope.
Controls how much of an item's data is fetched from the server, e.g. whether to fetch the full item payload or only metadata. fetchScope - the new scope for item fetch operations See also itemFetchScope() |
|
Monitors the specified item for changes.
item - The item to monitor. |
|
Monitor all items matching the specified mimetype.
mimetype - The mimetype. |
|
Monitors the specified resource for changes.
resource - The resource identifier. |