Class: Hyrax::EmbargoService

Inherits:
RestrictionService show all
Defined in:
app/services/hyrax/embargo_service.rb

Overview

Methods for Querying Repository to find Embargoed Objects

Class Method Summary collapse

Methods inherited from RestrictionService

blacklight_config

Class Method Details

.assets_with_deactivated_embargoesObject

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 assets_with_deactivated_embargoes
  builder = Hyrax::DeactivatedEmbargoSearchBuilder.new(self)
  presenters(builder)
end

.assets_with_enforced_embargoesObject 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 assets_with_enforced_embargoes
  builder = Hyrax::EmbargoSearchBuilder.new(self)
  presenters(builder).select(&:enforced?)
end

.assets_with_expired_enforced_embargoesObject 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 assets_with_expired_enforced_embargoes
  builder = Hyrax::ExpiredEmbargoSearchBuilder.new(self)
  presenters(builder)
end

.search_state_classObject



31
32
33
# File 'app/services/hyrax/embargo_service.rb', line 31

def search_state_class
  nil
end