Sha256: 45a3fb2f2356c9d3a0b4c4216155ddf01327a9f1b42902fbcfc68ee28991bb5e

Contents?: true

Size: 1.07 KB

Versions: 66

Compression:

Stored size: 1.07 KB

Contents

module CurationConcerns
  class LeaseService < RestrictionService
    class << self
      # Returns all assets with lease expiration date set to a date in the past
      def assets_with_expired_leases
        # ActiveFedora::Base.where('lease_expiration_date_dtsi:[* TO NOW]')
        builder = CurationConcerns::ExpiredLeaseSearchBuilder.new(self)
        presenters(builder)
      end

      # Returns all assets with lease expiration 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_lease
        builder = CurationConcerns::LeaseSearchBuilder.new(self)
        presenters(builder)
      end

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

      private

        def presenter_class
          CurationConcerns::LeasePresenter
        end
    end
  end
end

Version data entries

66 entries across 66 versions & 1 rubygems

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