Sha256: eeb55d05027035c374d00b3395dcdd0dd50f760eafb9b1ca8b800392c6067dcb

Contents?: true

Size: 1.06 KB

Versions: 15

Compression:

Stored size: 1.06 KB

Contents

# frozen_string_literal: true
module Hyrax
  class EmbargoService < RestrictionService
    class << self
      #
      # Methods for Querying Repository to find Embargoed Objects
      #

      # Returns all assets with embargo release date set to a date in the past
      def assets_with_expired_embargoes
        builder = Hyrax::ExpiredEmbargoSearchBuilder.new(self)
        presenters(builder)
      end

      # Returns all assets with embargo release date set
      #   (assumes that when lease visibility is applied to assets
      #    whose leases have expired, the lease expiration date will be removed from its metadata)
      def assets_under_embargo
        builder = Hyrax::EmbargoSearchBuilder.new(self)
        presenters(builder)
      end

      # Returns all assets that have had embargoes deactivated in the past.
      def assets_with_deactivated_embargoes
        builder = Hyrax::DeactivatedEmbargoSearchBuilder.new(self)
        presenters(builder)
      end

      private

      def presenter_class
        Hyrax::EmbargoPresenter
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hyrax-3.6.0 app/services/hyrax/embargo_service.rb
hyrax-3.5.0 app/services/hyrax/embargo_service.rb
hyrax-3.4.2 app/services/hyrax/embargo_service.rb
hyrax-4.0.0.beta1 app/services/hyrax/embargo_service.rb
hyrax-3.4.1 app/services/hyrax/embargo_service.rb
hyrax-3.4.0 app/services/hyrax/embargo_service.rb
hyrax-3.3.0 app/services/hyrax/embargo_service.rb
hyrax-3.2.0 app/services/hyrax/embargo_service.rb
hyrax-3.1.0 app/services/hyrax/embargo_service.rb
hyrax-3.0.2 app/services/hyrax/embargo_service.rb
hyrax-3.0.1 app/services/hyrax/embargo_service.rb
hyrax-3.0.0 app/services/hyrax/embargo_service.rb
hyrax-3.0.0.pre.rc4 app/services/hyrax/embargo_service.rb
hyrax-3.0.0.pre.rc3 app/services/hyrax/embargo_service.rb
hyrax-3.0.0.pre.rc2 app/services/hyrax/embargo_service.rb