Class: Hyrax::EmbargoService
- Inherits:
-
RestrictionService
- Object
- RestrictionService
- Hyrax::EmbargoService
- Defined in:
- app/services/hyrax/embargo_service.rb
Overview
Methods for Querying Repository to find Embargoed Objects
Class Method Summary collapse
-
.assets_with_deactivated_embargoes ⇒ Object
Returns all assets that have had embargoes deactivated in the past.
-
.assets_with_enforced_embargoes ⇒ Object
(also: assets_under_embargo)
Returns all assets with embargoes that are currently enforced, regardless of whether the embargoes are active or expired.
-
.assets_with_expired_enforced_embargoes ⇒ Object
(also: assets_with_expired_embargoes)
Returns all assets with embargo release date set to a date in the past.
- .search_state_class ⇒ Object
Methods inherited from RestrictionService
Class Method Details
.assets_with_deactivated_embargoes ⇒ Object
Returns all assets that have had embargoes deactivated in the past.
26 27 28 29 |
# File 'app/services/hyrax/embargo_service.rb', line 26 def builder = Hyrax::DeactivatedEmbargoSearchBuilder.new(self) presenters(builder) end |
.assets_with_enforced_embargoes ⇒ Object Also known as: assets_under_embargo
Returns all assets with embargoes that are currently enforced, regardless of whether the embargoes are active or expired.
19 20 21 22 |
# File 'app/services/hyrax/embargo_service.rb', line 19 def builder = Hyrax::EmbargoSearchBuilder.new(self) presenters(builder).select(&:enforced?) end |
.assets_with_expired_enforced_embargoes ⇒ Object Also known as: assets_with_expired_embargoes
Returns all assets with embargo release date set to a date in the past
8 9 10 11 |
# File 'app/services/hyrax/embargo_service.rb', line 8 def builder = Hyrax::ExpiredEmbargoSearchBuilder.new(self) presenters(builder) end |
.search_state_class ⇒ Object
31 32 33 |
# File 'app/services/hyrax/embargo_service.rb', line 31 def search_state_class nil end |