Class: Hyrax::AdminSetMemberService

Inherits:
Object
  • Object
show all
Defined in:
app/services/hyrax/admin_set_member_service.rb

Overview

Responsible for retrieving admin set’s members

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope:, collection:, params:) ⇒ AdminSetMemberService

Returns a new instance of AdminSetMemberService.

Parameters:

  • scope (#repository)

    Typically a controller object which responds to #repository

  • collection (::Collection)

    an collection of type admin set

  • params (ActionController::Parameters)

    query params



24
25
26
27
28
# File 'app/services/hyrax/admin_set_member_service.rb', line 24

def initialize(scope:, collection:, params:)
  @scope = scope
  @collection = collection
  @params = params
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



13
# File 'app/services/hyrax/admin_set_member_service.rb', line 13

attr_reader :scope, :params, :collection

#paramsActionController::Parameters (readonly)

Returns:

  • (ActionController::Parameters)


13
# File 'app/services/hyrax/admin_set_member_service.rb', line 13

attr_reader :scope, :params, :collection

#scope#repository (readonly)

Returns:



13
14
15
# File 'app/services/hyrax/admin_set_member_service.rb', line 13

def scope
  @scope
end

Instance Method Details

#available_member_worksBlacklight::Solr::Response

All members of the given admin_set

Returns:

  • (Blacklight::Solr::Response)


35
36
37
# File 'app/services/hyrax/admin_set_member_service.rb', line 35

def available_member_works
  query_solr(query_builder: members_search_builder, query_params: params)
end

#repositoryObject

Note:

delegated to :scope



18
# File 'app/services/hyrax/admin_set_member_service.rb', line 18

delegate :repository, to: :scope