Class: UU::OS::VUC::Action
- Inherits:
-
Object
- Object
- UU::OS::VUC::Action
- Defined in:
- uu_os_vuc-server-3.6.2/lib/uu/os/vuc/action.rb
Overview
Class is used for building action response which cause user navigation, opens dialog or trigger file download. Action can be:
* back - Returns to previous Use case, actual use case is finished
* super uc - Execute super Use case instead of this one and this one is finished
* forward - Navigate to another Use case, actual use case is finished
* dialog - Open modal dialog, actual use case is not finished but only suspended
* progress dialog - Open progress dialog, , actual use case is not finished but only suspended
* download - Creates action for launching download from client (browser)
Constant Summary
Instance Method Summary (collapse)
-
- (UU::OS::VUC::Action) back(params = {})
Cause back action, user is navigated to previous use case.
-
- (UU::OS::VUC::Action) download(uu_uri, params = {})
Creates action for launching download from client (browser).
-
- (UU::OS::VUC::Action) execute_super_uc(params = {})
Cause super use case, user is navigated to the super use case implementation.
-
- (UU::OS::VUC::Action) forward(uu_uri, params = {})
Navigate to use case passed by 'uu_uri' parameter.
-
- (Action) initialize(ctx)
constructor
A new instance of Action.
-
- (UU::OS::VUC::Action) open_dialog(uu_uri, params = {})
Action opens use case in modal window.
-
- (UU::OS::VUC::Action) open_progress_dialog(process_uri, params = {})
Action opens progress dialog that waits for specific process.
-
- (Object) to_json(opt = {})
Serialize object to JSON in format corresponding to schema ues:SYSTEM:UU.OS.VUC/ACTION_MESSAGE-SCHEMA-V3.
Constructor Details
- (Action) initialize(ctx)
Returns a new instance of Action
40 41 42 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/action.rb', line 40 def initialize(ctx) @ctx = ctx end |
Instance Method Details
- (UU::OS::VUC::Action) back(params = {})
Cause back action, user is navigated to previous use case. Actual use case is finished.
70 71 72 73 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/action.rb', line 70 def back(params = {}) @action = UU::OS::VUC::ActionHelper.create_back_uri(@ctx, params) return self end |
- (UU::OS::VUC::Action) download(uu_uri, params = {})
Creates action for launching download from client (browser).
197 198 199 200 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/action.rb', line 197 def download(uu_uri, params = {}) @action = UU::OS::VUC::ActionHelper.create_download_uri(@ctx, uu_uri, params) return self end |
- (UU::OS::VUC::Action) execute_super_uc(params = {})
Cause super use case, user is navigated to the super use case implementation. Actual use case is finished.
93 94 95 96 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/action.rb', line 93 def execute_super_uc(params = {}) @action = UU::OS::VUC::ActionHelper.create_super_uc_uri(@ctx, params) return self end |
- (UU::OS::VUC::Action) forward(uu_uri, params = {})
Navigate to use case passed by 'uu_uri' parameter. Actual use case is finished.
130 131 132 133 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/action.rb', line 130 def forward(uu_uri, params = {}) @action = UU::OS::VUC::ActionHelper.create_forward_uri(@ctx, uu_uri, params) return self end |
- (UU::OS::VUC::Action) open_dialog(uu_uri, params = {})
Action opens use case in modal window. Actual use case is not finished but only suspended.
154 155 156 157 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/action.rb', line 154 def open_dialog(uu_uri, params = {}) @action = UU::OS::VUC::ActionHelper.create_dialog_uri(@ctx, uu_uri, params) return self end |
- (UU::OS::VUC::Action) open_progress_dialog(process_uri, params = {})
Action opens progress dialog that waits for specific process. Actual use case is not finished but only suspended.
180 181 182 183 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/action.rb', line 180 def open_progress_dialog(process_uri, params = {}) @action = UU::OS::VUC::ActionHelper.create_progress_dialog_uri(@ctx, process_uri, params) return self end |
- (Object) to_json(opt = {})
Serialize object to JSON in format corresponding to schema ues:SYSTEM:UU.OS.VUC/ACTION_MESSAGE-SCHEMA-V3
206 207 208 209 210 211 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/action.rb', line 206 def to_json(opt = {}) response = {} response[:schemaUri] = ACTION_JSON_SCHEMA_URI response[:action] = @action return response.to_json(opt) end |