Class: CaTissue::Annotation::IntegrationService
- Inherits:
-
CaRuby::PersistenceService
- Object
- CaRuby::PersistenceService
- CaTissue::Annotation::IntegrationService
- Defined in:
- lib/catissue/database/annotation/integration_service.rb
Overview
An IntegrationService fetches and saves CaTissue 1.1.x hook-annotation associations.
Instance Method Summary collapse
-
#associate(hook, annotation) ⇒ Object
Associates the given hook domain object to the annotation.
-
#initialize ⇒ IntegrationService
constructor
A new instance of IntegrationService.
Constructor Details
#initialize ⇒ IntegrationService
Returns a new instance of IntegrationService.
12 13 14 |
# File 'lib/catissue/database/annotation/integration_service.rb', line 12 def initialize super(SVC_NAME, CaTissue::Database.current.access_properties) end |
Instance Method Details
#associate(hook, annotation) ⇒ Object
Associates the given hook domain object to the annotation.
20 21 22 23 24 25 26 27 |
# File 'lib/catissue/database/annotation/integration_service.rb', line 20 def associate(hook, annotation) # the annotation must have an identifier if annotation.identifier.nil? then raise CaRuby::DatabaseError.new("Annotation to associate does not have an identifier: #{annotation}") end emr = create_entity_map_record(hook, annotation) create(emr) end |