Module: UU::OS::UseCase
- Extended by:
- UseCase
- Included in:
- UseCase
- Defined in:
- uu_os-0.29.16/lib/uu/os/use_case.rb,
uu_os-0.29.16/lib/uu/os/use_case/use_case_type.rb,
uu_os-0.29.16/lib/uu/os/use_case/use_case_create.rb,
uu_os-0.29.16/lib/uu/os/use_case/use_case_attributes.rb,
uu_os-0.29.16/lib/uu/os/use_case/use_case_set_options.rb,
uu_os-0.29.16/lib/uu/os/use_case/use_case_get_options.rb,
uu_os-0.29.16/lib/uu/os/use_case/use_case_set_attributes.rb,
uu_os-0.29.16/lib/uu/os/use_case/use_case_get_use_case_list.rb
Defined Under Namespace
Classes: UseCaseAttributes, UseCaseCreate, UseCaseGetOptions, UseCaseGetUseCaseList, UseCaseSetAttributes, UseCaseSetOptions, UseCaseType
Constant Summary
- PATH =
Service path
'uu/os/UseCase'
Instance Method Summary (collapse)
-
- (UU::OS::UESURI) create(meta_artifact_uri, usecase = nil)
The command creates a use case in a specified meta artifact.
-
- (Object) delete(use_case_uri)
The command deletes the specified use case from the system.
-
- (UseCaseAttributes) get_attributes(use_case_uri)
This command returns attributes representing the use case specified by the useCaseUri parameter.
-
- (UseCaseGetOptions) get_options(use_case_uri, get_dto = nil)
The command returns options of the specified use case.
-
- (UU::OS::REST::ResultList<UseCase::UseCaseGetUseCaseList, UseCase::UseCaseAttributes>) get_use_case_list(meta_artifact_uri, criteria = nil)
Returns list of the use cases that are defined on the specified meta artifact.
-
- (UU::OS::UESURI) set_attributes(use_case_uri, usecase = nil)
The command sets attributes on specified use case according to useCaseUri.
-
- (Object) set_options(uri, dto = nil)
The command sets options of the specified use case.
Instance Method Details
- (UU::OS::UESURI) create(meta_artifact_uri, usecase = nil)
The command creates a use case in a specified meta artifact. @param metaArtifactUri URI of the meta artifact where the use case is aggregated. @paramuseCase DTO containing attributes of the new use case @return URI of the new use case @throws UseCaseRTException
39 40 41 42 43 44 45 46 47 |
# File 'uu_os-0.29.16/lib/uu/os/use_case.rb', line 39 def create(, usecase = nil) svc = UU::OS::REST::RemoteClient.new(UseCase) payload = UU::OS::UseCase::UseCaseCreate.new(usecase).to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('create', , payload) return UU::OS::UESURI.new(res) end end |
- (Object) delete(use_case_uri)
The command deletes the specified use case from the system.
57 58 59 60 61 62 |
# File 'uu_os-0.29.16/lib/uu/os/use_case.rb', line 57 def delete(use_case_uri) svc = UU::OS::REST::RemoteClient.new(UseCase) UU::OS::QoS::QoSHandler.auto_retry do svc.post('delete', use_case_uri) end end |
- (UseCaseAttributes) get_attributes(use_case_uri)
This command returns attributes representing the use case specified by the useCaseUri parameter. of the use case
76 77 78 79 80 81 82 |
# File 'uu_os-0.29.16/lib/uu/os/use_case.rb', line 76 def get_attributes(use_case_uri) svc = UU::OS::REST::RemoteClient.new(UseCase) UU::OS::QoS::QoSHandler.auto_retry do res = svc.get('getAttributes', use_case_uri) return UseCase::UseCaseAttributes.new(res) end end |
- (UseCaseGetOptions) get_options(use_case_uri, get_dto = nil)
The command returns options of the specified use case.
142 143 144 145 146 147 148 149 150 |
# File 'uu_os-0.29.16/lib/uu/os/use_case.rb', line 142 def (use_case_uri, get_dto = nil) svc = UU::OS::REST::RemoteClient.new(UseCase) dto = UU::OS::UseCase::UseCaseGetOptions.new(get_dto) svc.add_parameter('requestedMimeType', dto.requested_mime_type) UU::OS::QoS::QoSHandler.auto_retry do ret = svc.get('getOptions', use_case_uri) return UU::OS::REST::BinaryValue.new(ret, true) end end |
- (UU::OS::REST::ResultList<UseCase::UseCaseGetUseCaseList, UseCase::UseCaseAttributes>) get_use_case_list(meta_artifact_uri, criteria = nil)
Returns list of the use cases that are defined on the specified meta artifact. The list of returned use cases could be filtered by the name, code, useCaseRealizationUri and useCaseType. Returned list does not contain any objects filtered out by executed UESQuery. The list is sorted by the name (and codes in case are equal) of an use case by default.
168 169 170 171 172 173 174 175 176 177 178 |
# File 'uu_os-0.29.16/lib/uu/os/use_case.rb', line 168 def get_use_case_list(, criteria = nil) svc = UU::OS::REST::RemoteClient.new(UseCase) dto = UseCase::UseCaseGetUseCaseList.new(criteria) svc.add_parameter('pageIndex', dto.page_index) svc.add_parameter('pageSize', dto.page_size) svc.add_parameter('query', dto.query) UU::OS::QoS::QoSHandler.auto_retry do res = svc.get('getUseCaseList', ) return UU::OS::REST::ResultList.new(UseCase::UseCaseGetUseCaseList, UseCase::UseCaseAttributes, res) end end |
- (UU::OS::UESURI) set_attributes(use_case_uri, usecase = nil)
The command sets attributes on specified use case according to useCaseUri.
100 101 102 103 104 105 106 107 108 |
# File 'uu_os-0.29.16/lib/uu/os/use_case.rb', line 100 def set_attributes(use_case_uri, usecase = nil) svc = UU::OS::REST::RemoteClient.new(UseCase) payload = UU::OS::UseCase::UseCaseSetAttributes.new(usecase).to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('setAttributes', use_case_uri, payload) return UU::OS::UESURI.new(res) end end |
- (Object) set_options(uri, dto = nil)
The command sets options of the specified use case.
120 121 122 123 124 125 126 127 |
# File 'uu_os-0.29.16/lib/uu/os/use_case.rb', line 120 def (uri, dto = nil) svc = UU::OS::REST::RemoteClient.new(UseCase) payload = UU::OS::UseCase::UseCaseSetOptions.new(dto).to_json UU::OS::QoS::QoSHandler.auto_retry do svc.post('setOptions', uri, payload) end end |