Exemplo n.º 1
0
    def init_resources(self, app):
        """Initialize resources."""
        self.record_resource = Marc21RecordResource(
            service=self.records_service,
            config=Marc21RecordResourceConfig,
        )

        self.record_files_resource = FileResource(
            service=self.records_service.files,
            config=Marc21RecordFilesResourceConfig)

        self.draft_files_resource = FileResource(
            service=self.records_service.draft_files,
            config=Marc21DraftFilesResourceConfig,
        )

        self.parent_record_links_resource = Marc21ParentRecordLinksResource(
            service=self.records_service,
            config=Marc21ParentRecordLinksResourceConfig)
Exemplo n.º 2
0
def disabled_file_upload_resource(file_service):
    """Disabled Upload File Resource."""
    return FileResource(CustomDisabledUploadFileResourceConfig, file_service)
Exemplo n.º 3
0
def file_resource(file_service):
    """File Resources."""
    return FileResource(CustomFileResourceConfig, file_service)
Exemplo n.º 4
0
def draft_file_resource(draft_file_service):
    """Draft file resource."""
    return FileResource(config=DraftFileResourceConfig,
                        service=draft_file_service)
Exemplo n.º 5
0
def file_resource(file_service):
    """File resource."""
    return FileResource(config=FileResourceConfig, service=file_service)