Module: UU::ObjectStore::ObjectStoreRepository
- Extended by:
- ObjectStoreRepository
- Included in:
- ObjectStoreRepository
- Defined in:
- uu_objectstore-0.6.5/lib/uu/object_store/object_store_repository.rb,
uu_objectstore-0.6.5/lib/uu/object_store/object_store_repository/object_store_repository_create.rb,
uu_objectstore-0.6.5/lib/uu/object_store/object_store_repository/object_store_repository_exception.rb,
uu_objectstore-0.6.5/lib/uu/object_store/object_store_repository/object_store_repository_attributes.rb,
uu_objectstore-0.6.5/lib/uu/object_store/object_store_repository/object_store_repository_set_attributes.rb,
uu_objectstore-0.6.5/lib/uu/object_store/object_store_repository/object_store_repository_fatal_exception.rb,
uu_objectstore-0.6.5/lib/uu/object_store/object_store_repository/object_store_repository_get_repository_list.rb
Overview
Object store repository service.
Defined Under Namespace
Classes: ObjectStoreRepositoryAttributes, ObjectStoreRepositoryCreate, ObjectStoreRepositoryException, ObjectStoreRepositoryFatalException, ObjectStoreRepositoryGetRepositoryList, ObjectStoreRepositorySetAttributes
Constant Summary
Instance Method Summary (collapse)
-
- (UU::OS::UESURI) create(location_uri, object_store_repository = nil)
Creates new object store repository.
-
- (Object) delete(object_store_repository_uri)
Deletes object store repository.
-
- (ObjectStoreRepositoryAttributes) get_attributes(object_store_repository_uri)
Returns attributes of the object store repository.
-
- (UU::OS::REST::ResultList<ObjectStoreRepositoryGetRepositoryList, ObjectStoreRepositoryAttributes>) get_repository_list(location_uri, criteria = nil)
Returns list of object store repositories within given location (territory).
-
- (UU::OS::UESURI) set_attributes(object_store_repository_uri, object_store_repository = nil)
Updates attributes of the object store repository.
Instance Method Details
- (UU::OS::UESURI) create(location_uri, object_store_repository = nil)
Creates new object store repository.
32 33 34 35 36 37 38 |
# File 'uu_objectstore-0.6.5/lib/uu/object_store/object_store_repository.rb', line 32 def create(location_uri, object_store_repository = nil) svc = UU::OS::REST::RemoteClient.new(ObjectStoreRepository) svc.timeout = 300 payload = ObjectStoreRepository::ObjectStoreRepositoryCreate.new(object_store_repository).to_json res = svc.post(:create, location_uri, payload) return UU::OS::UESURI.new(res) end |
- (Object) delete(object_store_repository_uri)
Deletes object store repository. Repository cannot be deleted if it contains any object stores.
95 96 97 98 99 |
# File 'uu_objectstore-0.6.5/lib/uu/object_store/object_store_repository.rb', line 95 def delete(object_store_repository_uri) svc = UU::OS::REST::RemoteClient.new(ObjectStoreRepository) svc.timeout = 300 svc.post(:delete, object_store_repository_uri) end |
- (ObjectStoreRepositoryAttributes) get_attributes(object_store_repository_uri)
Returns attributes of the object store repository.
65 66 67 68 69 |
# File 'uu_objectstore-0.6.5/lib/uu/object_store/object_store_repository.rb', line 65 def get_attributes(object_store_repository_uri) svc = UU::OS::REST::RemoteClient.new(ObjectStoreRepository) res = svc.get(:getAttributes, object_store_repository_uri) return ObjectStoreRepository::ObjectStoreRepositoryAttributes.new(res) end |
- (UU::OS::REST::ResultList<ObjectStoreRepositoryGetRepositoryList, ObjectStoreRepositoryAttributes>) get_repository_list(location_uri, criteria = nil)
Returns list of object store repositories within given location (territory).
80 81 82 83 84 85 86 87 |
# File 'uu_objectstore-0.6.5/lib/uu/object_store/object_store_repository.rb', line 80 def get_repository_list(location_uri, criteria = nil) dto = ObjectStoreRepository::ObjectStoreRepositoryGetRepositoryList.new(criteria) svc = UU::OS::REST::RemoteClient.new(ObjectStoreRepository) svc.add_parameter(:pageIndex, dto.page_index) svc.add_parameter(:pageSize, dto.page_size) res = svc.get(:getRepositoryList, location_uri) return UU::OS::REST::ResultList.new(ObjectStoreRepository::ObjectStoreRepositoryGetRepositoryList, ObjectStoreRepository::ObjectStoreRepositoryAttributes, res) end |
- (UU::OS::UESURI) set_attributes(object_store_repository_uri, object_store_repository = nil)
Updates attributes of the object store repository.
49 50 51 52 53 54 55 |
# File 'uu_objectstore-0.6.5/lib/uu/object_store/object_store_repository.rb', line 49 def set_attributes(object_store_repository_uri, object_store_repository = nil) svc = UU::OS::REST::RemoteClient.new(ObjectStoreRepository) svc.timeout = 120 payload = ObjectStoreRepository::ObjectStoreRepositorySetAttributes.new(object_store_repository).to_json res = svc.post(:setAttributes, object_store_repository_uri, payload) return UU::OS::UESURI.new(res) end |