Esempio n. 1
0
 def init_services(self, app):
     """Initialize vocabulary resources."""
     # Services
     self.records_service = RDMRecordService(
         self._filter_record_service_config(app, RDMRecordServiceConfig),
         files_service=FileService(RDMFileRecordServiceConfig),
         draft_files_service=FileService(RDMFileDraftServiceConfig),
         secret_links_service=SecretLinkService(RDMRecordServiceConfig))
     self.subjects_service = subject_record_type.service_cls(
         config=subject_record_type.service_config_cls, )
Esempio n. 2
0
    def init_services(self, app):
        """Initialize services."""
        service_config = (
            LOMRecordServiceConfig  # config_class as in invenio-RDM and invenio-MARC21
        )

        self.records_service = LOMRecordService(
            service_config,
            files_service=FileService(LOMRecordFilesServiceConfig),
            draft_files_service=FileService(LOMDraftFilesServiceConfig),
        )
Esempio n. 3
0
    def init_services(self, app):
        """Initialize vocabulary resources."""
        # Services
        self.records_service = RDMRecordService(
            RDMRecordServiceConfig,
            files_service=FileService(RDMFileRecordServiceConfig),
            draft_files_service=FileService(RDMFileDraftServiceConfig),
        )

        self.subjects_service = subject_record_type.service_cls(
            config=subject_record_type.service_config_cls, )
Esempio n. 4
0
 def init_services(self, app):
     """Initialize vocabulary resources."""
     # Services
     self.records_service = RDMRecordService(
         self._filter_record_service_config(app, RDMRecordServiceConfig),
         files_service=FileService(RDMFileRecordServiceConfig),
         draft_files_service=FileService(RDMFileDraftServiceConfig),
         secret_links_service=SecretLinkService(RDMRecordServiceConfig))
     self.affiliations_service = AffiliationsService(
         config=AffiliationsServiceConfig, )
     self.subjects_service = SubjectsService(config=SubjectsServiceConfig)
 def init_services(self, app):
     """Initialize services."""
     service_config = Marc21RecordServiceConfig
     service_config.permission_policy_cls = obj_or_import_string(
         app.config.get("RECORDS_PERMISSIONS_RECORD_POLICY1"),
         default=Marc21RecordPermissionPolicy,
     )
     self.records_service = Marc21RecordService(
         config=service_config,
         files_service=FileService(Marc21RecordFilesServiceConfig),
         draft_files_service=FileService(Marc21DraftFilesServiceConfig),
     )
    def init_services(self, app):
        """Initialize services."""

        from invenio_rdm_records.services import RDMRecordService

        service_config = GeoRecordServiceConfig
        service_config.permission_policy_cls = obj_or_import_string(
            app.config.get("RECORDS_PERMISSIONS_RECORD_POLICY"),
            default=GeoRecordPermissionPolicy)

        self.records_service = RDMRecordService(
            config=self._filter_record_service_config(app, service_config),
            files_service=FileService(GeoRecordFilesServiceConfig),
            draft_files_service=FileService(GeoDraftFilesServiceConfig))
 def init_services(self, app):
     """Initialize communities service."""
     # Services
     self.service = CommunityService(
         CommunityServiceConfig,
         files_service=FileService(CommunityFileServiceConfig),
     )
Esempio n. 8
0
    def init_services(self, app):
        """Initialize vocabulary resources."""
        service_configs = self.service_configs(app)

        # Services
        self.records_service = RDMRecordService(
            service_configs.record,
            files_service=FileService(service_configs.file),
            draft_files_service=FileService(service_configs.file_draft),
            secret_links_service=SecretLinkService(service_configs.record),
            pids_service=PIDsService(service_configs.record, PIDManager),
            review_service=ReviewService(service_configs.record),
        )
        self.affiliations_service = AffiliationsService(
            config=service_configs.affiliations, )
        self.names_service = NamesService(config=service_configs.names)
        self.subjects_service = SubjectsService(
            config=service_configs.subjects)

        self.oaipmh_server_service = OAIPMHServerService(
            config=service_configs.oaipmh_server, )
Esempio n. 9
0
def file_service():
    """File service shared fixture."""
    return FileService(MockFileServiceConfig)
def file_service():
    return FileService(MockFileServiceConfig)