Sha256: ab499a0bbc8ee1e531c7d6148af3ec14808ecb4b27c05165555a48842988bd1f

Contents?: true

Size: 818 Bytes

Versions: 2

Compression:

Stored size: 818 Bytes

Contents

require 'dmao/ingesters/generic/ingester'
require 'dmao/ingesters/errors/ingest_project_error'

module DMAO
  module Ingesters
    module Generic

      class ProjectsIngester < Ingester

        ENTITY = DMAO::API::Project
        ENTITY_ERROR = DMAO::Ingesters::Errors::IngestProjectError
        ENTITY_ERROR_MESSAGE = "Invalid project details"
        ERROR_HANDLING = {
            "DMAO::API::Errors::ProjectNotFound" => "Project not found, cannot update project that does not exist",
            "DMAO::API::Errors::InstitutionNotFound" => "Institution not found, cannot ingest project to non-existent institution",
            "DMAO::API::Errors::InvalidOrganisationUnitID" => "Organisation unit not found, cannot ingest project linked to non-existent organisation unit"
        }

      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dmao-generic-ingesters-0.7.0 lib/dmao/ingesters/generic/projects_ingester.rb
dmao-generic-ingesters-0.6.0 lib/dmao/ingesters/generic/projects_ingester.rb