Sha256: a49f4548f5e74b11cc8ea4ab27f6fe8d580cb54c207ced39654068e22c85acac
Contents?: true
Size: 1.01 KB
Versions: 58
Compression:
Stored size: 1.01 KB
Contents
module Hyrax 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 = Hyrax::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 = Hyrax::LeaseSearchBuilder.new(self) presenters(builder) end # Returns all assets that have had embargoes deactivated in the past. def assets_with_deactivated_leases builder = Hyrax::DeactivatedLeaseSearchBuilder.new(self) presenters(builder) end private def presenter_class Hyrax::LeasePresenter end end end end
Version data entries
58 entries across 58 versions & 2 rubygems