Module: UU::Request::Request
- Extended by:
- Request
- Included in:
- Request
- Defined in:
- uu_request-0.28.16/lib/uu/request/request.rb,
uu_request-0.28.16/lib/uu/request/request/request_attributes.rb,
uu_request-0.28.16/lib/uu/request/request/request_set_attributes.rb
Defined Under Namespace
Classes: RequestAttributes, RequestSetAttributes
Constant Summary
- PATH =
Service path
'ues/request/UESRequest'
Instance Method Summary (collapse)
-
- (Object) delete(request_uri)
This command deletes the specified request from the system.
-
- (RequestAttributes) get_attributes(request_uri)
This command returns attributes representing the request specified by the requestUri parameter.
-
- (UU::OS::UESURI) set_attributes(request_uri, request = nil)
Sets attributes of the specified request.
Instance Method Details
- (Object) delete(request_uri)
This command deletes the specified request from the system. The request is deleted even if it contains a locked sheet or attachment. The request cannot be deleted when:
the request's workflow is not created
a property contains a reference to this request
a time sheet exists with a reference to this request
55 56 57 58 59 60 |
# File 'uu_request-0.28.16/lib/uu/request/request.rb', line 55 def delete(request_uri) svc = UU::OS::REST::RemoteClient.new(Request) UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('delete', request_uri) end end |
- (RequestAttributes) get_attributes(request_uri)
This command returns attributes representing the request specified by the requestUri parameter. The command does not change the state of the request in the system.
22 23 24 25 26 27 28 29 |
# File 'uu_request-0.28.16/lib/uu/request/request.rb', line 22 def get_attributes(request_uri) svc = UU::OS::REST::RemoteClient.new(Request) UU::OS::QoS::QoSHandler.auto_retry do res = svc.get('getAttributes', request_uri) return Request::RequestAttributes.new(res) end end |
- (UU::OS::UESURI) set_attributes(request_uri, request = nil)
Sets attributes of the specified request.
38 39 40 41 42 43 44 45 |
# File 'uu_request-0.28.16/lib/uu/request/request.rb', line 38 def set_attributes(request_uri, request = nil) svc = UU::OS::REST::RemoteClient.new(Request) payload = UU::Request::Request::RequestSetAttributes.new(request).to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('setAttributes', request_uri, payload) return UU::OS::UESURI.new(res) end end |