Class: Libis::Services::Rosetta::CollectionHandler
- Inherits:
-
Client
- Object
- Client
- Libis::Services::Rosetta::CollectionHandler
show all
- Defined in:
- lib/libis/services/rosetta/collection_handler.rb
Instance Attribute Summary
Attributes included from SoapClient
#client
Instance Method Summary
collapse
Methods inherited from Client
#get_heart_bit, #pds_handle=
Methods included from SoapClient
#configure, #operations, #request
Constructor Details
#initialize(base_url = 'http://depot.lias.be', options = {}) ⇒ CollectionHandler
Returns a new instance of CollectionHandler.
15
16
17
|
# File 'lib/libis/services/rosetta/collection_handler.rb', line 15
def initialize(base_url = 'http://depot.lias.be', options = {})
super 'repository', 'CollectionWebServices', {url: base_url}.merge(options)
end
|
Instance Method Details
#create(collection_info) ⇒ Object
27
28
29
30
|
# File 'lib/libis/services/rosetta/collection_handler.rb', line 27
def create(collection_info)
collection_info = collection_info.to_hash.cleanup if collection_info.is_a? CollectionInfo
call :create_collection, pds_handle: @pds_handle, collection: collection_info
end
|
#delete(id) ⇒ Object
32
33
34
|
# File 'lib/libis/services/rosetta/collection_handler.rb', line 32
def delete(id)
call :delete_collection, pds_handle: @pds_handle, collection_id: id
end
|
#find(path) ⇒ Object
23
24
25
|
# File 'lib/libis/services/rosetta/collection_handler.rb', line 23
def find(path)
request_object :get_collection_by_name, Rosetta::CollectionInfo, pds_handle: @pds_handle, collection_path: path
end
|
#get(id) ⇒ Object
19
20
21
|
# File 'lib/libis/services/rosetta/collection_handler.rb', line 19
def get(id)
request_object :get_collection_by_id, Rosetta::CollectionInfo, pds_handle: @pds_handle, collection_id: id
end
|
#update(collection_info) ⇒ Object
36
37
38
39
|
# File 'lib/libis/services/rosetta/collection_handler.rb', line 36
def update(collection_info)
collection_info = collection_info.to_hash.cleanup if collection_info.is_a? CollectionInfo
call :update_collection, pds_handle: @pds_handle, collection: collection_info
end
|