Sha256: 2dac0998a2d949d37d19d3e88376ab60cba0de325dae449b8bebd3108fb66d68

Contents?: true

Size: 1.09 KB

Versions: 12

Compression:

Stored size: 1.09 KB

Contents

module CurationConcerns
  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 = CurationConcerns::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 = CurationConcerns::EmbargoSearchBuilder.new(self)
        presenters(builder)
      end

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

      private

        def presenter_class
          CurationConcerns::EmbargoPresenter
        end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 app/services/curation_concerns/embargo_service.rb
curation_concerns-1.7.7 app/services/curation_concerns/embargo_service.rb
curation_concerns-2.0.0 app/services/curation_concerns/embargo_service.rb
curation_concerns-2.0.0.rc2 app/services/curation_concerns/embargo_service.rb
curation_concerns-1.7.6 app/services/curation_concerns/embargo_service.rb
curation_concerns-1.7.5 app/services/curation_concerns/embargo_service.rb
curation_concerns-1.7.4 app/services/curation_concerns/embargo_service.rb
curation_concerns-1.7.3 app/services/curation_concerns/embargo_service.rb
curation_concerns-1.7.2 app/services/curation_concerns/embargo_service.rb
curation_concerns-2.0.0.rc1 app/services/curation_concerns/embargo_service.rb
curation_concerns-1.7.1 app/services/curation_concerns/embargo_service.rb
curation_concerns-1.7.0 app/services/curation_concerns/embargo_service.rb