cowbird.handlers.impl.catalog

Module Contents

Classes

Catalog

Keep the catalog index in sync when files are created/deleted/updated.

Attributes

LOGGER

cowbird.handlers.impl.catalog.LOGGER[source]
class cowbird.handlers.impl.catalog.Catalog(settings: cowbird.typedefs.SettingsType, name: str, **kwargs: Any)[source]

Bases: cowbird.handlers.handler.Handler, cowbird.monitoring.fsmonitor.FSMonitor

Keep the catalog index in sync when files are created/deleted/updated.

Create the catalog instance.

Parameters
  • settings – Cowbird settings for convenience

  • name – Handler name

required_params[source]
abstract get_resource_id(resource_full_name: str)str[source]

Each handler must provide this implementation required by the permission synchronizer.

The function needs to find the resource id in Magpie from the resource full name using its knowledge of the service. If the resource doesn’t already exist, the function needs to create it, again using its knowledge of resource type and parent resource type if required.

user_created(user_name)[source]
user_deleted(user_name)[source]
abstract permission_created(permission)[source]
abstract permission_deleted(permission)[source]
static get_instance()[source]

Return the Catalog singleton instance from the class name used to retrieve the FSMonitor from the DB.

on_created(path)[source]

Called when a new path is found.

Parameters

path – Absolute path of a new file/directory

on_deleted(path)[source]

Called when a path is deleted.

Parameters

path – Absolute path of a new file/directory

on_modified(path)[source]

Called when a path is updated.

Parameters

path – Absolute path of a new file/directory