cowbird.services.impl.catalog

Module Contents

Classes

Catalog

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

Attributes

LOGGER

cowbird.services.impl.catalog.LOGGER[source]
class cowbird.services.impl.catalog.Catalog(settings: str, name: dict, **kwargs)[source]

Bases: cowbird.services.service.Service, cowbird.monitoring.fsmonitor.FSMonitor

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

Create the catalog instance.

@param settings: Cowbird settings for convenience @param name: Service name

required_params[source]
abstract get_resource_id(self, resource_full_name)[source]

Each service 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(self, user_name)[source]
user_deleted(self, user_name)[source]
abstract permission_created(self, permission)[source]
abstract permission_deleted(self, 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(self, filename)[source]

Call when a new file is found.

Parameters

filename – Relative filename of a new file

on_deleted(self, filename)[source]

Call when a file is deleted.

Parameters

filename – Relative filename of the removed file

on_modified(self, filename)[source]

Call when a file is updated.

Parameters

filename – Relative filename of the updated file