Class: WorkItems::DataSync::BaseService
- Inherits:
-
BaseContainerService
- Object
- BaseContainerService
- WorkItems::DataSync::BaseService
- Includes:
- Services::ReturnServiceResponses
- Defined in:
- app/services/work_items/data_sync/base_service.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#service_response ⇒ Object
readonly
Returns the value of attribute service_response.
-
#target_namespace ⇒ Object
readonly
Returns the value of attribute target_namespace.
-
#work_item ⇒ Object
readonly
Returns the value of attribute work_item.
Attributes inherited from BaseContainerService
#container, #current_user, #group, #params, #project
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(work_item:, target_namespace:, current_user: nil, params: {}) ⇒ BaseService
constructor
work_item - original work item target_namespace - ProjectNamespace, Group or Project current_user - user performing the move/clone action.
Methods included from Services::ReturnServiceResponses
Methods inherited from BaseContainerService
#group_container?, #namespace_container?, #project_container?, #project_group, #root_ancestor
Methods included from BaseServiceUtility
#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level
Methods included from Gitlab::Allowable
Constructor Details
#initialize(work_item:, target_namespace:, current_user: nil, params: {}) ⇒ BaseService
work_item - original work item target_namespace - ProjectNamespace, Group or Project current_user - user performing the move/clone action
13 14 15 16 17 18 |
# File 'app/services/work_items/data_sync/base_service.rb', line 13 def initialize(work_item:, target_namespace:, current_user: nil, params: {}) @work_item = work_item @target_namespace = target_namespace super(container: work_item.namespace, current_user: current_user, params: params) end |
Instance Attribute Details
#service_response ⇒ Object (readonly)
Returns the value of attribute service_response.
8 9 10 |
# File 'app/services/work_items/data_sync/base_service.rb', line 8 def service_response @service_response end |
#target_namespace ⇒ Object (readonly)
Returns the value of attribute target_namespace.
8 9 10 |
# File 'app/services/work_items/data_sync/base_service.rb', line 8 def target_namespace @target_namespace end |
#work_item ⇒ Object (readonly)
Returns the value of attribute work_item.
8 9 10 |
# File 'app/services/work_items/data_sync/base_service.rb', line 8 def work_item @work_item end |
Instance Method Details
#execute ⇒ Object
20 21 22 23 24 25 26 |
# File 'app/services/work_items/data_sync/base_service.rb', line 20 def execute verification_response = return verification_response if verification_response.error? data_sync_action end |