Class: Hyrax::LeaseService
- Inherits:
-
RestrictionService
- Object
- RestrictionService
- Hyrax::LeaseService
- Defined in:
- app/services/hyrax/lease_service.rb
Overview
Methods for Querying Repository to find Objects with leases
Class Method Summary collapse
-
.assets_with_deactivated_leases ⇒ Object
Returns all assets that have had embargoes deactivated in the past.
-
.assets_with_enforced_leases ⇒ Object
(also: assets_under_lease)
Returns all assets with leases that are currently enforced, regardless of whether the leases are active or expired.
-
.assets_with_expired_enforced_leases ⇒ Object
(also: assets_with_expired_leases)
Returns all assets with lease expiration date set to a date in the past.
- .search_state_class ⇒ Object
Methods inherited from RestrictionService
Class Method Details
.assets_with_deactivated_leases ⇒ Object
Returns all assets that have had embargoes deactivated in the past.
26 27 28 29 |
# File 'app/services/hyrax/lease_service.rb', line 26 def assets_with_deactivated_leases builder = Hyrax::DeactivatedLeaseSearchBuilder.new(self) presenters(builder) end |
.assets_with_enforced_leases ⇒ Object Also known as: assets_under_lease
Returns all assets with leases that are currently enforced, regardless of whether the leases are active or expired.
19 20 21 22 |
# File 'app/services/hyrax/lease_service.rb', line 19 def assets_with_enforced_leases builder = Hyrax::LeaseSearchBuilder.new(self) presenters(builder).select(&:enforced?) end |
.assets_with_expired_enforced_leases ⇒ Object Also known as: assets_with_expired_leases
Returns all assets with lease expiration date set to a date in the past
8 9 10 11 |
# File 'app/services/hyrax/lease_service.rb', line 8 def assets_with_expired_enforced_leases builder = Hyrax::ExpiredLeaseSearchBuilder.new(self) presenters(builder) end |
.search_state_class ⇒ Object
31 32 33 |
# File 'app/services/hyrax/lease_service.rb', line 31 def search_state_class nil end |