Class: Dor::PublishMetadataService

Inherits:
Object
  • Object
show all
Defined in:
lib/dor/services/publish_metadata_service.rb

Overview

Merges contentMetadata from several objects into one.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(item) ⇒ PublishMetadataService

Returns a new instance of PublishMetadataService.



11
12
13
# File 'lib/dor/services/publish_metadata_service.rb', line 11

def initialize(item)
  @item = item
end

Class Method Details

.publish(item) ⇒ Object

Parameters:

  • item (Dor::Item)

    the object to be publshed



7
8
9
# File 'lib/dor/services/publish_metadata_service.rb', line 7

def self.publish(item)
  new(item).publish
end

Instance Method Details

#publishObject

Appends contentMetadata file resources from the source objects to this object



16
17
18
19
20
21
# File 'lib/dor/services/publish_metadata_service.rb', line 16

def publish
  return unpublish unless world_discoverable?

  
  publish_notify_on_success
end