Class: Hyrax::Collections::CollectionMemberService
- Inherits:
-
Object
- Object
- Hyrax::Collections::CollectionMemberService
- Defined in:
- app/services/hyrax/collections/collection_member_service.rb
Overview
Responsible for retrieving collection members
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Instance Method Summary collapse
-
#available_member_subcollections ⇒ Blacklight::Solr::Response
Collections which are members of the given collection.
-
#available_member_work_ids ⇒ Blacklight::Solr::Response
Work ids of the works which are members of the given collection.
-
#available_member_works ⇒ Blacklight::Solr::Response
Works which are members of the given collection.
-
#initialize(scope:, collection:, params:) ⇒ CollectionMemberService
constructor
A new instance of CollectionMemberService.
Constructor Details
#initialize(scope:, collection:, params:) ⇒ CollectionMemberService
Returns a new instance of CollectionMemberService.
11 12 13 14 15 |
# File 'app/services/hyrax/collections/collection_member_service.rb', line 11 def initialize(scope:, collection:, params:) @scope = scope @collection = collection @params = params end |
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
5 6 7 |
# File 'app/services/hyrax/collections/collection_member_service.rb', line 5 def collection @collection end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
5 6 7 |
# File 'app/services/hyrax/collections/collection_member_service.rb', line 5 def params @params end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
5 6 7 |
# File 'app/services/hyrax/collections/collection_member_service.rb', line 5 def scope @scope end |
Instance Method Details
#available_member_subcollections ⇒ Blacklight::Solr::Response
Collections which are members of the given collection
21 22 23 |
# File 'app/services/hyrax/collections/collection_member_service.rb', line 21 def available_member_subcollections query_solr(query_builder: subcollections_search_builder, query_params: params_for_subcollections) end |
#available_member_work_ids ⇒ Blacklight::Solr::Response
Work ids of the works which are members of the given collection
37 38 39 |
# File 'app/services/hyrax/collections/collection_member_service.rb', line 37 def available_member_work_ids query_solr_with_field_selection(query_builder: work_ids_search_builder, fl: 'id') end |
#available_member_works ⇒ Blacklight::Solr::Response
Works which are members of the given collection
29 30 31 |
# File 'app/services/hyrax/collections/collection_member_service.rb', line 29 def available_member_works query_solr(query_builder: works_search_builder, query_params: params) end |