Class: Dor::WorkflowDs

Inherits:
ActiveFedora::Datastream show all
Defined in:
lib/dor/datastreams/workflow_ds.rb

Overview

Represents the datastream that just holds the location of the workflow service

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DatastreamSpecSolrizer

#datastream_spec_string

Methods included from SolrDocHelper

#add_solr_value

Class Method Details

.default_attributesObject

Called by rubydora. This lets us customize the mime-type



16
17
18
# File 'lib/dor/datastreams/workflow_ds.rb', line 16

def self.default_attributes
  super.merge(mimeType: 'application/xml')
end

Instance Method Details

#build_locationObject

Called before saving, but after a pid has been assigned



9
10
11
12
13
# File 'lib/dor/datastreams/workflow_ds.rb', line 9

def build_location
  return unless new?

  self.dsLocation = File.join(Dor::Config.workflow.url, "dor/objects/#{pid}/workflows")
end