Sha256: f638333783c4ca4df9bf61c008d27e82030c4b271a41f93a3c8cab5770b2b602

Contents?: true

Size: 548 Bytes

Versions: 37

Compression:

Stored size: 548 Bytes

Contents

module CurationConcerns
  module Actors
    class LeaseActor
      attr_reader :work

      # @param [Hydra::Works::Work] work
      def initialize(work)
        @work = work
      end

      # Update the visibility of the work to match the correct state of the lease, then clear the lease date, etc.
      # Saves the lease and the work
      def destroy
        work.lease_visibility! # If the lease has lapsed, update the current visibility.
        work.deactivate_lease!
        work.lease.save!
        work.save!
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.7.7 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-2.0.0 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-2.0.0.rc2 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.7.6 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.7.5 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.7.4 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.7.3 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.7.2 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-2.0.0.rc1 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.7.1 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.7.0 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.7.0.beta1 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.6.3 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.6.2 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.6.1 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.6.0 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.5.0 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.4.0 app/actors/curation_concerns/actors/lease_actor.rb
curation_concerns-1.3.3 app/actors/curation_concerns/actors/lease_actor.rb